goToLine now takes number as a param

You can optionally pass through a param to goToLine
It will go to this given line instead of textfield value
This makes it more usable via API calls
This commit is contained in:
Matt Pass
2012-06-11 07:48:46 +01:00
parent 229a089d45
commit 7c0cb2d1c3

View File

@@ -981,11 +981,11 @@ var ICEcoder = {
},
// Go to a specific line number
goToLine: function() {
goToLine: function(lineNo) {
var cM;
cM = ICEcoder.getcMInstance();
cM.setCursor(document.getElementById('goToLineNo').value-1);
cM.setCursor(lineNo ? lineNo-1 : document.getElementById('goToLineNo').value-1);
cM.focus();
return false;
},