Bug 488801 - Visual-block Insert and Append does not respect the apparent length of tab characters
Summary: Visual-block Insert and Append does not respect the apparent length of tab ch...
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (other bugs)
Version First Reported In: 24.05.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-20 17:02 UTC by Vagner Lunes
Modified: 2024-06-20 17:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vagner Lunes 2024-06-20 17:02:54 UTC
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