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

ruby-changes:68216

From: aycabta <ko1@a...>
Date: Sun, 3 Oct 2021 14:53:26 +0900 (JST)
Subject: [ruby-changes:68216] 95522ef8b9 (master): [ruby/reline] Rerender whole buffer when argument editing finished

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

From 95522ef8b97b27fb6ada357f835491a42f75400c Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Thu, 30 Sep 2021 21:15:39 +0900
Subject: [ruby/reline] Rerender whole buffer when argument editing finished

If the argument prompt disappears when pasting is finished, rerender the
whole buffer.

https://github.com/ruby/reline/commit/996bbf8797
---
 lib/reline/line_editor.rb | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index afb0b49f1c..85807ccf07 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -1408,7 +1408,10 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1408
       end
       @waiting_operator_proc = nil
       @waiting_operator_vi_arg = nil
-      @vi_arg = nil
+      if @vi_arg
+        @rerender_all = true
+        @vi_arg = nil
+      end
     else
       block.(false)
     end
@@ -1459,7 +1462,10 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1462
         wrap_method_call(method_symbol, method_obj, key) if method_obj
       end
       @kill_ring.process
-      @vi_arg = nil
+      if @vi_arg
+        @rerender_al = true
+        @vi_arg = nil
+      end
     elsif @vi_arg
       if key.chr =~ /[0-9]/
         ed_argument_digit(key)
@@ -1476,7 +1482,10 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1482
           ed_insert(key) unless @config.editing_mode_is?(:vi_command)
         end
         @kill_ring.process
-        @vi_arg = nil
+        if @vi_arg
+          @rerender_all = true
+          @vi_arg = nil
+        end
       end
     elsif @waiting_proc
       @waiting_proc.(key)
-- 
cgit v1.2.1


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

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