Bug 448695 - block mode tabspace indents selection
Summary: block mode tabspace indents selection
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 20.04.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 493723 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-18 09:34 UTC by Joey Crockett
Modified: 2024-09-27 08:56 UTC (History)
3 users (show)

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


Attachments
Screenshot of the reported bug (17.94 KB, image/png)
2024-08-02 15:46 UTC, Audrey Meyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joey Crockett 2022-01-18 09:34:09 UTC
SUMMARY
***
When a line of columns is selected in block mode, pressing the tabspace-button indents the whole selection instead of inserting a tabspace character.
***


STEPS TO REPRODUCE
1. have a block of text in the editor control - possibly with a gap consisting of a space character you want to replace with a tabstop
2. enter block mode
3. select a line of columns by pressing shift+down
4. remove gap with del or backspace
5. press tab button to insert tabstop char

OBSERVED RESULT
the whole selection indents (as it would outside of block mode)

EXPECTED RESULT
tabstop char should be inserted into every row at the cursor position

SOFTWARE/OS VERSIONS
Linux: 5.3.18-59.37-preempt x86_64
KDE Plasma Version: 5.18.6
KDE Frameworks Version: 5.76.0
Qt Version: 5.12.7

ADDITIONAL INFORMATION
copying a tabstop char into the clipboard and pasting it into the gap works as a workaround, but should not be the way to do it. indenting by use of the tabstop button should probably be deactivated in block mode.
Comment 1 Audrey Meyer 2024-07-19 04:17:41 UTC
I  was able to reproduce this in 24.05.2.
Comment 2 Waqar Ahmed 2024-08-02 09:29:17 UTC
Change the document indentation mode to "Tabulators" to be able to input \t. Otherwise this is working as expected
Comment 3 Audrey Meyer 2024-08-02 15:46:58 UTC
Created attachment 172215 [details]
Screenshot of the reported bug

I'm seeing the same behavior whether the indentation mode is set to tabs or spaces. I believe the original reporter was trying to insert a block of \t characters in the middle of the lines, rather than indenting them, and I don't see any way to do that currently.

I added a screenshot to clarify the issue.
Comment 4 Bug Janitor Service 2024-08-02 17:13:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/711
Comment 5 Christoph Cullmann 2024-08-04 14:56:43 UTC
Git commit 2d2ddec2e353d36eec7ba1689c081af5257ded15 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 04/08/2024 at 14:51.
Pushed by cullmann into branch 'master'.

Dont indent on tab when in block selection mode

M  +1    -1    src/view/kateviewinternal.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/2d2ddec2e353d36eec7ba1689c081af5257ded15
Comment 6 Waqar Ahmed 2024-09-27 08:56:58 UTC
*** Bug 493723 has been marked as a duplicate of this bug. ***