Created
September 28, 2010 13:02
-
-
Save hyagni/600940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// stop searching by hit Enter on search box | |
gFindBar.getElement("findbar-textbox") | |
.addEventListener("keypress", emacslike_search, false); | |
function emacslike_search(ev){ | |
if(ev.ctrlKey && ev.charCode == 115){ // C-s | |
gFindBar.onFindAgainCommand(false); | |
} | |
if(ev.keyCode == 13){ // Enter | |
gFindBar.onFindAgainCommand(true); | |
gFindBar.close(); | |
} | |
//TODO: save searching start point and back to it when searching is finished with C-g | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment