[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: #73896: how to access configuration settings?
From: "Daniel Franke" <daniel.franke () imbs ! uni-luebeck ! de>
Date: 2004-04-24 5:35:55
Message-ID: 32847.68.76.82.253.1082784955.squirrel () webmail ! uni-luebeck ! de
[Download RAW message or body]
http://bugs.kde.org/show_bug.cgi?id=73896
Hi all,
it's a minor bug, but still I feel I want to fix it :)
In
lib/cppparser/lexer.h:500: inline void Lexer::nextChar()
one would need access to the tabwidth-setting of the current editor to
ensure correct column count.
Are the configuration-settings accessable from cppparser?
If yes, which would be the right way to query them?
Thnx for hints.
Cheers
Daniel
P.S. The name of a global object or classname/method would most likely be
sufficient :)
---
My changes so far ...
Index: lexer.h
===================================================================
RCS file: /home/kde/kdevelop/lib/cppparser/lexer.h,v
retrieving revision 1.17
diff -u -r1.17 lexer.h
--- lexer.h 9 Feb 2004 18:29:43 -0000 1.17
+++ lexer.h 24 Apr 2004 05:12:37 -0000
@@ -500,13 +500,17 @@
inline void Lexer::nextChar()
{
- if(m_source[m_ptr++] == '\n') {
+ if(m_source[m_ptr] == '\n') {
++m_currentLine;
m_currentColumn = 0;
m_startLine = true;
+ } else if (m_source[m_ptr] == '\t') {
+ m_currentColumn += 8; // @todo insert tabwidth here
} else {
++m_currentColumn;
}
+
+ ++m_ptr;
}
inline void Lexer::nextChar( int n )
_______________________________________________
Kdevelop-devel mailing list
Kdevelop-devel@barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic