Bug 375502

Summary: Kate (part) does not use default indentation mode for new files
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Saurav Sengupta <saurav1.sen>
Component: indentationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.59
Sentry Crash Report:

Description Saurav Sengupta 2017-01-24 15:27:50 UTC
The default indentation mode (at least for the Normal mode) is not applied to new files, i.e., to files which are not (yet) saved and thus do not have an associated indentation mode.

The status for bug #142087 shows "resolved fixed" but that was for old versions of Kate and the same problem now occurs with Kate 16.04 on KDE SC 5.8.5.

To reproduce:
1. Set the default indentation mode in Kate to Normal.
2. Open a new document but do not save it.
3. Type a line with leading indentation.
4. Press Enter.
Result: The new line does not inherit the indentation of the preceding one, although the default indentation mode of Normal should make it do so.
Comment 1 Dominik Haumann 2019-05-19 11:50:09 UTC
Proposed patch: https://phabricator.kde.org/D21289
Comment 2 Dominik Haumann 2019-05-19 13:22:37 UTC
Git commit 11fb4c4d5e101e2f6e48b0b69d5f1512079ff18c by Dominik Haumann.
Committed on 19/05/2019 at 13:22.
Pushed by dhaumann into branch 'master'.

Fix: Use default indentation mode for new files

Summary: BUG: 375502

Test Plan: make && make test

Reviewers: cullmann

Reviewed By: cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D21289

M  +3    -3    src/document/katedocument.cpp

https://commits.kde.org/ktexteditor/11fb4c4d5e101e2f6e48b0b69d5f1512079ff18c