XPrompt: catch exceptions when running the completion function

This commit is contained in:
Andrea Rossato
2007-10-26 21:18:59 +00:00
parent eda311fa78
commit 2b4179169b

View File

@@ -446,7 +446,8 @@ printPrompt drw = do
getCompletions :: XP [String]
getCompletions = do
s <- get
io $ (completionFunction s) (getLastWord $ command s)
io $ ((completionFunction s) (getLastWord $ command s)
`catch` \_ -> return [])
setComplWin :: Window -> ComplWindowDim -> XP ()
setComplWin w wi =