Skip to content

Wrong byte_pointer bug in line_editor.rb #575

@tompng

Description

@tompng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions