diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 2986b5c..1e392ec 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1844,8 +1844,9 @@ var ICEcoder = { else if (key==46) {top.ICEcoder.delKeyDown = false} }, + // Add snippet panel below line addSnippet: function() { - var cM; + var cM, lineNo, whiteSpace, content; if (top.ICEcoder.snippetLine!==false) { top.ICEcoder.removeSnippet(); @@ -1869,8 +1870,9 @@ var ICEcoder = { } }, + // Action a snippet doSnippet: function(tgtString,replaceString) { - var cM, lineNo, lineContents, replacedLine; + var cM, lineNo, lineContents, remainder, strPos, replacedLine, whiteSpace, curPos, sPos, lineNoCount; cM = top.ICEcoder.getcMInstance(); lineNo = cM.getCursor().line; @@ -1887,20 +1889,21 @@ var ICEcoder = { replacedLine += replaceString; curPos = replacedLine.indexOf("CURSOR"); sPos = 0; - lineNo2 = lineNo; + lineNoCount = lineNo; for (i=0;i