[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2019-06-10 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #12 from Christoph Feck  ---
Comment #11 is bug 407852.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2019-06-10 Thread Diggory Hardy
https://bugs.kde.org/show_bug.cgi?id=370716

Diggory Hardy  changed:

   What|Removed |Added

 CC||k...@dhardy.name

--- Comment #11 from Diggory Hardy  ---
In Kate 18.12.2, I can got to an existing line like

fn main() {

then insert the cursor between the brackets and type ')'. Result: the cursor is
moved one space to the right (with or without the 'enable automatic brackets'
option).

This behaviour happens even if I just added another bracket! E.g. typing 'x:
(f32, f32)' results in:

fn main(x: (f32, f32) {

(missing closing ')' because the old one was overridden).

I'd been wondering why the compiler has complained about missing brackets so
much lately. This behaviour is horrible (personally I prefer no
autocompletion).

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2018-03-28 Thread FeepingCreature
https://bugs.kde.org/show_bug.cgi?id=370716

FeepingCreature  changed:

   What|Removed |Added

 CC||default_357-l...@yahoo.de

--- Comment #10 from FeepingCreature  ---
This bug is horrible. It makes code completion practically unusable. It would
literally be better to never insert a closing bracket at all.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2017-09-14 Thread Matt Whitlock
https://bugs.kde.org/show_bug.cgi?id=370716

Matt Whitlock  changed:

   What|Removed |Added

 CC||k...@mattwhitlock.name

--- Comment #9 from Matt Whitlock  ---
(In reply to Sven Brauch from comment #7)
> The other issue with what we're thinking about is that "has a corresponding
> opening bracket" is a highly nontrival concept. What does that mean? Within
> the same line? In the whole document? Do comments count? Do strings count?

See my comments in Bug 368580 for a proposed solution that avoids this issue
entirely.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-16 Thread Janek Bevendorff via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #8 from Janek Bevendorff  ---
It should have the same logic as the already existing bracket
matching/highlighting.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-14 Thread Sven Brauch via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #7 from Sven Brauch  ---
True yes, that should be a stack of saved ranges, not just one.

The other issue with what we're thinking about is that "has a corresponding
opening bracket" is a highly nontrival concept. What does that mean? Within the
same line? In the whole document? Do comments count? Do strings count?

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-14 Thread Janek Bevendorff via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #6 from Janek Bevendorff  ---
It somehow also doesn't eat brackets when a new pair has been inserted
within. So foo(bar(|)) will result in foo(bar())|) when typing ")"
twice. The inner bracket is overwritten, but the outer bracket is not
which is super annoying.

Generally, I don't think it would be a problem to just consume any
closing brackets as long as they have a corresponding opening bracket.
You can a lot more than you lose.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-14 Thread Sven Brauch via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #5 from Sven Brauch  ---
That is the problem, yes. That's why current KTextEditor only eats closing
parentheses when you did not move your cursor out of the range between the two
parentheses before typing the closing one.

Maybe we can insert the () from KDevelop by simulating typing "(" if autobrace
is enabled. Then that would work here, too ...

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-13 Thread Janek Bevendorff via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #4 from Janek Bevendorff  ---
I have to say, there are some corner cases where bracket eating has already
annoyed me in IntelliJ. This is mostly, when revising brackets within brackets.
But generally, this happens a lot less and is a lot less annoying than always
ending with excess brackets because I'm too lazy to move my hand over to the
arrow keys.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-13 Thread Sven Brauch via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

Sven Brauch  changed:

   What|Removed |Added

 Status|UNCONFIRMED |CONFIRMED
 Ever confirmed|0   |1

--- Comment #3 from Sven Brauch  ---
Ok, that would solve your original request as well. I'll implement that and
talk it over with the kate devs.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-13 Thread Janek Bevendorff via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

--- Comment #2 from Janek Bevendorff  ---
I think that's what IntelliJ does. It always "eats" the braces and
brackets as long as there are corresponding opening ones. It doesn't
care if they were already there, just typed by the user or inserted
automatically.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kdevelop] [Bug 370716] Automatically overwrite closing brackets

2016-10-13 Thread Sven Brauch via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370716

Sven Brauch  changed:

   What|Removed |Added

 CC||m...@svenbrauch.de

--- Comment #1 from Sven Brauch  ---
For kate's autobrace, this is already the case, under certain conditions.

For KDevelop's autobraces, hmm, I don't know how simple it is to do this
technically. Not so simple, I think.

I'm actually considering to rework how autobraces work in kate, i.e. just "eat"
closing parentheses iff the result of inserting a new character would lead to
there being more closing than opening parentheses in the current line. Would
that help?

-- 
You are receiving this mail because:
You are watching all bug changes.