Bug 451542

Summary: Kate crashes when placing multicursor after the end of line in block selection mode
Product: [Applications] kate Reporter: Šimon (Simon) Rataj <ratajs>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: christoph
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Šimon (Simon) Rataj 2022-03-15 19:11:44 UTC
STEPS TO REPRODUCE
1. Build the latest Kate revision (d68b46d608da5ba994c692ce2ccbbc4d4d84dc86 for me; kdesrc-build kate)
2. Run it (kdesrc-run)
3. Turn block selection mode with Ctrl+Shift+B
4. Hold Alt and click beyond the end of line

OBSERVED RESULT
The Kate crashes:
ASSERT: "visibleLine >= 0" in file /home/ratajs/kde/src/ktexteditor/src/buffer/katetextfolding.cpp, line 326

EXPECTED RESULT
Another cursor should be created at the appropriate position.

SOFTWARE/OS VERSIONS
Linux: KDE neon 5.24 (kernel 5.13.0-35-generic)
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Comment 1 Waqar Ahmed 2022-03-16 03:59:27 UTC
Git commit 26752f904de6655ece78b38c60a338ec98660833 by Waqar Ahmed.
Committed on 16/03/2022 at 03:59.
Pushed by waqar into branch 'master'.

Disable multicursor in block selection mode

The two are mutually exclusive.

M  +10   -8    src/view/kateview.cpp
M  +7    -0    src/view/kateview.h

https://invent.kde.org/frameworks/ktexteditor/commit/26752f904de6655ece78b38c60a338ec98660833