mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-24 09:17:06 +01:00
Can pass charNo (int) and noFocus (bool)
This commit is contained in:
@@ -1102,10 +1102,11 @@ var ICEcoder = {
|
||||
},
|
||||
|
||||
// Go to a specific line number
|
||||
goToLine: function(lineNo) {
|
||||
goToLine: function(lineNo, charNo, noFocus) {
|
||||
var cM, cMdiff, thisCM;
|
||||
|
||||
lineNo = lineNo ? lineNo-1 : top.get('goToLineNo').value-1;
|
||||
charNo = charNo ? charNo : 0;
|
||||
|
||||
cM = ICEcoder.getcMInstance();
|
||||
cMdiff = ICEcoder.getcMdiffInstance();
|
||||
@@ -1127,10 +1128,12 @@ var ICEcoder = {
|
||||
}
|
||||
},10);
|
||||
|
||||
thisCM.setCursor(lineNo);
|
||||
top.ICEcoder.focus();
|
||||
// Also do this after a 0ms tickover incase DOM wasn't ready
|
||||
setTimeout(function(){top.ICEcoder.focus();},0);
|
||||
thisCM.setCursor(lineNo, charNo);
|
||||
if (!noFocus) {
|
||||
top.ICEcoder.focus();
|
||||
// Also do this after a 0ms tickover incase DOM wasn't ready
|
||||
setTimeout(function(){top.ICEcoder.focus();},0);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user