[Differential] [Request, 14 lines] D4190: Update file type on save only if path changes
Mikko Perttunen
noreply at phabricator.kde.org
Wed Jan 18 15:53:53 UTC 2017
mperttunen created this revision.
mperttunen added a reviewer: KTextEditor.
mperttunen set the repository for this revision to R39 KTextEditor.
Restricted Application added subscribers: Frameworks, kwrite-devel.
Restricted Application added a project: Frameworks.
REVISION SUMMARY
Currently in the event that a file has variables set by the file type default settings and has variables set by a .kateconfig file, on initial file opening the variables from the .kateconfig file take precedence. However, when saving the file, variables are updated using the file type settings but the .kateconfig file is not reread, causing variables to change to their file type settings values.
Update the logic such that the file type settings are only reloaded when the file name changes, as is currently done for .kateconfig reading, to ensure that .kateconfig always takes precedence.
TEST PLAN
For example, set "indent-width 8" in kate settings for Sources/C and create a directory with a .kateconfig file containing "kate: indent-width 4" and a file test.c. Open the file with Kate and modify it and save it. Before the patch on opening the indent width will be set to 4 and after saving it will be 8. After the patch the indent width will stay as 4 even after saving.
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D4190
AFFECTED FILES
src/document/katedocument.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: mperttunen, #ktexteditor
Cc: kwrite-devel, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170118/3d2aaa4d/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list