From 9cb7ba2f21aac6356089de949ef59ca42974b24b Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 9 Oct 2021 22:20:26 +0900 Subject: [PATCH] [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 --- lib/reline/line_editor.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 = '▄'