Skip to content

Commit 586a48f

Browse files
committed
Add doc about ed-kill-line, kill-line, em-kill-line, and unix-line-discard
1 parent 5936071 commit 586a48f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/reline/line_editor.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,6 +2513,11 @@ def finish
25132513
end
25142514
alias_method :backward_delete_char, :em_delete_prev_char
25152515

2516+
# Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+,
2517+
# +Ctrl-U+) + Kill from the cursor to the end of the line.
2518+
# GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of
2519+
# the line. With a negative numeric argument, kill backward
2520+
# from the cursor to the beginning of the current line.
25162521
private def ed_kill_line(key)
25172522
if @line.bytesize > @byte_pointer
25182523
@line, deleted = byteslice!(@line, @byte_pointer, @line.bytesize - @byte_pointer)
@@ -2531,6 +2536,10 @@ def finish
25312536
end
25322537
alias_method :kill_line, :ed_kill_line
25332538

2539+
# Editline:: +em-kill-line+ (not bound) Delete the entire contents of the
2540+
# edit buffer and save it to the cut buffer. +vi-kill-line-prev+
2541+
# GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor
2542+
# to the beginning of the current line.
25342543
private def em_kill_line(key)
25352544
if @byte_pointer > 0
25362545
@line, deleted = byteslice!(@line, 0, @byte_pointer)

0 commit comments

Comments
 (0)