Skip to content

handle edge case at the very last line of a file for "new_line_below"#32

Open
jsonjunkie wants to merge 1 commit intobernardo-bruning:mainfrom
jsonjunkie:jsonjunkie/bugfix/fix-insert-line-at-bottom-of-file
Open

handle edge case at the very last line of a file for "new_line_below"#32
jsonjunkie wants to merge 1 commit intobernardo-bruning:mainfrom
jsonjunkie:jsonjunkie/bugfix/fix-insert-line-at-bottom-of-file

Conversation

@jsonjunkie
Copy link

kinda of mentioned in this issue #21 but when editing a file in the godot editor and the cursor is at the very last line, the "new_line_below" offset makes a new line above the current line

actual:
Screenshot 2024-09-26 at 4 35 03 PM
Screenshot 2024-09-26 at 4 35 14 PM

expected:
Screenshot 2024-09-26 at 4 35 59 PM
Screenshot 2024-09-26 at 4 36 04 PM

@jsonjunkie
Copy link
Author

jsonjunkie commented Sep 26, 2024

actually, im not sure if you want to merge this, im seeing it causes an error in the output (no other noticeable errors or crashes as a result)

scene/gui/text_edit.cpp:7824 - Index p_from_column = 28 is out of bounds (text[p_from_line].length() + 1 = 2).

it seems like there is some weirdness with the godot editor and the end of files in general

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.

1 participant