From 006d8760c4fe620f854fbf7d5ca75cdb4838a6c8 Mon Sep 17 00:00:00 2001 From: Tarcisio Fedrizzi Date: Fri, 26 Feb 2016 08:01:44 +0100 Subject: [PATCH] Adds path checking to the multiline url heuristic --- qutebrowser/browser/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index faa5be6ee..44418864f 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -821,7 +821,8 @@ class CommandDispatcher: log.misc.debug("{} contained: '{}'".format(target, text.replace('\n', '\\n'))) text_urls = [u for u in text.split('\n') if u.strip()] - if len(text_urls) > 1 and not urlutils.is_url(text_urls[0]): + if len(text_urls) > 1 and not urlutils.is_url(text_urls[0]) \ + and urlutils.get_path_if_valid(text_urls[0], check_exists = True) is None: text_urls = [text] for i, text_url in enumerate(text_urls): if not window and i > 0: