rem: if (currentString.charAt(document.lastChar(currentLine - 1)) != '\\') 
add: if (currentString.charAt(document.lastCharPos(currentLine - 1)) != '\\') 
context: function inString(line){    var currentLine = line;    var currentString;    // go line up as long as the previous line ends with an escape character '\'    while (currentLine >= 0) {        currentString = document.line(currentLine -1 );        if (currentString.charAt(document.lastChar(currentLine - 1)) != '\\')            break;        --currentLine;    }    // iterate through all lines and toggle bool insideString everytime we hit a "    var insideString = false;    var indentation = "";    while (currentLine < line) {        currentString = document.line(currentLine);        var char1;        var i;        var lineLength = document.lineLength(currentLine);        for (i = 0; i < lineLength; ++i) {            char1 = currentString.charAt(i);            if (char1 == "\\") {                ++i;            } else if (char1 == "\"") {                insideString = !insideString;                if (insideString)                    indentation = currentString.substring(0, document.firstChar(currentLine) + 1);            }        }        ++currentLine;    }    return insideString ? indentation : -1;}
meta: 1078	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1078/cf2ffaa32d876fe8f95a098900ec8c956af8ab1e/script-indent-c-test.js/clean/kate/scripts/script-indent-c-test.js