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

Wrong byte_pointer bug in line_editor.rb #575

Closed
tompng opened this issue Jul 18, 2023 · 1 comment
Closed

Wrong byte_pointer bug in line_editor.rb #575

tompng opened this issue Jul 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tompng
Copy link
Member

tompng commented Jul 18, 2023

Description

I found in #574 that wrong byte_pointer is passed to auto_indent_proc.
When @line or @line_index is changed, Reline needs to recalculate @byte_pointer too.

Where is the bug?

I slightly searched line_editor.rb with regexp /@line_index [+-]= |@line = / and listed up methods which is not updating @byte_pointer.
These are suspicious methods

incremental_search_history
ed_search_prev_history
ed_search_next_history
ed_newline
ed_next_history
vi_histedit
vi_replace_char
insert_new_line
just_move_cursor
rerender_changed_current_line
process_auto_indent
generate_searcher
em_exchange_mark
@tompng tompng changed the title Wrong byte_position bug in line_editor.rb Wrong byte_pointer bug in line_editor.rb Jul 18, 2023
@st0012 st0012 added the bug Something isn't working label Nov 8, 2023
@tompng
Copy link
Member Author

tompng commented Mar 23, 2024

Fixed all of them in #614

@tompng tompng closed this as completed Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants