diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 7fad030..5c73b84 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -3106,7 +3106,20 @@ var ICEcoder = { // CTRL/Cmd+F (Find) } else if(key==70 && (evt.ctrlKey||top.ICEcoder.cmdKey)) { var find = top.get('find'); + cM = ICEcoder.getcMInstance(); + cMdiff = ICEcoder.getcMdiffInstance(); + thisCM = top.ICEcoder.editorFocusInstance.indexOf('diff') > -1 ? cMdiff : cM; + var selections = thisCM.getSelections(); + if (selections.length > 0){ + if (selections[0].length > 0){ + find.value = selections[0]; + } + } find.select(); + // this is trick for Chrome - after you have used Ctrl-F once, when + // you try using Ctrl-F another time, somewhy Chrome still thinks, + // that find has focus and refuses to give it focus second time. + top.get('goToLineNo').focus(); find.focus(); return false; diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index d645ebd..a4a297f 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -140,14 +140,14 @@ c).style.left=a>=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];c=[[],[],[],[]];for(var f=0;f