summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-10-09 22:20:26 +0900
committergit <svn-admin@ruby-lang.org>2021-10-09 23:23:02 +0900
commit9cb7ba2f21aac6356089de949ef59ca42974b24b (patch)
tree6ac0ef84f7600f8a0bff5066494511cb003a9e4d /lib
parente6ba2953e98f7feff90d767106b0a35560582ca0 (diff)
[ruby/reline] Add RELINE_ALT_SCROLLBAR env to use alternative text for scrollbar
The setting to use '::' instead of block elements. https://github.com/ruby/reline/commit/4afbc98e2c
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index a71bb65259..f6facc9da8 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -181,7 +181,12 @@ class Reline::LineEditor
Reline::IOGate.set_winch_handler do
@resized = true
end
- if Reline::IOGate.win?
+ if ENV.key?('RELINE_ALT_SCROLLBAR')
+ @full_block = '::'
+ @upper_half_block = "''"
+ @lower_half_block = '..'
+ @block_elem_width = 2
+ elsif Reline::IOGate.win?
@full_block = '█'
@upper_half_block = '▀'
@lower_half_block = '▄'