[前][次][番号順一覧][スレッド一覧]

ruby-changes:65612

From: Takashi <ko1@a...>
Date: Sun, 21 Mar 2021 16:01:39 +0900 (JST)
Subject: [ruby-changes:65612] 94254117ee (master): [ruby/irb] Have some right padding

https://git.ruby-lang.org/ruby.git/commit/?id=94254117ee

From 94254117eef0bafcdc5fd840af46af26060ee5be Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sun, 21 Mar 2021 00:01:07 -0700
Subject: [ruby/irb] Have some right padding

instead of filling out an entire line

https://github.com/ruby/irb/commit/6ac8f45f5f
---
 lib/irb/cmd/ls.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/irb/cmd/ls.rb b/lib/irb/cmd/ls.rb
index 87798a2..f163f4f 100644
--- a/lib/irb/cmd/ls.rb
+++ b/lib/irb/cmd/ls.rb
@@ -28,7 +28,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/cmd/ls.rb#L28
 
         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 https://github.com/ruby/ruby/blob/trunk/lib/irb/cmd/ls.rb#L73
         def screen_width
           Reline.get_screen_size.last
         rescue Errno::EINVAL # in `winsize': Invalid argument - <STDIN>
-          79
+          80
         end
       end
       private_constant :Output
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]