Fix getting URL in :view-source.

Fixes #128.
This commit is contained in:
Florian Bruhin 2014-10-02 06:06:08 +02:00
parent 8b9822e603
commit c75563907a

View File

@ -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',