Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populates vomnibar input with url ( Issue #2464) #2914

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pages/vomnibar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ class VomnibarUI
else if (key == "down" ||
(event.ctrlKey && (key == "j" || key == "n")))
return "down"
else if (event.ctrlKey && event.key == "Enter")
return "ctrlenter"
else if (event.key == "Enter")
return "enter"
else if KeyboardUtils.isBackspace event
Expand Down Expand Up @@ -181,6 +183,11 @@ class VomnibarUI
@update true
else
return true # Do not suppress event.
else if action == "ctrlenter"
if not @customSearchMode? and @selection >= 0
@previousInputValue ?= @input.value
@input.value = @completions[@selection]?.url
@input.scrollLeft = @input.scrollWidth

# It seems like we have to manually suppress the event here and still return true.
event.stopImmediatePropagation()
Expand Down