summaryrefslogtreecommitdiff
path: root/lib/reline/windows.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-02-01 02:59:46 +0900
committeraycabta <aycabta@gmail.com>2020-02-02 03:28:20 +0900
commit06c37fa5b4834c81470213a04dc73a63e69e9776 (patch)
tree59d18c7c47759ae90706b422402f013332a9df30 /lib/reline/windows.rb
parent16d4774da1f0c5f5a78dff752780e77ebdf9b2f8 (diff)
[ruby/reline] Bypass cursor down when a char is rendered at eol on Windows
A newline is automatically inserted if a character is rendered at eol on Windows command prompt. https://github.com/ruby/reline/commit/4bfea07e4a
Diffstat (limited to 'lib/reline/windows.rb')
-rw-r--r--lib/reline/windows.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb
index 2492dffd27..22a009ea66 100644
--- a/lib/reline/windows.rb
+++ b/lib/reline/windows.rb
@@ -5,6 +5,10 @@ class Reline::Windows
Encoding::UTF_8
end
+ def self.win?
+ true
+ end
+
RAW_KEYSTROKE_CONFIG = {
[224, 72] => :ed_prev_history, # ↑
[224, 80] => :ed_next_history, # ↓