зеркало из https://github.com/github/ruby.git
The C-q is also quoted insert in emacs mode
This commit is contained in:
Родитель
5524de5ca0
Коммит
182072b211
|
@ -35,7 +35,7 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
|
|||
# 16 ^P
|
||||
:ed_prev_history,
|
||||
# 17 ^Q
|
||||
:ed_ignore,
|
||||
:ed_quoted_insert,
|
||||
# 18 ^R
|
||||
:ed_search_prev_history,
|
||||
# 19 ^S
|
||||
|
|
|
@ -213,6 +213,19 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
|
|||
assert_line("か\u3099")
|
||||
end
|
||||
|
||||
def test_ed_quoted_insert
|
||||
input_keys("ab\C-v\C-acd")
|
||||
assert_line("ab\C-acd")
|
||||
assert_byte_pointer_size("ab\C-acd")
|
||||
assert_cursor(6)
|
||||
assert_cursor_max(6)
|
||||
input_keys("\C-q\C-b")
|
||||
assert_line("ab\C-acd\C-b")
|
||||
assert_byte_pointer_size("ab\C-acd\C-b")
|
||||
assert_cursor(8)
|
||||
assert_cursor_max(8)
|
||||
end
|
||||
|
||||
def test_ed_kill_line
|
||||
input_keys("\C-k", false)
|
||||
assert_byte_pointer_size('')
|
||||
|
|
Загрузка…
Ссылка в новой задаче