bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

readline: vi mode command 2P 2p treated as count=1


From: llattanzi+bash
Subject: readline: vi mode command 2P 2p treated as count=1
Date: Tue, 13 Jul 2004 09:34:30 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='darwin8.0' -DCONF_MACHTYPE='powerpc-apple-darwin8.0' -DCONF_VENDOR='apple' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I/SourceCache/bash/bash-30/bash -I/SourceCache/bash/bash-30/bash/include -I/SourceCache/bash/bash-30/bash/lib -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe uname output: Darwin stderr.apple.com 8.0.0b1 Darwin Kernel Version 8.0.0b1: Mon Jun 21 20:09:53 PDT 2004; root:xnu/xnu-634.obj~2/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        Yanking with arg > 1 is treated as arg==1

Repeat-By:
        set -o vi
        echo abc<ESC>3hY<return>
        echo 123<ESC>2P #or 2p
Only one copy of kill buffer will be yanked

Fix:
Index: bash/lib/readline/vi_mode.c
===================================================================
RCS file: /cvs/root/bash/bash/lib/readline/vi_mode.c,v
retrieving revision 1.2
diff -u -d -b -w -r1.2 vi_mode.c
--- vi_mode.c   2004/07/09 00:20:13     1.2
+++ vi_mode.c   2004/07/13 16:32:35
@@ -770,7 +770,7 @@
 {
   if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end))
rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
-
+  while (count--)
   rl_yank (1, key);
   rl_backward_char (1, key);
   return (0);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]