diff options
author | tomoya ishida <[email protected]> | 2023-03-18 23:37:05 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-03-18 14:37:10 +0000 |
commit | e8e7ff1333b9b32d72a1d8f789a186d58c811420 (patch) | |
tree | 11a80cd1fee32eedb84d2ecb498952436a8ec59f /lib/reline/line_editor.rb | |
parent | cb22d78354e201ca74eba68a8b4edefb593e6754 (diff) |
[ruby/reline] Fix: line longer than terminal width breaks rendering
(https://github.com/ruby/reline/pull/516)
https://github.com/ruby/reline/commit/ae5f9b87ab
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 87ce7fba5d..bd2f2c858a 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -972,6 +972,7 @@ class Reline::LineEditor prev_line_prompt = @prompt_proc ? prompt_list[@line_index - 1] : prompt prev_line_prompt_width = @prompt_proc ? calculate_width(prev_line_prompt, true) : prompt_width prev_line = modify_lines(lines)[@line_index - 1] + move_cursor_up(@started_from) render_partial(prev_line_prompt, prev_line_prompt_width, prev_line, @first_line_started_from + @started_from, with_control: false) scroll_down(1) render_partial(prompt, prompt_width, @line, @first_line_started_from + @started_from + 1, with_control: false) |