[ruby/reline] Add Meta+arrow-keys in extended entries of terminfo

https://github.com/ruby/reline/commit/af6f6ed088
This commit is contained in:
aycabta 2021-05-19 17:58:25 +09:00
Родитель 60d1d6aa89
Коммит 18b79b4c49
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -25,6 +25,8 @@ class Reline::ANSI
# extended entries of terminfo
[27, 91, 49, 59, 53, 67] => :em_next_word, # Ctrl+→, extended entry
[27, 91, 49, 59, 53, 68] => :ed_prev_word, # Ctrl+←, extended entry
[27, 91, 49, 59, 51, 67] => :em_next_word, # Meta+→, extended entry
[27, 91, 49, 59, 51, 68] => :ed_prev_word, # Meta+←, extended entry
}.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)