[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kate] part/document: reuse identical Kate::TextLine::at() code
From:       Dominik Haumann <dhdev () gmx ! de>
Date:       2012-07-02 13:33:30
Message-ID: 20120702133330.E2241A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 4b98b379915214ba8ff56066af37a9769cab07ef by Dominik Haumann.
Committed on 02/07/2012 at 14:29.
Pushed by dhaumann into branch 'master'.

reuse identical Kate::TextLine::at() code

M  +1    -4    part/document/katedocument.cpp

http://commits.kde.org/kate/4b98b379915214ba8ff56066af37a9769cab07ef

diff --git a/part/document/katedocument.cpp b/part/document/katedocument.cpp
index 5d2189c..266564b 100644
--- a/part/document/katedocument.cpp
+++ b/part/document/katedocument.cpp
@@ -428,10 +428,7 @@ QChar KateDocument::character( const KTextEditor::Cursor & position ) const
   if ( !textLine )
     return QChar();
 
-  if (position.column() >= 0 && position.column() < textLine->string().length())
-    return textLine->string().at(position.column());
-
-  return QChar();
+  return textLine->at(position.column());
 }
 
 QStringList KateDocument::textLines( const KTextEditor::Range & range, bool blockwise ) const

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic