-
Notifications
You must be signed in to change notification settings - Fork 821
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
fix a ton of bugs (2 still left as an exercise) #78
Open
rofl0r
wants to merge
17
commits into
antirez:master
Choose a base branch
from
rofl0r:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Was writing `size` chars but the `hl` array was allocated as `rsize` chars.
With `'\` or `"...\` as the last characters on the line, `HL_STRING` could be written beyond the allocated size of the `hl` array, causing memory corruption and SEGV.
The test for a keyword would try to read the entire length of each keyword from the line position even if the rest of the line was too short to contain that keyword. A PR was already submitted for this but the author closed it before it could be merged.
The function `editorRowHasOpenComment()` used its own definition of a closing multiline comment and duplicated the `hl_oc` member of `struct erow`. Change to use the latter throughout and thus respect the selected syntax definition.
del key used to behave just like backspace. commit is based on d-e-h-i-o@799c743 but works on first char in file and doesnt crash program on last.
since python multiline string/comments start and end with the same sequence, kilo is unable to figure out which is which once one removes either one of the start or end markers of the section. dealing with this would require a quite more elaborate engine than currently implement, or doing a new syntax scan over the entire file.
for a cursor move that doesnt result in any scrolling, we now simply update cursor position (and col/row in status bar) to remove the nasty flickering caused by kilo on xterm when redrawing the entire screen everytime a cursor is moved. there's still a bug when moving cursor horizontally inside a long line, in that it's not detected that the screen needs redraw. i'll leave the fix to someone else as i'm done with this buggy editor.
i'm aware that @antirez won't merge this, i'm putting this here so other people can cherry pick bugfixes or at least get to a state where everything apart from long lines mostly works as it should |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.