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

ruby-changes:67596

From: aycabta <ko1@a...>
Date: Sat, 4 Sep 2021 21:57:24 +0900 (JST)
Subject: [ruby-changes:67596] f7d9dd2e4c (master): [ruby/irb] Render properly if both autocomplete and show doc dialogs are left of the cursor

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

From f7d9dd2e4c1c0668c27093373dc08a3ede4a56f8 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 31 Aug 2021 20:48:05 +0900
Subject: [ruby/irb] Render properly if both autocomplete and show doc dialogs
 are left of the cursor

https://github.com/ruby/irb/commit/0090203107
---
 lib/irb/input-method.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index ef9b9a6..10765a2 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -374,7 +374,8 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L374
       contents = [message] + doc.accept(formatter).split("\n")
 
       x = cursor_pos_to_render.x + autocomplete_dialog.width
-      x = cursor_pos_to_render.x - width if x + width >= screen_width
+      #x = cursor_pos_to_render.x - width if x + width >= screen_width
+      x = autocomplete_dialog.column - width if x + width >= screen_width
       y = cursor_pos_to_render.y + pointer - autocomplete_dialog.scroll_top
       DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: contents, width: width, bg_color: '49')
     }
-- 
cgit v1.1


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

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