Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Row Functionality #114

Merged
merged 8 commits into from
Oct 5, 2021

Conversation

imreyesjorge
Copy link
Contributor

While using this cool code editor I missed one of my favorite things in VIM, removing entire rows at once.

Hope you find this useful 😄

Added the 'remove_current_line' functionality, executable with 'Ctrl + R'
Added the 'Ctrl-R' shortcut to the documentation
@imreyesjorge imreyesjorge mentioned this pull request Sep 22, 2021
Changed the 'Ctrl-R' action text
@ilai-deutel ilai-deutel linked an issue Sep 27, 2021 that may be closed by this pull request
@ilai-deutel
Copy link
Owner

Hi Jorge, thank you for your contribution!

Unfortunately, the total line of code count for the project increases to 1027 with this PR, which is slightly above the limit (1024).

Could you try trimming it down? You may be able to reuse self.delete_char() in your function: I think that deleting a row is equivalent to clearing the row, then pressing "backspace"

@imreyesjorge
Copy link
Contributor Author

I trimmed down my function a little bit, now it has fewer lines and completely deletes the line.

Copy link
Owner

@ilai-deutel ilai-deutel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

src/editor.rs~ Outdated Show resolved Hide resolved
src/editor.rs Show resolved Hide resolved
@imreyesjorge
Copy link
Contributor Author

Deleted the file and made the change

@ilai-deutel
Copy link
Owner

@all-contributors please add @imreyesjorge for code

@allcontributors
Copy link
Contributor

@ilai-deutel

I've put up a pull request to add @imreyesjorge! 🎉

@ilai-deutel ilai-deutel merged commit 0cdc377 into ilai-deutel:master Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick remove a line
2 participants