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

The C-q is also quoted insert in emacs mode

This commit is contained in:
aycabta 2019-06-03 04:17:52 +09:00
parent 5524de5ca0
commit 182072b211
2 changed files with 14 additions and 1 deletions

View file

@ -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

View file

@ -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('')