Bug 360240

Summary: Inserting multi-lines snippet after tab does not align following lines
Product: [Applications] kate Reporter: Fernand Veilleux <fernveilleux>
Component: plugin-snippetsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: christoph, ekigwana, ilmari.lauhakangas
Priority: NOR    
Version First Reported In: 16.04.1   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screen recording of kate window

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!