summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-12-18 23:35:15 +0900
committeraycabta <aycabta@gmail.com>2020-12-19 02:12:11 +0900
commitaf2c81e10c15c267611e59f11b7152545c617826 (patch)
treee02bc8cb69d4ca1c6a208e886f920a5be1f178eb /lib
parent671f2762fb8a4832d2c17322ee600f53c91f76f5 (diff)
[ruby/reline] Bind yank-pop correctly
https://github.com/ruby/reline/commit/3c74beac65
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/key_actor/emacs.rb2
-rw-r--r--lib/reline/line_editor.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/reline/key_actor/emacs.rb b/lib/reline/key_actor/emacs.rb
index 1e51d4fa18..cad97a7d04 100644
--- a/lib/reline/key_actor/emacs.rb
+++ b/lib/reline/key_actor/emacs.rb
@@ -307,7 +307,7 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
# 152 M-^X
:ed_unassigned,
# 153 M-^Y
- :ed_unassigned,
+ :em_yank_pop,
# 154 M-^Z
:ed_unassigned,
# 155 M-^[
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index b80a184fc6..dc1f8824a2 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -1991,6 +1991,7 @@ class Reline::LineEditor
@byte_pointer += yanked.bytesize
end
end
+ alias_method :yank, :em_yank
private def em_yank_pop(key)
yanked, prev_yank = @kill_ring.yank_pop
@@ -2007,6 +2008,7 @@ class Reline::LineEditor
@byte_pointer += yanked.bytesize
end
end
+ alias_method :yank_pop, :em_yank_pop
private def ed_clear_screen(key)
@cleared = true