ruby-changes:70532
From: aycabta <ko1@a...>
Date: Fri, 24 Dec 2021 18:23:06 +0900 (JST)
Subject: [ruby-changes:70532] fd60a235f5 (master): [ruby/reline] Add doc about ed-kill-line, kill-line, em-kill-line, and unix-line-discard
https://git.ruby-lang.org/ruby.git/commit/?id=fd60a235f5 From fd60a235f5feeb2fa63d8e9ebb54e2236c16ce90 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Mon, 27 Sep 2021 02:32:12 +0900 Subject: [ruby/reline] Add doc about ed-kill-line, kill-line, em-kill-line, and unix-line-discard https://github.com/ruby/reline/commit/586a48ffe0 --- lib/reline/line_editor.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 589f28caf15..20032315b77 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -2593,6 +2593,11 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L2593 end alias_method :backward_delete_char, :em_delete_prev_char + # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, + # +Ctrl-U+) + Kill from the cursor to the end of the line. + # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of + # the line. With a negative numeric argument, kill backward + # from the cursor to the beginning of the current line. private def ed_kill_line(key) if @line.bytesize > @byte_pointer @line, deleted = byteslice!(@line, @byte_pointer, @line.bytesize - @byte_pointer) @@ -2611,6 +2616,10 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L2616 end alias_method :kill_line, :ed_kill_line + # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the + # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ + # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor + # to the beginning of the current line. private def em_kill_line(key) if @byte_pointer > 0 @line, deleted = byteslice!(@line, 0, @byte_pointer) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/