Bug 216383

Summary: auto brackets overwriting existing brackets
Product: [Applications] kate Reporter: ruediger.eichler
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

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...