Delete newline when C-k on emacs mode at EOL
This commit is contained in:
parent
7769975c3c
commit
abe8fb49f0
@ -1417,6 +1417,14 @@ class Reline::LineEditor
|
|||||||
@byte_pointer = @line.bytesize
|
@byte_pointer = @line.bytesize
|
||||||
@cursor = @cursor_max = calculate_width(@line)
|
@cursor = @cursor_max = calculate_width(@line)
|
||||||
@kill_ring.append(deleted)
|
@kill_ring.append(deleted)
|
||||||
|
elsif @is_multiline and @byte_pointer == @line.bytesize and @buffer_of_lines.size > @line_index + 1
|
||||||
|
@cursor = calculate_width(@line)
|
||||||
|
@byte_pointer = @line.bytesize
|
||||||
|
@line += @buffer_of_lines.delete_at(@line_index + 1)
|
||||||
|
@cursor_max = calculate_width(@line)
|
||||||
|
@buffer_of_lines[@line_index] = @line
|
||||||
|
@rerender_all = true
|
||||||
|
@rest_height += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user