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

[ruby/reline] Bind ed-kill-line to C-u on emacs mode

https://github.com/ruby/reline/commit/9ab99574f5
This commit is contained in:
aycabta 2021-09-27 02:49:30 +09:00
parent 15fab6fb17
commit 9de42d3b34
2 changed files with 1 additions and 29 deletions

View file

@ -43,7 +43,7 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
# 20 ^T
:ed_transpose_chars,
# 21 ^U
:em_kill_line,
:ed_kill_line,
# 22 ^V
:ed_quoted_insert,
# 23 ^W

View file

@ -254,34 +254,6 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
assert_line('ab')
end
def test_em_kill_line
input_keys("\C-u", false)
assert_byte_pointer_size('')
assert_cursor(0)
assert_cursor_max(0)
assert_line('')
input_keys('abc')
assert_byte_pointer_size('abc')
assert_cursor(3)
assert_cursor_max(3)
input_keys("\C-u", false)
assert_byte_pointer_size('')
assert_cursor(0)
assert_cursor_max(0)
assert_line('')
input_keys('abc')
input_keys("\C-b\C-u", false)
assert_byte_pointer_size('')
assert_cursor(0)
assert_cursor_max(1)
assert_line('c')
input_keys("\C-u", false)
assert_byte_pointer_size('')
assert_cursor(0)
assert_cursor_max(1)
assert_line('c')
end
def test_ed_move_to_beg
input_keys('abd')
assert_byte_pointer_size('abd')