summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-11-01 22:59:03 +0900
committeraycabta <aycabta@gmail.com>2020-12-05 02:58:58 +0900
commit564aadce626ff8dc94784d909d2a9c7bcd27b427 (patch)
tree85e05430ac05752410bdbfe0b0fa2978497a569b /lib
parente6429ad047a46e19739fceb8fa1a64380cb6ae12 (diff)
[ruby/reline] Skip em_exchange_mark without mark
https://github.com/ruby/reline/commit/abb56e5ec3
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 325475f4b9..fde8ad928f 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -2342,6 +2342,7 @@ class Reline::LineEditor
alias_method :set_mark, :em_set_mark
private def em_exchange_mark(key)
+ return unless @mark_pointer
new_pointer = [@byte_pointer, @line_index]
@previous_line_index = @line_index
@byte_pointer, @line_index = @mark_pointer