Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
kdelibs4
patch-r897682.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File patch-r897682.diff of Package kdelibs4
Subject: Fix kate crash when leaving block select mode From: wstephenson@suse.de Bug: kde#177905 Patch-upstream: 897682 --- kate/view/kateview.cpp (revision 897681) +++ kate/view/kateview.cpp (revision 897682) @@ -1893,11 +1893,15 @@ bool KateView::setBlockSelectionMode (bo m_toggleBlockSelection->setChecked( blockSelectionMode() ); - if(!blockSelectionMode() && !m_viewInternal->getCursor().isValid()) + KTextEditor::Cursor c = m_viewInternal->getCursor(); + + // when leaving block selection mode, if cursor is at an invalid position or past the end of the + // line, move the cursor to the last column of the current line + if(!blockSelectionMode() && (c.isValid() || c.column() > m_doc->lineLength(c.line()))) { - KTextEditor::Cursor cursorAtEndOfLine(cursorPosition()); - cursorAtEndOfLine.setColumn(m_doc->kateTextLine(cursorPosition().line())->length()); - setCursorPosition(cursorAtEndOfLine); + KTextEditor::Cursor cursorAtEndOfLine(cursorPosition()); + cursorAtEndOfLine.setColumn(m_doc->kateTextLine(cursorPosition().line())->length()); + setCursorPosition(cursorAtEndOfLine); } } Index: kate/view/kateview.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor