summaryrefslogtreecommitdiff
path: root/lib/reline/line_editor.rb
diff options
context:
space:
mode:
authoraycabta <[email protected]>2021-02-03 17:56:49 +0900
committeraycabta <[email protected]>2021-02-07 05:12:07 +0900
commitfee19da2305c2977985206b7db86917d0f7ac8db (patch)
treed9a830adca1a63777e88453e5d205df6b4582dbc /lib/reline/line_editor.rb
parenta19ed1623f0341471b90888d02cfcf2601c5f2db (diff)
[ruby/reline] Autowrap correctly when inserting chars in the middle of a line
https://github.com/ruby/reline/commit/ebaf37255f
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r--lib/reline/line_editor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 84cd8a063e..31640fd743 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -704,8 +704,8 @@ class Reline::LineEditor
@highest_in_this = height
end
move_cursor_up(@started_from)
- cursor_up_from_last_line = height - 1 - @started_from
@started_from = calculate_height_by_width(prompt_width + @cursor) - 1
+ cursor_up_from_last_line = height - 1 - @started_from
end
if Reline::Unicode::CSI_REGEXP.match?(prompt + line_to_render)
@output.write "\e[0m" # clear character decorations