bug-bash
[Top][All Lists]
Advanced

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

"dt" doesn't work correctly in vi mode


From: Emanuele Torre
Subject: "dt" doesn't work correctly in vi mode
Date: Tue, 4 Apr 2023 09:18:08 +0200
User-agent: Mutt/2.2.10 (2023-03-25)

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
uname output: Linux t420 6.1.21-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 22 Mar 2023 
14:30:48 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.2
Patch Level: 15
Release Status: maint


When the prompt contains    abcjefgjjhij123  , and the cursor is before
the third j, and i press dtj, nothing will be deleted.

    (^ cursor)

    abcjefg^jjhij123
        dtj
    abcjefg^jjhij123
        dtj
    abcjefg^jjhij123

The correct vi behaviour would be to delete the j after the cursor:

    abcjefg^jjhij123
        dtj
    abcjefg^jhij123
        dtj
    abcjefg^j123

This bug only occurs if the j after the cursor is immediately followed
by another j, if there at least one different character between them,
the j after the cursor is correctly deleted

    ab^jajjx
        dtj
    ab^jjx
        dtj
    ab^jjx
        # should be  ab^jx

 emanuele6



reply via email to

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