diff options
| author | Mari Imaizumi <mariimaizumi5@gmail.com> | 2024-04-16 20:58:46 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-04-16 11:58:49 +0000 |
| commit | 639449fe8d2493576faa764b1766ff2bc9c154ed (patch) | |
| tree | 0516185ece5f1822c856c1e526b0ab6905ca87dd /lib | |
| parent | 54d472d91fe9fc724969a6ed71a3919710e28bfa (diff) | |
[ruby/reline] Implement changing editing mode
(https://github.com/ruby/reline/pull/681)
https://github.com/ruby/reline/commit/501b9a6c5f
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/reline/line_editor.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index e4d7ecf1a2..36bd6d435f 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -2630,4 +2630,12 @@ class Reline::LineEditor @mark_pointer = new_pointer end alias_method :exchange_point_and_mark, :em_exchange_mark + + private def emacs_editing_mode(key) + @config.editing_mode = :emacs + end + + private def vi_editing_mode(key) + @config.editing_mode = :vi_insert + end end |
