| Summary: | Add a mini view of the line containing the matching opening bracket to aid in determining what a closing bracket actually closes | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Jan Paul Batrina <jpmbatrina01> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 19.04.0 | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Zip file containing GIF recordings showing the bracket matching visualization behavior of kate and arduino
Arduino visual bracket matching Kate bracket matching |
||
Created attachment 124502 [details]
Arduino visual bracket matching
Created attachment 124503 [details]
Kate bracket matching
Resolved by https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/6. Thanks for merging! |
Created attachment 120039 [details] Zip file containing GIF recordings showing the bracket matching visualization behavior of kate and arduino SUMMARY The Arduino IDE has a nifty feature coupled with bracket matching. If the matching bracket is out of view (e.g. The opening bracket is on the first line of the file, and the closing bracket is at line 250 of the file), a mini view of the line with the matching opening bracket is displayed to aid in figuring out what function or section of code is closed by the closing bracket. This helps especially in nested if/while/switch statements. From a quick scan of the settings in Kate 19.04.0, such functionality is currently not offered. (GIF recordings of the two different behaviors described are attached to help in illustrating the use case) This might only be useful with the coding convention of keeping the opening bracket inline with the function signature declaration, but it still would be useful for the nested brackets use case, and maybe an option to increase the number of lines to include in the mini view can make the feature useful for other conventions. STEPS TO REPRODUCE 1. Create a new cpp file containing an empty main declaration with enough newline between the opening and closing bracket such that they do not fit on the screen at the same time 2. Scroll all the way to the closing bracket and put the cursor on the closing bracket to trigger bracket matching OBSERVED RESULT The range covered by the brackets is highlighted and the matching brackets are emphasized (Both happen if configured to do so in the settings), but the emphasis of the opening bracket is out of view so the start of the range is effectively unknown EXPECTED RESULT A mini view shows the line (or n additional lines before) where the matching opening bracket is to show what the closing bracket the cursor is at is actually matching SOFTWARE/OS VERSIONS Linux: Manjaro 18.0.2 64-bit KDE Plasma Version: 15.14.4 KDE Frameworks Version: 5.53.0 Qt Version: 5.12.0