Bug 360240 - Inserting multi-lines snippet after tab does not align following lines
Summary: Inserting multi-lines snippet after tab does not align following lines
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: plugin-snippets (other bugs)
Version First Reported In: 16.04.1
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-08 04:07 UTC by Fernand Veilleux
Modified: 2019-05-26 13:22 UTC (History)
3 users (show)

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


Attachments
Screen recording of kate window (1.64 MB, application/octet-stream)
2019-05-25 22:12 UTC, Edward Kigwana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernand Veilleux 2016-03-08 04:07:47 UTC
Inserted tabs/spaces in the beginning of a line before I add a snippet are not replicated on the second and following lines

Reproducible: Always

Steps to Reproduce:
1.Insert tabs/spaces in a line to let's say column 12
2.Insert a well formated multi-lines snippet similar to this :
if (){
    do this
}

Actual Results:  
            if (){
    do this
}

Expected Results:  
            if (){
                do this
            }
Comment 1 Buovjaga 2016-07-02 09:54:25 UTC
Reproduced.

Arch Linux 64-bit
Kate 16.04.2
KDE Frameworks 5.23.0
Qt 5.7
xcb wm
Comment 2 Nikolaj Iversen 2016-11-15 09:37:42 UTC
The bug is partly fixed (using kate version 3.14.13)
Under settings->editing->indentation there is a default indentation mode.
The indentation mode should follow the language of the file, but if the default is set to a bad mode, the indentation does not work.

But when it is set, the snippet is pasted correctly.
I use C style as default as most languages mimics the indentation style.
Comment 3 Edward Kigwana 2019-05-25 14:56:18 UTC
Fixed in main.
Comment 4 Dominik Haumann 2019-05-25 21:26:36 UTC
Since when, which commit? What did you do to test?
Comment 5 Edward Kigwana 2019-05-25 22:12:30 UTC
Created attachment 120313 [details]
Screen recording of kate window

kde-frameworks/ktexteditor: commit b2064042daa143ae60d5728d46777511aee74a02
kde-apps/kate: commit b642a531b022f93c1b07880a3a195c2a6dfd7538

Kate Version 18.03.70
Kate Part Version 5.59.0
QT 5.12.3

Note I have adjust indention of code pasted from the clipboard enabled.
Comment 6 Dominik Haumann 2019-05-26 05:43:14 UTC
The commits you refer to do not change anything related to this issue.

So you tested and it's a "works for you", not a fix, right? :)
Comment 7 Edward Kigwana 2019-05-26 13:19:37 UTC
First time trying my hand at this. I was just combing through older bugs to see if they were still present and this one used to irritate me. So Unless I have a specific commit I'll use worksforme from here on out.
Comment 8 Christoph Cullmann 2019-05-26 13:22:21 UTC
If you can no longer reproduce an issue with current master, worksforme is the right thing I assume, thanks!