summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-12-19 23:13:21 +0900
committeraycabta <aycabta@gmail.com>2019-12-22 05:35:03 +0900
commitfa1bf8ab37caad5fa0679adc0ecb8f6f5cec2eea (patch)
treec8495e633ed6c2f7bca7e2b95f7e7d906d73587d /lib
parent644336eef54c8ee2aeb7fd6c55fcd5620bcfa5b4 (diff)
[ruby/reline] Support Ctrl+right as em_next_word, and Ctrl+left as ed_prev_word
https://github.com/ruby/reline/commit/e98ad3b486
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/ansi.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index 376439dc74..4862cfb13f 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -11,6 +11,8 @@ class Reline::ANSI
[27, 91, 70] => :ed_move_to_end, # End
[27, 32] => :em_set_mark, # M-<space>
[24, 24] => :em_exchange_mark, # C-x C-x TODO also add Windows
+ [27, 91, 49, 59, 53, 67] => :em_next_word, # Ctrl+→
+ [27, 91, 49, 59, 53, 68] => :ed_prev_word, # Ctrl+←
}
@@input = STDIN