Update of /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui/internal
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8517/src_dltk_console/org/python/pydev/dltk/console/ui/internal
Modified Files:
ScriptConsoleDocumentListener.java
Log Message:
<li><strong>Console</strong>: When a parenthesis was being entered, the text to the end of the line was being deleted</li>
Index: ScriptConsoleDocumentListener.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui/internal/ScriptConsoleDocumentListener.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ScriptConsoleDocumentListener.java 3 May 2008 13:20:11 -0000 1.11
--- ScriptConsoleDocumentListener.java 9 Jul 2008 19:11:34 -0000 1.12
***************
*** 414,423 ****
String newText = text.substring(start, text.length());
if(addedParen){
! Document parenDoc = new Document(getCommandLine()+"(");
! int currentOffset = parenDoc.getLength();
DocCmd docCmd = new DocCmd(currentOffset, 0, "(");
docCmd.shiftsCaret = true;
strategy.customizeParenthesis(parenDoc, docCmd);
! newText = docCmd.text;
if(!docCmd.shiftsCaret){
shiftsCaret = false;
--- 414,424 ----
String newText = text.substring(start, text.length());
if(addedParen){
! String cmdLine = getCommandLine();
! Document parenDoc = new Document(cmdLine+newText);
! int currentOffset = cmdLine.length()+1;
DocCmd docCmd = new DocCmd(currentOffset, 0, "(");
docCmd.shiftsCaret = true;
strategy.customizeParenthesis(parenDoc, docCmd);
! newText = docCmd.text+newText.substring(1);
if(!docCmd.shiftsCaret){
shiftsCaret = false;
|