rem: var firstPos = document.firstChar(currentLine); indentation = incIndent(currentString.substring(0, firstPos)); 
add: var firstPosVirtual = document.firstCharPosVirtual(currentLine); indentation = incIndent(g50spaces.substring(0, firstPosVirtual)); 
context: function tryCKeywords(line){    var currentLine = line - 1;    if (currentLine < 0)        return -1;    var lastPos = -1;    var lineDelimiter = gLineDelimiter;    // search non-empty line    while (currentLine >= 0 && lineDelimiter > 0) {        lastPos = document.lastChar(currentLine);        if (lastPos != -1) {            break;        }        --currentLine;        --lineDelimiter;    }    if (lastPos == -1)        return -1;    // found non-empty line    var currentString = document.line(currentLine);    if (currentString.search(/^\s*(if|for|do|while|switch|[}]?\s*else)/) == -1)        return -1;//    var firstWord = RegExp.$1;//    debug("Found first word: " + firstWord);    var lastChar = currentString.charAt(lastPos);    var indentation = -1;    if (lastChar != ';') {        // take its indentation and add one indentation level        var firstPos = document.firstChar(currentLine);        indentation = incIndent(currentString.substring(0, firstPos));    }    return indentation;}
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