зеркало из https://github.com/github/ruby.git
[ruby/reline] Render refreshed prompt just after i-search finished
https://github.com/ruby/reline/commit/0d3188fe34
This commit is contained in:
Родитель
0b14abe8e7
Коммит
294552ca6c
|
@ -1614,6 +1614,8 @@ class Reline::LineEditor
|
|||
@waiting_proc = nil
|
||||
@cursor_max = calculate_width(@line)
|
||||
@cursor = @byte_pointer = 0
|
||||
@rerender_all = true
|
||||
@cached_prompt_list = nil
|
||||
searcher.resume(-1)
|
||||
when "\C-g".ord
|
||||
if @is_multiline
|
||||
|
@ -1657,6 +1659,8 @@ class Reline::LineEditor
|
|||
@waiting_proc = nil
|
||||
@cursor_max = calculate_width(@line)
|
||||
@cursor = @byte_pointer = 0
|
||||
@rerender_all = true
|
||||
@cached_prompt_list = nil
|
||||
searcher.resume(-1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -399,6 +399,17 @@ begin
|
|||
EOC
|
||||
end
|
||||
|
||||
def test_multiline_incremental_search_finish
|
||||
start_terminal(6, 25, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.')
|
||||
write("def a\n 8\nend\ndef b\n 3\nend\C-r8\C-j")
|
||||
close
|
||||
assert_screen(<<~EOC)
|
||||
prompt> def a
|
||||
prompt> 8
|
||||
prompt> end
|
||||
EOC
|
||||
end
|
||||
|
||||
def test_binding_for_vi_movement_mode
|
||||
write_inputrc <<~LINES
|
||||
set editing-mode vi
|
||||
|
|
Загрузка…
Ссылка в новой задаче