From c75563907a2dcb513f458352e601e84b5b8db813 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 2 Oct 2014 06:06:08 +0200 Subject: [PATCH] Fix getting URL in :view-source. Fixes #128. --- 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 f47e29608..86226af04 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -762,8 +762,9 @@ class CommandDispatcher: formatter = pygments.formatters.HtmlFormatter( full=True, linenos='table') highlighted = pygments.highlight(html, lexer, formatter) + current_url = self._current_url() tab = objreg.get('tabbed-browser').tabopen(explicit=True) - tab.setHtml(highlighted, self._current_url()) + tab.setHtml(highlighted, current_url) tab.viewing_source = True @cmdutils.register(instance='command-dispatcher', name='help',