No need for space var, lCLen-4 not 3

This commit is contained in:
Matt Pass
2012-12-27 17:56:47 +00:00
parent dd19c39cf8
commit f181cef9e9

View File

@@ -234,7 +234,7 @@ var ICEcoder = {
// Comment or uncomment line on keypress
lineCommentToggle: function() {
var cM, cursorPos, linePos, lineContent, lCLen, adjustCursor, startLine, endLine, space;
var cM, cursorPos, linePos, lineContent, lCLen, adjustCursor, startLine, endLine;
cM = ICEcoder.getcMInstance();
cursorPos = cM.getCursor().ch;
@@ -262,7 +262,7 @@ var ICEcoder = {
if (["CoffeeScript","CSS"].indexOf(ICEcoder.caretLocType)>-1) {
cM.setLine(linePos, lineContent.slice(0,2)!="/*"
? "/*" + lineContent + "*/"
: lineContent.slice(2,lCLen).slice(0,lCLen-3));
: lineContent.slice(2,lCLen).slice(0,lCLen-4));
if (lineContent.slice(0,2)=="/*") {adjustCursor = -adjustCursor};
} else if (ICEcoder.caretLocType=="Ruby") {
cM.setLine(linePos, lineContent.slice(0,1)!="#"