aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2019-04-14 17:39:53 +0900
committerDevine Lu Linvega <[email protected]>2019-04-14 17:39:53 +0900
commit6a88456884b2e165f0e4f74a5194090f606c5245 (patch)
tree17401b4b016674c36ed0a2b1da72584e53560f32
parent4a67ccd0321c64e665df9b63ee35879ab72125a3 (diff)
downloadOrca-6a88456884b2e165f0e4f74a5194090f606c5245.tar.gz
Orca-6a88456884b2e165f0e4f74a5194090f606c5245.zip
Press / to autofill goto:
-rw-r--r--desktop/sources/index.html1
-rw-r--r--desktop/sources/scripts/commander.js4
2 files changed, 3 insertions, 2 deletions
diff --git a/desktop/sources/index.html b/desktop/sources/index.html
index c984cd7..7437182 100644
--- a/desktop/sources/index.html
+++ b/desktop/sources/index.html
@@ -35,6 +35,7 @@
terminal.controller.add("default","Edit","Paste Selection",() => { terminal.cursor.paste() },"CmdOrCtrl+V")
terminal.controller.add("default","Edit","Toggle Insert Mode",() => { terminal.cursor.toggleMode(1) },"CmdOrCtrl+I")
terminal.controller.add("default","Edit","Block Comment",() => { terminal.cursor.comment() },"CmdOrCtrl+/")
+ terminal.controller.add("default","Edit","Goto",() => { terminal.commander.start('goto:') },"/")
terminal.controller.add("default","Edit","Undo",() => { terminal.history.undo() },"CmdOrCtrl+Z")
terminal.controller.add("default","Edit","Redo",() => { terminal.history.redo() },"CmdOrCtrl+Shift+Z")
diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js
index 5657fc1..2b72011 100644
--- a/desktop/sources/scripts/commander.js
+++ b/desktop/sources/scripts/commander.js
@@ -6,9 +6,9 @@ function Commander (terminal) {
this.isActive = false
this.query = ''
- this.start = function () {
+ this.start = function (q = '') {
this.isActive = true
- this.query = ''
+ this.query = q
terminal.update()
}