[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_2_BRANCH: kdelibs/kate/part
From: Anders Lund <anders () alweb ! dk>
Date: 2004-04-21 21:23:06
Message-ID: 20040421212306.E28D999BF () office ! kde ! org
[Download RAW message or body]
CVS commit by alund:
Make cursorColumn() return the correct col when the cursor is not wrapped,
and is behind the line contents.
M +10 -0 kateview.cpp 1.333.2.5
M +1 -2 kateview.h 1.159.2.2
--- kdelibs/kate/part/kateview.cpp #1.333.2.4:1.333.2.5
@@ -1263,3 +1263,13 @@ void KateView::slotHlChanged()
updateFoldingConfig ();
}
+
+uint KateView::cursorColumn()
+{
+ uint r = m_doc->currentColumn(m_viewInternal->getCursor());
+ if ( !( m_doc->config()->configFlags() & KateDocumentConfig::cfWrapCursor ) &&
+ m_viewInternal->getCursor().col() > m_doc->textLine( \
m_viewInternal->getCursor().line() ).length() ) + r += \
m_viewInternal->getCursor().col() - m_doc->textLine( \
m_viewInternal->getCursor().line() ).length(); +
+ return r;
+}
// kate: space-indent on; indent-width 2; replace-tabs on;
--- kdelibs/kate/part/kateview.h #1.159.2.1:1.159.2.2
@@ -107,6 +107,5 @@ class KateView : public Kate::View,
uint cursorLine()
{ return m_viewInternal->getCursor().line(); }
- uint cursorColumn()
- { return m_doc->currentColumn(m_viewInternal->getCursor()); }
+ uint cursorColumn();
uint cursorColumnReal()
{ return m_viewInternal->getCursor().col(); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic