summaryrefslogtreecommitdiff
path: root/lib/reline/line_editor.rb
diff options
context:
space:
mode:
authorYoshinao Muramatu <ysno@ac.auone-net.jp>2021-02-17 23:56:34 +0900
committeraycabta <aycabta@gmail.com>2021-02-21 06:43:52 +0900
commit38d30a6942babb815bcd05b035fc58a7e13dd717 (patch)
tree43b5f2db1b54cfb8aa117c39c990c842e8c3c4d2 /lib/reline/line_editor.rb
parent38cefac7ce277d8ea41c600e67a2046da3715ac3 (diff)
[ruby/reline] check ENABLE_VIRTUAL_TERMINAL_PROCESSING flag and switch eof processing
https://github.com/ruby/reline/commit/3535676689
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r--lib/reline/line_editor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 99877329af..0adda72b23 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -726,7 +726,7 @@ class Reline::LineEditor
if line.nil?
if calculate_width(visual_lines[index - 1], true) == Reline::IOGate.get_screen_size.last
# reaches the end of line
- if Reline::IOGate.win?
+ if Reline::IOGate.win? and Reline::IOGate.win_legacy_console?
# A newline is automatically inserted if a character is rendered at
# eol on command prompt.
else
@@ -744,7 +744,7 @@ class Reline::LineEditor
next
end
@output.write line
- if Reline::IOGate.win? and calculate_width(line, true) == Reline::IOGate.get_screen_size.last
+ if Reline::IOGate.win? and Reline::IOGate.win_legacy_console? and calculate_width(line, true) == Reline::IOGate.get_screen_size.last
# A newline is automatically inserted if a character is rendered at eol on command prompt.
@rest_height -= 1 if @rest_height > 0
end