From 7da6faa7af7a81c2d20960db9670aa7306828685 Mon Sep 17 00:00:00 2001 From: Tarcisio Fedrizzi Date: Mon, 16 May 2016 18:19:33 +0200 Subject: [PATCH] Changes fuzzy_url to force search even when paths are passed --- qutebrowser/utils/urlutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index c97d66a4c..5ea1c61b3 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -168,7 +168,7 @@ def fuzzy_url(urlstr, cwd=None, relative=False, do_search=True, relative: Whether to resolve relative files. do_search: Whether to perform a search on non-URLs. force_search: Whether to force a search even if the content can be - interpreted as an URL. + interpreted as an URL or a path. Return: A target QUrl to a search page or the original URL. @@ -177,7 +177,7 @@ def fuzzy_url(urlstr, cwd=None, relative=False, do_search=True, path = get_path_if_valid(urlstr, cwd=cwd, relative=relative, check_exists=True) - if path is not None: + if not force_search and path is not None: url = QUrl.fromLocalFile(path) elif force_search or (do_search and not is_url(urlstr)): # probably a search term