diff options
author | aycabta <[email protected]> | 2021-02-03 17:56:49 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2021-02-07 05:12:07 +0900 |
commit | fee19da2305c2977985206b7db86917d0f7ac8db (patch) | |
tree | d9a830adca1a63777e88453e5d205df6b4582dbc /lib/reline/line_editor.rb | |
parent | a19ed1623f0341471b90888d02cfcf2601c5f2db (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.rb | 2 |
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 |