1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Rerender whole buffer when argument editing finished

If the argument prompt disappears when pasting is finished, rerender the
whole buffer.

https://github.com/ruby/reline/commit/996bbf8797
This commit is contained in:
aycabta 2021-09-30 21:15:39 +09:00 committed by git
parent bf0a8a7462
commit 95522ef8b9

View file

@ -1408,7 +1408,10 @@ class Reline::LineEditor
end
@waiting_operator_proc = nil
@waiting_operator_vi_arg = nil
@vi_arg = nil
if @vi_arg
@rerender_all = true
@vi_arg = nil
end
else
block.(false)
end
@ -1459,7 +1462,10 @@ class Reline::LineEditor
wrap_method_call(method_symbol, method_obj, key) if method_obj
end
@kill_ring.process
@vi_arg = nil
if @vi_arg
@rerender_al = true
@vi_arg = nil
end
elsif @vi_arg
if key.chr =~ /[0-9]/
ed_argument_digit(key)
@ -1476,7 +1482,10 @@ class Reline::LineEditor
ed_insert(key) unless @config.editing_mode_is?(:vi_command)
end
@kill_ring.process
@vi_arg = nil
if @vi_arg
@rerender_all = true
@vi_arg = nil
end
end
elsif @waiting_proc
@waiting_proc.(key)