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

ruby-changes:73683

From: Ot=C3=A1vio <ko1@a...>
Date: Thu, 22 Sep 2022 22:28:54 +0900 (JST)
Subject: [ruby-changes:73683] 9fb18e6314 (master): [ruby/reline] fix vi-operator-arg

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

From 9fb18e631497fd308b2d1fdd9ad0bef1471de54b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ot=C3=A1vio=20Schwanck=20dos=20Santos?=
 <otavioschwanck@g...>
Date: Thu, 15 Sep 2022 13:19:02 +0100
Subject: [ruby/reline] fix vi-operator-arg

https://github.com/ruby/reline/commit/d42cdb8f91
---
 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 3e0aac759a..9703a8c9f3 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -1430,7 +1430,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1430
     if @waiting_operator_proc
       if VI_MOTIONS.include?(method_symbol)
         old_cursor, old_byte_pointer = @cursor, @byte_pointer
-        @vi_arg = @waiting_operator_vi_arg if @waiting_operator_vi_arg > 1
+        @vi_arg = @waiting_operator_vi_arg if (@waiting_operator_vi_arg || 1) > 1
         block.(true)
         unless @waiting_proc
           cursor_diff, byte_pointer_diff = @cursor - old_cursor, @byte_pointer - old_byte_pointer
-- 
cgit v1.2.1


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

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