Bug 408619

Summary: Typing close parenthesis has no effect
Product: [Applications] kate Reporter: Matthew Woehlke <mwoehlke.floss>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Matthew Woehlke 2019-06-12 17:48:45 UTC
SUMMARY
Katepart suppresses closing brackets waaaaay too eagerly.

STEPS TO REPRODUCE
1. Type some text, e.g. 'return foo()'
2. Place the caret before the ')', i.e. 'return foo(|)' ('|' is the caret)
3. Type ')'

OBSERVED RESULT
Caret advances but no text is inserted.

EXPECTED RESULT
Resulting text is 'return foo()|)' ('|' is the caret).

SOFTWARE/OS VERSIONS
Katepart: 5.58.0
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.1

ADDITIONAL INFORMATION
Suppressing matching brackets (curly braces, square brackets, parentheses, etc.) makes sense *iff* the bracket was "just" automatically inserted. However, that suppression should stop as soon as the user adds a newline or moves the caret (other than by typing). The current behavior makes it really annoying to e.g. change 'return foo()' to 'return bar(foo())'.

Moreover, this happens with "enable automatic brackets" turned *off*.
Comment 1 Dominik Haumann 2019-06-12 21:11:42 UTC
Fixed with 5.59, unfortunately a regression that slipped in. Sorry.

*** This bug has been marked as a duplicate of bug 407852 ***
Comment 2 Matthew Woehlke 2019-06-12 21:22:00 UTC
Thanks... if it's fixed, I'm going to go pester downstream (Fedora), because it's fairly irritating :-).