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

List:       kde-commits
Subject:    KDE/kdelibs/kate/jscript/data
From:       Paul Giannaros <ceruleanblaze () gmail ! com>
Date:       2008-04-05 13:11:37
Message-ID: 1207401097.654903.19602.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 793854 by giannaros:

Indent scripts receive odd calls to indent if triggerChars is not set,
causing problems if the user has just indented/unindented prior to the
call.
Setting it to an empty string makes things work OK.


 M  +4 -4      python.js  


--- trunk/KDE/kdelibs/kate/jscript/data/python.js #793853:793854
@@ -43,8 +43,7 @@
     debug("\u001B[34m" + s + "\u001B[0m");
 }
 
-// XX forget for now
-// var triggerCharacters = "}]";
+var triggerCharacters = "";
 
 // General notes:
 // indent() returns the amount of characters (in spaces) to be indented.
@@ -54,7 +53,7 @@
 
 function indent(line, indentWidth, character) {
 //     dbg(document.attribute.toString());
-//     dbg("character: " + character);
+    dbg("indent character: " + character);
 //     dbg("line text: " + document.line(line));
     var currentLine = document.line(line);
     var lastLine = document.line(line - 1);
@@ -67,7 +66,7 @@
     var lastLetterType = document.attribute(line - 1, document.lineLength(line - 1) \
- 1);  // 19 = docstring or comment, 20 = string
     if((lastLetterType == 19 || lastLetterType == 20) && lastCharacter != "\"" && \
                lastCharacter != "'") {
-//         dbg("attributes that we don't want! Returning");
+        dbg("attributes that we don't want! Returning");
         return -1;
     }
     // otherwise, check the line contents
@@ -102,6 +101,7 @@
         dbg('unindenting line for keyword');
         return Math.max(0, document.firstVirtualColumn(line - 1) - indentWidth);
     }
+    dbg('continuing with regular indent');
     return -1;
 }
 


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

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