diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 1e392ec..746ab88 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -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)!="#"