[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kate/view
From: Pascal Létourneau <pascal.letourneau () gmail ! com>
Date: 2010-10-25 21:53:13
Message-ID: 20101025215313.D4B98AC897 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1189777 by pletourn:
Move the cursor to start of the line after copying it
Simplify code
BUG:251350
M +2 -5 kateview.cpp
--- trunk/KDE/kdelibs/kate/view/kateview.cpp #1189776:1189777
@@ -1918,11 +1918,8 @@
if (!selection()) {
if (!m_config->smartCopyCut())
return;
- int line = m_viewInternal->m_cursor.line();
- if ( line+1 >= m_doc->lines() )
- text = m_doc->text(KTextEditor::Range(line, 0, line, m_doc->lineLength(line)));
- else
- text = m_doc->text(KTextEditor::Range(line, 0, line+1, 0));
+ text = m_doc->line(m_viewInternal->m_cursor.line()) + '\n';
+ m_viewInternal->moveEdge(KateViewInternal::left, false);
}
QApplication::clipboard()->setText(text);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic