https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #23 from Janek Bevendorff ---
Thanks for the tip. I added a new Q_INVOKABLE to expose setAutoBrackets() to
test scripts. The only possible pitfall I see here is that you have to
explicitly disable auto brackets again at the end of your test,
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #22 from Sven Brauch ---
Feel free to just adjust that test to the new behaviour, if you consider the
new behaviour sensible.
To enable autobraces, try view->config()->setAutoBrackets(true).
--
You are receiving this mail because:
You are
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #21 from Janek Bevendorff ---
Well, it has tests, but they fail (actually, the C++ ones don't, but
only because I haven't adjusted them yet to my latest changes in the
indenter which allow for auto brackets).
Additionally, one already existi
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #20 from Sven Brauch ---
Patch looks sensible to me and even has tests, if there are no objections I
would simply apply it.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #19 from Janek Bevendorff ---
Created attachment 101608
--> https://bugs.kde.org/attachment.cgi?id=101608&action=edit
Indenter Patch
Yes, sure, I can append it here. The patch I uploaded includes the failing unit
tests (because the auto b
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #18 from Dominik Haumann ---
@Alex: This issue probably also exists on KDE 4, so you can look into this
already now. Besides that, you could also just use Sven's AppImage
http://files.svenbrauch.de/kate-linux/ which gives you a recent Kate o
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #17 from Janek Bevendorff ---
Okay, I fixed it in C++/boost style as well. However, that indenter is overall
a little broken. The only effect auto brackets had on it was that it inserted
semicolons after opening braces. I fixed the semicolon
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #16 from Janek Bevendorff ---
I can't get Kate (and therefore the editor) to respect the auto-brackets on
modeline. Any tips?
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #15 from Sven Brauch ---
Thanks a lot for looking into that! Could you maybe be so kind and put a patch
up on phabricator.kde.org? Ideally, you could add a test for the new behaviour
:)
--
You are receiving this mail because:
You are watch
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #14 from Janek Bevendorff ---
I played a little with the ktexteditor code. The culprit for the C-style
indenter is this part (line 774):
} else if (firstPos == column - 1 && c == '}') {
var indentation = findLeftBrace(line, firs
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #13 from Janek Bevendorff ---
I downloaded a KDE Neon ISO to test this in KWrite and make sure it's
reproducible on other systems. I can indeed reproduce both issues:
C++/boost inserting {; instead of {} and C unindenting the line.
BTW C in
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #12 from Alex Turbov ---
I'll fix as soon as it would be possible to me to move to kate5.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #11 from Alex Turbov ---
Janek Bevendorff,
I've tried your buggy snippet w/ kate 4, and can't reproduce... unfortunately I
have no idea whats changed in KF5/Plasma5 version of kate...
I still use C++/boost indenter w/ Kate 4 and can't migr
https://bugs.kde.org/show_bug.cgi?id=370715
Dominik Haumann changed:
What|Removed |Added
CC||i.za...@gmail.com
--
You are receiving this
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #10 from Dominik Haumann ---
PS: I just added the auto-brackets modeline again, will be in KF 5.28.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #9 from Dominik Haumann ---
We should add a unit test for this with // kate: auto-brackets on;
PS: this mode line needs to be added first again, since it seems this was
removed in KDE 4.10, when the auto-brackets were removed...
--
You ar
https://bugs.kde.org/show_bug.cgi?id=370715
Sven Brauch changed:
What|Removed |Added
Status|UNCONFIRMED |CONFIRMED
Ever confirmed|0
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #7 from Janek Bevendorff ---
Actually, what I said is not quite correct. Not the enter key unindents the
braces, but the completion of the closing brace. As soon as I type "{", the
line gets unindented:
class Foo
{
public:
void foo()
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #6 from Janek Bevendorff ---
Either there or in the C++/boost indenter. All other indenters seem to work
fine with the automatic brace placement, but either don't indent my cursor
inside the braces, i.e.,
class Foo
{
public:
void foo()
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #5 from Sven Brauch ---
I think this should be fixed in the C-style indenter.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #4 from Janek Bevendorff ---
Well, yeah, what I said. I want to have
class Foo
{
public:
void foo()
{
|
}
};
but with the C-style indenter I end up with
class Foo
{
public:
void foo()
{
|
}
};
even when I init
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #3 from Sven Brauch ---
Yes, C style. What do you mean by "doesn't indent class methods properly"?
The C style indenter is the normal indenter for C/C++. The C++/boost style
indenter is some really specific tool with lots of assumptions on
https://bugs.kde.org/show_bug.cgi?id=370715
--- Comment #2 from Janek Bevendorff ---
What "normal" C++ indenter do you mean? I only have "C style" and
"C++/boost style". The former doesn't indent class methods properly and
the latter is broken.
Also for some reason all new files use the C-style i
https://bugs.kde.org/show_bug.cgi?id=370715
Sven Brauch changed:
What|Removed |Added
Version|5.0.1 |Git
Component|code completion
24 matches
Mail list logo