https://bugs.kde.org/show_bug.cgi?id=488801

            Bug ID: 488801
           Summary: Visual-block Insert and Append does not respect the
                    apparent length of tab characters
    Classification: Applications
           Product: kate
           Version: 24.05.0
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Vi Input Mode
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: vagnerlu...@gmail.com
  Target Milestone: ---

I was editing a set of key-value JSON files which had their values aligned
using tabs, the key names were of variable length.
I wanted to modify multiple values at once, so I used Visual-block Insert, but
after leaving Insert mode, the text was placed using the absolute position of
the Visual-block, instead of honoring the length of the tabs, as Vim does.

STEPS TO REPRODUCE
1. Use tabs to align content that proceeds variable length content, such as:
field:                          ""
another_field:          ""
longer_field:                   ""
a_fourth_field:         ""

2. In Vi mode, on the first line, navigate to the closing quotes, and press
'Ctrl-V' to initiate Visual-block mode
3. In Visual-block mode, extend the block to the last line of aligned content,
then enter Insert mode with 'I'
3. Type any text inside the quotes, then leave Insert mode with 'Esc' or
'Ctrl-C'

OBSERVED RESULT
The text is inserted incorrectly, treating tabs as having a length of one
character:
field:                          "Hello"
another_fieHellold:             ""
longer_fielHellod:              ""
a_fourth_fiHelloeld:            ""


EXPECTED RESULT
The text should be inserted respecting the apparent length of the tabs:
field:                          "Hello"
another_field:          "Hello"
longer_field:                   "Hello"
a_fourth_field:         "Hello"


SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to