Skip to content

Commit

Permalink
Rename ivar undoing(undoing or redoing) to restoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Dec 12, 2024
1 parent c7b5fe7 commit 15fc6b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def reset_variables(prompt = '')
@rendered_screen = RenderedScreen.new(base_y: 0, lines: [], cursor_y: 0)
@input_lines = [[[""], 0, 0]]
@input_lines_position = 0
@undoing = false
@restoring = false
@prev_action_state = NullActionState
@next_action_state = NullActionState
reset_line
Expand Down Expand Up @@ -1070,8 +1070,8 @@ def input_key(key)
@completion_journey_state = nil
end

push_input_lines unless @undoing
@undoing = false
push_input_lines unless @restoring
@restoring = false

if @in_pasting
clear_dialogs
Expand Down Expand Up @@ -2357,7 +2357,7 @@ def finish
end

private def move_undo_redo(direction)
@undoing = true
@restoring = true
return unless (0..@input_lines.size - 1).cover?(@input_lines_position + direction)

@input_lines_position += direction
Expand Down

0 comments on commit 15fc6b2

Please sign in to comment.