diff options
author | aycabta <aycabta@gmail.com> | 2019-05-23 08:33:20 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-23 08:33:20 +0900 |
commit | bb29ed6e336d26f25722f356e83a027394008443 (patch) | |
tree | 13f6b1b73a375528de577bb4effa8f719da077be /lib | |
parent | da3fabc976fb88c77e8b3446f2f0bc005e64056f (diff) | |
download | ruby-bb29ed6e336d26f25722f356e83a027394008443.tar.gz |
C-v C-j means an newline insertion
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index d49f6ab618..92f75c7b88 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -851,7 +851,11 @@ class Reline::LineEditor private def ed_quoted_insert(str, arg: 1) @waiting_proc = proc { |key| arg.times do - ed_insert(key) + if key == "\C-j".ord or key == "\C-m".ord + ed_newline(key) + else + ed_insert(key) + end end @waiting_proc = nil } |