From 7c0cb2d1c38cbf1259ffb43af2e683c28c4fdc90 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Mon, 11 Jun 2012 07:48:46 +0100 Subject: [PATCH] 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 --- lib/coder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/coder.js b/lib/coder.js index 0364c4b..7d5ce8d 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -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; },