File patch-r897692.diff of Package kdelibs4
Subject: kate: don't move the cursor if cursor wrapping is off
From: wstephenson@suse.de
Bug:
Patch-upstream: 897692
--- kate/view/kateview.cpp (revision 897691)
+++ kate/view/kateview.cpp (revision 897692)
@@ -1896,8 +1896,9 @@ bool KateView::setBlockSelectionMode (bo
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())))
+ // line, move the cursor to the last column of the current line unless cursor wrapping is off
+ if(!blockSelectionMode() && !wrapCursor() &&
+ (c.isValid() || c.column() > m_doc->lineLength(c.line())))
{
KTextEditor::Cursor cursorAtEndOfLine(cursorPosition());
cursorAtEndOfLine.setColumn(m_doc->kateTextLine(cursorPosition().line())->length());
Index: kate/view/kateview.cpp
===================================================================