Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 14e2256

Browse files
author
mattpass
committed
Fixes and code tidying on interceptKeys
1 parent 1bc0ac1 commit 14e2256

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

assets/js/icecoder.js

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ var ICEcoder = {
14621462
if (this.caretLocType === "Content") {
14631463
searchPrefix = "";
14641464
}
1465-
window.open("http://www.google.com/#output=search&q=" + searchPrefix + thisCM.getSelection());
1465+
window.open("https://www.google.com/search?q=" + searchPrefix + thisCM.getSelection());
14661466
} else {
14671467
this.message(t['No text selected...']);
14681468
}
@@ -4692,7 +4692,7 @@ var ICEcoder = {
46924692
) {
46934693
if ("content" === area) {
46944694
switch(key) {
4695-
// d - TODO - not working
4695+
// d
46964696
case 68:
46974697
this.tagWrapper('div');
46984698
break;
@@ -4704,7 +4704,7 @@ var ICEcoder = {
47044704
case 80:
47054705
this.tagWrapper('p');
47064706
break;
4707-
// a - TODO - not working
4707+
// a
47084708
case 65:
47094709
this.tagWrapper('a');
47104710
break;
@@ -4729,7 +4729,7 @@ var ICEcoder = {
47294729
this.filesFrame.contentWindow.focus();
47304730
break;
47314731
default:
4732-
return key;
4732+
return key;
47334733
}
47344734
return false;
47354735
}
@@ -4757,10 +4757,7 @@ var ICEcoder = {
47574757
// CTRL/Cmd + F (Find next)
47584758
// and
47594759
// CTRL/Cmd + G (Find previous)
4760-
} else if (
4761-
-1 < [70, 71].indexOf(key) &&
4762-
true === ctrlOrCmd
4763-
) {
4760+
} else if (-1 < [70, 71].indexOf(key) && true === ctrlOrCmd) {
47644761
let find = get('find');
47654762
let selections = this.getThisCM().getSelections();
47664763
if (0 < selections.length){
@@ -4780,7 +4777,7 @@ var ICEcoder = {
47804777

47814778
// CTRL/Cmd+L (Go to line)
47824779
} else if (76 === key && true === ctrlOrCmd) {
4783-
var goToLineInput = get('goToLineNo');
4780+
let goToLineInput = get('goToLineNo');
47844781
goToLineInput.select();
47854782
// this is trick for Chrome - after you have used Ctrl-F once, when
47864783
// you try using Ctrl + F another time, for some reason Chrome still thinks,
@@ -4847,7 +4844,7 @@ var ICEcoder = {
48474844
return false;
48484845

48494846
// Enter (Expand dir/open file)
4850-
} else if(13 === key && "files" === area) {
4847+
} else if (13 === key && "files" === area) {
48514848
if (false === ctrlOrCmd) {
48524849
if (0 === this.selectedFiles.length) {
48534850
this.overFileFolder('folder', '|');
@@ -4857,9 +4854,9 @@ var ICEcoder = {
48574854
}
48584855
return false;
48594856

4860-
// Up/down/left/right arrows (Traverse files)
4861-
} else if(-1 < [37, 38, 39, 40].indexOf(key) && "files" === area) {
4862-
if(false === ctrlOrCmd) {
4857+
// Up/down/left/right arrows (traverse files)
4858+
} else if (-1 < [37, 38, 39, 40].indexOf(key) && "files" === area) {
4859+
if (false === ctrlOrCmd) {
48634860
if (0 === this.selectedFiles.length) {
48644861
this.overFileFolder('folder', '|');
48654862
this.selectFileFolder('init');
@@ -4869,22 +4866,22 @@ var ICEcoder = {
48694866
return false;
48704867

48714868
// CTRL/Cmd + O (Open Prompt)
4872-
} else if(79 === key && true === ctrlOrCmd) {
4869+
} else if (79 === key && true === ctrlOrCmd) {
48734870
this.openPrompt();
48744871
return false;
48754872

48764873
// CTRL/Cmd + space (Add snippet)
4877-
} else if(32 === key && true === ctrlOrCmd && "content" === area) {
4874+
} else if (32 === key && true === ctrlOrCmd && "content" === area) {
48784875
this.addSnippet();
48794876
return false;
48804877

48814878
// CTRL/Cmd + J (Jump to definition/back again)
4882-
} else if(74 === key && true === ctrlOrCmd && "content" === area) {
4879+
} else if (74 === key && true === ctrlOrCmd && "content" === area) {
48834880
this.jumpToDefinition();
48844881
return false;
48854882

4886-
// CTRL + Tab (Lock/Unlock file manager)
4887-
} else if(223 === key && true === ctrlOrCmd) {
4883+
// CTRL + ` (Lock/Unlock file manager)
4884+
} else if (223 === key && true === ctrlOrCmd) {
48884885
this.lockUnlockNav();
48894886
this.changeFilesW(true === this.lockedNav ? 'expand' : 'contract');
48904887
return false;

0 commit comments

Comments
 (0)