bug-bash
[Top][All Lists]
Advanced

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

rl_revert_line reverts too far


From: llattanzi+bash
Subject: rl_revert_line reverts too far
Date: Tue, 22 Jun 2004 08:57:06 -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 May 10 23:45:14 PDT 2004; root:xnu/xnu-600.3.obj~4/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0

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

Description:
        revert [VI:U  emacs:\M-R] will erase the command line because it undoes
        the very first insertion

Repeat-By:
        set -o vi
echo antidisestablishmentarianim<ESC> #edit the command and finish with U
        <NO command line left>

Fix:
Index: bash/lib/readline/undo.c
===================================================================
RCS file: /cvs/root/bash/bash/lib/readline/undo.c,v
retrieving revision 1.1.1.4
diff -u -d -b -w -r1.1.1.4 undo.c
--- undo.c      2003/04/05 08:00:34     1.1.1.4
+++ undo.c      2004/06/22 15:52:41
@@ -138,8 +138,10 @@

        /* Undoing inserts means deleting some text. */
        case UNDO_INSERT:
+         if (rl_undo_list->next) { /* Don't undo the entire command! */
          rl_delete_text (start, end);
          rl_point = start;
+         }
          break;

        /* Undoing an END means undoing everything 'til we get to a BEGIN. */





reply via email to

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