From 6a97f4cf5e1f1c21336d2fce9da20c3bc5633d05 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 29 May 2015 14:20:19 +0100 Subject: Prepopulate @customSearchMode in vomnibar. This avoids a flicker whereby the keyword is first inserted into the input, then removed. --- pages/vomnibar.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pages') diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee index 71f22900..d5659fdc 100644 --- a/pages/vomnibar.coffee +++ b/pages/vomnibar.coffee @@ -17,6 +17,7 @@ Vomnibar = query: "" newTab: false selectFirst: false + keyword: null extend options, userOptions extend options, refreshInterval: if options.completer == "omni" then 150 else 0 @@ -28,6 +29,7 @@ Vomnibar = @vomnibarUI.setRefreshInterval options.refreshInterval @vomnibarUI.setForceNewTab options.newTab @vomnibarUI.setQuery options.query + @vomnibarUI.setKeyword options.keyword @vomnibarUI.update true hide: -> @vomnibarUI?.hide() @@ -40,6 +42,7 @@ class VomnibarUI @initDom() setQuery: (query) -> @input.value = query + setKeyword: (keyword) -> @customSearchMode = keyword setInitialSelectionValue: (@initialSelectionValue) -> setRefreshInterval: (@refreshInterval) -> setForceNewTab: (@forceNewTab) -> -- cgit v1.2.3