Bug 372486 - kate/kwrite bracket highlight off by 1 set - highlights previous open instead of current
Summary: kate/kwrite bracket highlight off by 1 set - highlights previous open instead...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 16.08
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-14 22:29 UTC by David Rankin
Modified: 2019-07-14 00:30 UTC (History)
2 users (show)

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


Attachments
Screenshot of Proper Bracket Highlight of Enclosed Parenthetical (9.72 KB, image/png)
2016-11-14 22:29 UTC, David Rankin
Details
Screenshot of Improper Bracket Highlight in Ver. 16.08.3 (15.58 KB, image/png)
2016-11-14 22:32 UTC, David Rankin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Rankin 2016-11-14 22:29:46 UTC
Created attachment 102240 [details]
Screenshot of Proper Bracket Highlight of Enclosed Parenthetical

kate/kwrite ver. 16.08.3.

The bracket highlight in kate/kwrite highlights the previous set's opening bracket instead of the opening for the current bracket set. Take for example the following C code (with the cursor position denoted by the pipe '|'):

    if (!(pp = popen (cmd, "r")|)) {

In all previous versions of kate/kwrite the open parenthesis '(' before command would be highlighted by bracket highlight to show the closing parenthesis just typed would be closing the set related to the 'popen' command, e.g.

    popen (cmd, "r")

This is the expected behavior. A screenshot is attached showing the expected proper highlighting as it currently works in k3 kwrite.

Inexplicably, the bracket highlight in version 16.08.3 highlights the opening parenthesis before the assignment when the cursor is in the position shown. This is unexpected behavior and horribly distracting as the highlight should not display until the closing parenthesis is on the left of the current insertion point -- not to the right of the insertion point.
Comment 1 David Rankin 2016-11-14 22:32:51 UTC
Created attachment 102241 [details]
Screenshot of Improper Bracket Highlight in Ver. 16.08.3

Screenshot showing improper activation of preceding bracket set for assignment of 'pp' when cursor is at the bracket closing position for the 'popen' command.
Comment 2 Christoph Cullmann 2019-07-14 00:30:57 UTC
Works for me with 19.04 and master.