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

ruby-changes:65167

From: aycabta <ko1@a...>
Date: Sun, 7 Feb 2021 05:16:55 +0900 (JST)
Subject: [ruby-changes:65167] 08162f0e69 (master): [ruby/reline] Update cursor info by inserting newline even if not in pasting

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

From 08162f0e6926441d6393d11de45671ab174d88dc Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 2 Feb 2021 23:58:20 +0900
Subject: [ruby/reline] Update cursor info by inserting newline even if not in
 pasting

https://github.com/ruby/reline/commit/92d314f514
---
 lib/reline/line_editor.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 16c41b5..e5c7971 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -491,8 +491,8 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L491
     @line = @buffer_of_lines[@line_index]
     unless @in_pasting
       render_partial(prompt, prompt_width, @line, @first_line_started_from + @started_from + 1, with_control: false)
-      @cursor = @cursor_max = calculate_width(@line)
     end
+    @cursor = @cursor_max = calculate_width(@line)
     @byte_pointer = @line.bytesize
     @highest_in_all += @highest_in_this
     @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
-- 
cgit v1.1


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

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