Skip to content

Conversation

@tompng
Copy link
Member

@tompng tompng commented Jan 19, 2025

Change @old_input_lines to a local variable
Rename @input_lines @input_lines_position to @undo_redo_history @undo_redo_index

Rename def push_input_lines to def push_undo_redo. (we have def move_undo_redo)
The meaning of input_lines is similar to buffer_of_lines and confusing.

old_input_lines does not need to be an instance variable anymore.
Confusing naming of 'input_lines' that stores backup state for undo/redo is renamed to undo_redo_history.
Copy link
Member

@ima1zumi ima1zumi left a comment

Choose a reason for hiding this comment

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

Nice refactor!

@ima1zumi ima1zumi merged commit ec28843 into ruby:master Jan 27, 2025
45 checks passed
@tompng tompng deleted the refactor_undo_redo branch January 27, 2025 12:04
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.

2 participants