aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/cmd/ls.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-03-21 00:01:07 -0700
committergit <svn-admin@ruby-lang.org>2021-03-21 16:01:29 +0900
commit94254117eef0bafcdc5fd840af46af26060ee5be (patch)
tree324459daab3b794e3ec1e4c9264b5aec87a29f0c /lib/irb/cmd/ls.rb
parent450d1f2c5c476bfd38fe01a2a616a99cd1312caf (diff)
downloadruby-94254117eef0bafcdc5fd840af46af26060ee5be.tar.gz
[ruby/irb] Have some right padding
instead of filling out an entire line https://github.com/ruby/irb/commit/6ac8f45f5f
Diffstat (limited to 'lib/irb/cmd/ls.rb')
-rw-r--r--lib/irb/cmd/ls.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/cmd/ls.rb b/lib/irb/cmd/ls.rb
index 87798a22d7..f163f4f9e6 100644
--- a/lib/irb/cmd/ls.rb
+++ b/lib/irb/cmd/ls.rb
@@ -28,7 +28,7 @@ module IRB
def initialize(grep: nil)
@grep = grep
- @line_width = screen_width
+ @line_width = screen_width - MARGIN.length # right padding
end
def dump(name, strs)
@@ -73,7 +73,7 @@ module IRB
def screen_width
Reline.get_screen_size.last
rescue Errno::EINVAL # in `winsize': Invalid argument - <STDIN>
- 79
+ 80
end
end
private_constant :Output