mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
X.Prompt: fix selection not entering history
When `alwaysHighlight` is enabled and one immediately presses (by default) Return after opening the prompt (because the highlighted completion is what one wants) then the selection will not enter the prompt history. Instead, an empty string will be entered because there hasn't been any input yet and hence the `highlightedCompl` field has not yet been filled in. The fix is simply checking whether `alwaysHighlight` is set during startup and, if yes, already setting the highlighted completion to the first suggestion.
This commit is contained in:
parent
d7ad486a6e
commit
828983060d
@ -611,6 +611,10 @@ runXP st = do
|
||||
(\status ->
|
||||
execStateT
|
||||
(when (status == grabSuccess) $ do
|
||||
ah <- gets (alwaysHighlight . config)
|
||||
when ah $ do
|
||||
compl <- listToMaybe <$> getCompletions
|
||||
modify' $ \xpst -> xpst{ highlightedCompl = compl }
|
||||
updateWindows
|
||||
eventLoop handleMain evDefaultStop)
|
||||
st
|
||||
|
Loading…
x
Reference in New Issue
Block a user