Editor: use visible code box for 'find' when focused one is offscreen

This commit is contained in:
tophf 2015-05-09 23:40:49 +03:00
parent 532662672f
commit 932ffa80fe

View File

@ -548,6 +548,12 @@ function setupGlobalSearch() {
} }
function find(activeCM) { function find(activeCM) {
editors.lastActive = activeCM;
var cm = getEditorInSight();
if (cm != activeCM) {
cm.focus();
activeCM = cm;
}
var originalOpenDialog = activeCM.openDialog; var originalOpenDialog = activeCM.openDialog;
activeCM.openDialog = function(template, callback, options) { activeCM.openDialog = function(template, callback, options) {
originalOpenDialog.call(activeCM, findTemplate, function(query) { originalOpenDialog.call(activeCM, findTemplate, function(query) {