SUMMARY The second "Go to matching bracket" command should return us to the first bracket. This is so in Insert mode. However, in Overwrite mode, the second command doesn't return us to the first bracket. The problem is that "Go to matching bracket" command moves the cursor to the position next to closing bracket. In insert mode, Kate sees the bracket when the caret is moved right after the bracket. But, in Overwrite mode, Kate sees the bracket only in the caret position. I believe, in order to correct this error, in Overwrite mode, "bracket matching" should move the caret to the position of the bracket for both, the opening and closing brackets. STEPS TO REPRODUCE 1. Switch to Overwrite mode 2. Place the cursor to an opening bracket. Press Ctrl+6 (Go to matching bracket) The cursor will be placed right after the matching bracket. 3. Press again Ctrl+6 OBSERVED RESULT The cursor will stay on the same position, behind the matching bracket. EXPECTED RESULT Perform the same sequence of commands in Insert mode. The cursor will be placed in position of the first bracket. SOFTWARE/OS VERSIONS Linux/Ubuntu Gnome. (available in About System) ADDITIONAL INFORMATION
Git commit 1e0ace28c795cbe5e88bc1f31ea37a250cd110b0 by Dominik Haumann. Committed on 15/01/2019 at 17:28. Pushed by dhaumann into branch 'master'. ViewInternal: Fix 'Go to matching bracket' in override mode Summary: BUG: 402594 Reviewers: #ktexteditor, dhaumann Reviewed By: #ktexteditor, dhaumann Subscribers: dhaumann, kwrite-devel, kde-frameworks-devel, #ktexteditor Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D17852 M +37 -0 autotests/src/kateview_test.cpp M +1 -0 autotests/src/kateview_test.h M +4 -0 src/view/kateviewinternal.cpp https://commits.kde.org/ktexteditor/1e0ace28c795cbe5e88bc1f31ea37a250cd110b0