From b29fee817d4b8b91165f40b5aa14590bc28b8375 Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Wed, 4 May 2011 23:52:01 +0200 Subject: Action search autocomplete based on whole line Ignore-this: 869cf6954be97ea05cbcf7457ab430b7 The previous version autocompleted based on words, but when searching from web sites, it makes more sense to autocomplete based on the entire search. darcs-hash:20110504215201-af521-b8d9ca7727b8ec3aa4593cd9c8caaa664e2c3af8.gz --- XMonad/Actions/Search.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'XMonad/Actions') diff --git a/XMonad/Actions/Search.hs b/XMonad/Actions/Search.hs index 98d2133..535edf3 100644 --- a/XMonad/Actions/Search.hs +++ b/XMonad/Actions/Search.hs @@ -61,7 +61,7 @@ import Data.Char (isAlphaNum, isAscii) import Data.List (isPrefixOf) import Text.Printf import XMonad (X(), MonadIO, liftIO) -import XMonad.Prompt (XPrompt(showXPrompt), mkXPrompt, XPConfig(), historyCompletionP) +import XMonad.Prompt (XPrompt(showXPrompt, nextCompletion, commandToComplete), mkXPrompt, XPConfig(), historyCompletionP, getNextCompletion) import XMonad.Prompt.Shell (getBrowser) import XMonad.Util.Run (safeSpawn) import XMonad.Util.XSelection (getSelection) @@ -199,6 +199,8 @@ Happy searching! -} data Search = Search Name instance XPrompt Search where showXPrompt (Search name)= "Search [" ++ name ++ "]: " + nextCompletion _ = getNextCompletion + commandToComplete _ c = c -- | Escape the search string so search engines understand it. Only -- digits and ASCII letters are not encoded. All non ASCII characters -- cgit v1.2.3