Skip to content

Commit

Permalink
Merge pull request #55 from acammack-r7/fix-vi-insert-history
Browse files Browse the repository at this point in the history
Fix history navigation in vi_insert mode
  • Loading branch information
aycabta authored Sep 15, 2019
2 parents fa419ff + a5b857d commit f4e7e40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ def finish
@line = Reline::HISTORY[@history_pointer]
end
end
if @config.editing_mode_is?(:emacs)
if @config.editing_mode_is?(:emacs, :vi_insert)
@cursor_max = @cursor = calculate_width(@line)
@byte_pointer = @line.bytesize
elsif @config.editing_mode_is?(:vi_command)
Expand Down Expand Up @@ -1327,7 +1327,7 @@ def finish
end
end
@line = '' unless @line
if @config.editing_mode_is?(:emacs)
if @config.editing_mode_is?(:emacs, :vi_insert)
@cursor_max = @cursor = calculate_width(@line)
@byte_pointer = @line.bytesize
elsif @config.editing_mode_is?(:vi_command)
Expand Down

0 comments on commit f4e7e40

Please sign in to comment.