Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1992/src/org/python/pydev/editor/autoedit
Modified Files:
PyAutoIndentStrategy.java
Log Message:
Minors: ParsingUtils accepts null instead of buffer (so, objects that don't need the actual values can just use it to skip comments, parenthesis, etc).
Index: PyAutoIndentStrategy.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit/PyAutoIndentStrategy.java,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** PyAutoIndentStrategy.java 14 Jun 2008 22:14:57 -0000 1.68
--- PyAutoIndentStrategy.java 15 Jun 2008 16:45:26 -0000 1.69
***************
*** 764,768 ****
char peer = DocUtils.getPeer(c);
! StringBuffer doc = new StringBuffer(document.get());
//it is not enough just counting the chars, we have to ignore those that are within comments or literals.
ParsingUtils.removeCommentsWhitespacesAndLiterals(doc);
--- 764,768 ----
char peer = DocUtils.getPeer(c);
! FastStringBuffer doc = new FastStringBuffer(document.get(), 2);
//it is not enough just counting the chars, we have to ignore those that are within comments or literals.
ParsingUtils.removeCommentsWhitespacesAndLiterals(doc);
|