Bug 407852 - Ktexteditor overwrites closing bracket even if automatic brackets is not enabled
Summary: Ktexteditor overwrites closing bracket even if automatic brackets is not enabled
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.58.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 408100 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-23 05:00 UTC by Kishore Gopalakrishnan
Modified: 2019-06-12 21:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.59
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2019-05-23 05:00:55 UTC
SUMMARY
Applications that use ktexteditor overwrite the closing bracket even when auto-bracketing is not enabled.

STEPS TO REPRODUCE
1. Open Kile or Kate
2. Check that automatic brackets is disabled (In Kate, Settings > Editing > uncheck 'Enable Automatic Brackets')
2. Type 'a()' (without quotes)
3. Place cursor inside the bracket
4. Type '()' (without quotes)

OBSERVED RESULT
It simply skips the outer bracket as if you're typing to get out of an autocompleted bracket. The resulting entered text is 'a(()' (without quotes).


EXPECTED RESULT
It should enter 'a(())' (without quotes) as typed. Current behaviour is disruptive and leads to unmatched brackets may be difficult to notice after the fact.

SOFTWARE/OS VERSIONS
Linux distro: Arch Linux
KDE Plasma Version: 5.15.90
KDE Frameworks Version: 5.58.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION
Downgrading ktexteditor to 5.57.0 fixes the issue (i.e. it shows the expected behaviour).
The issue can be reproduced for '{}' and '[]' brackets too.
Possibly related to https://bugs.kde.org/show_bug.cgi?id=368580
Possible duplicate of https://bugs.kde.org/show_bug.cgi?id=318267 (Note that that bug is from 2013, while the current bug is a regression in the current frameworks release.)
Comment 1 Dominik Haumann 2019-05-23 07:14:02 UTC
Fixed with next KF5 release 5.59.

See: https://phabricator.kde.org/D19608
See: https://cgit.kde.org/ktexteditor.git/commit/?id=df555c9b2e572b9c8dd3de872e0b090b8ae7aaa3
Comment 2 Dominik Haumann 2019-06-01 16:04:21 UTC
*** Bug 408100 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Haumann 2019-06-12 21:11:42 UTC
*** Bug 408619 has been marked as a duplicate of this bug. ***