diff options
author | aycabta <[email protected]> | 2021-10-09 22:20:26 +0900 |
---|---|---|
committer | git <[email protected]> | 2021-10-09 23:23:02 +0900 |
commit | 9cb7ba2f21aac6356089de949ef59ca42974b24b (patch) | |
tree | 6ac0ef84f7600f8a0bff5066494511cb003a9e4d /lib/reline/line_editor.rb | |
parent | e6ba2953e98f7feff90d767106b0a35560582ca0 (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/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 7 |
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 = '▄' |