rem: indentation = indentString(g50spaces.substring(0, document.firstCharPosVirtual(currentLine))); 
add: indentation = indentString(document.firstCharPosVirtual(currentLine)); 
context: function findOpeningBrace(line, column){    var currentLine = line;    var count = 1;    var firstPos;    var lastPos;    var currentString;    var firstChar;    var lastChar;    var indentation = -1;    // note: no delimiter in this case, yet    while (currentLine > 0 && count > 0) {        --currentLine;        firstPos = document.firstCharPos(currentLine);        // skip empty lines        if (firstPos == -1)            continue;         currentString = document.line(currentLine);        firstChar = currentString.charAt(firstPos);        // idea: ignore // and c comments and also preprocessor        if (firstChar != '/' && firstChar != '*' && firstChar != '#') {            var braces = currentString.replace(/[^{}]+/g, "");            var i;            for (i = braces.length - 1; i >= 0; --i) {                var currentChar = braces.charAt(i);                if (currentChar == '{' ) {                    --count;                    if (count == 0)                        break;                } else {                    ++count;                }            }        }    }    if (count == 0)    {        debug("found matching { in line: " + currentLine);        indentation = indentString(g50spaces.substring(0, document.firstCharPosVirtual(currentLine)));    }    if (indentation != -1) debug("findOpeningBrace: success");    return indentation;}
meta: 1078	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1078/7cad0c927379ef77bee60890e6b74abb2b5075dd/script-indent-c-test.js/buggy/kate/scripts/script-indent-c-test.js