[前][次][番号順一覧][スレッド一覧]

ruby-changes:70537

From: aycabta <ko1@a...>
Date: Fri, 24 Dec 2021 18:23:06 +0900 (JST)
Subject: [ruby-changes:70537] 15fab6fb17 (master): [ruby/reline] Support S-Tab to move up completion cursor in vi-mode on Unix

https://git.ruby-lang.org/ruby.git/commit/?id=15fab6fb17

From 15fab6fb17f011dcd2661d961ac3ece1f6a88c88 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Sun, 19 Sep 2021 22:24:43 +0900
Subject: [ruby/reline] Support S-Tab to move up completion cursor in vi-mode
 on Unix

https://github.com/ruby/reline/commit/ff278cdc88
---
 lib/reline/ansi.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index 76069ceccde..ab147a61857 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -46,11 +46,16 @@ class Reline::ANSI https://github.com/ruby/ruby/blob/trunk/lib/reline/ansi.rb#L46
       config.add_default_key_binding_by_keymap(:vi_insert, key, func)
       config.add_default_key_binding_by_keymap(:vi_command, key, func)
     end
+    {
+      [27, 91, 90] => :completion_journey_up, # S-Tab
+    }.each_pair do |key, func|
+      config.add_default_key_binding_by_keymap(:emacs, key, func)
+      config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+    end
     {
       # default bindings
       [27, 32] => :em_set_mark,             # M-<space>
       [24, 24] => :em_exchange_mark,        # C-x C-x
-      [27, 91, 90] => :completion_journey_up, # S-Tab
     }.each_pair do |key, func|
       config.add_default_key_binding_by_keymap(:emacs, key, func)
     end
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]