Don't raise cmdexc.CommandError in :open

:open can be called via :edit-url async, so we need to use message.error
by hand there.
This commit is contained in:
Florian Bruhin 2016-04-06 06:46:42 +02:00
parent 776c4c4400
commit c4878bb7ed

View File

@ -248,7 +248,10 @@ class CommandDispatcher:
try:
url = urlutils.fuzzy_url(url)
except urlutils.InvalidUrlError as e:
raise cmdexc.CommandError(e)
# We don't use cmdexc.CommandError here as this can be called
# async from edit_url
message.error(self._win_id, str(e))
return
if tab or bg or window:
self._open(url, tab, bg, window)
else: