If triggerCharacters was not set, toString() would return "undefined",
making indenters trigger on u, n, d, e, f, i and n.
Details
- Reviewers
cullmann dhaumann - Group Reviewers
KTextEditor - Commits
- R39:aeebeadb5f59: fix some indenters from indenting on random characters
Trigger chars are still set correctly for e.g. cmake.
Diff Detail
- Repository
- R39 KTextEditor
- Lint
Lint Skipped - Unit
Unit Tests Skipped
src/script/kateindentscript.cpp | ||
---|---|---|
47 | But if triggerCharacters are undefined this variable should be false, no? |
src/script/kateindentscript.cpp | ||
---|---|---|
47 | No, that's still fine, this variable just caches reading the value from the script object. If the script doesn't define it, it is read as empty, and then doesn't look again (because that won't change in the future). |
That makes a lot of sense. Please commit. Does that fix the indentation problems reported about Python?
Yes, at least the ones I'm aware of. Thanks for the review, I'll push it in a moment.
Thanks for the fix!
Just one thing: could we in addition have an addition indentation test that uses the trigger chars? Its amazing we seem to have none for this as otherwise this problem would have been fixed during the port.