Bug 216383 - auto brackets overwriting existing brackets
Summary: auto brackets overwriting existing brackets
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-27 14:05 UTC by ruediger.eichler
Modified: 2009-12-05 15:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ruediger.eichler 2009-11-27 14:05:59 UTC
Version:           4.3.2 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

Reproduce:
-enable "auto-brackets"
-open new document
-type "test()"
> cursor is now between the brackets
-type at position of cursor: test2()
> results in "test(test2()", where the last bracket is missing.

The error also occurs in Kile.
Comment 1 Dominik Haumann 2009-11-28 19:38:54 UTC
This is due to bug #101213. In my opinion we should revert the patch in #101213, which will automatically resolv this.

This logic is dependent on the language you type, so It should rather be in the indenter anyway.

Is reverting + closing this ok, other kate devs?
Comment 2 ruediger.eichler 2009-11-29 00:17:55 UTC
Seems youre right.
Didn't find it cause auto-bracket gave no results in search.
Comment 3 Dominik Haumann 2009-12-05 15:50:27 UTC
This is fixed now by reverting the change in bug #101213 for KDE 4.4.
The relevant commit:

SVN commit 1058975 by dhaumann:

revert non-deterministic insertion of brackets
- always insert ')' for '(', same for {["
- backspace only deletes one character

On the long run we need to find a different solution, depending on the current
filtype. Ideally, this needs to be scripted as well...