Strip fragment and query only for :navigate up

This commit is contained in:
lyeoh 2018-11-03 12:36:19 -05:00
parent 08278138c4
commit 8c7c686d3f

View File

@ -636,7 +636,6 @@ class CommandDispatcher:
cmdutils.check_exclusive((tab, bg, window), 'tbw') cmdutils.check_exclusive((tab, bg, window), 'tbw')
widget = self._current_widget() widget = self._current_widget()
url = self._current_url() url = self._current_url()
url = url.adjusted(QUrl.RemoveFragment | QUrl.RemoveQuery)
handlers = { handlers = {
'prev': functools.partial(navigate.prevnext, prev=True), 'prev': functools.partial(navigate.prevnext, prev=True),
@ -654,6 +653,8 @@ class CommandDispatcher:
handler(browsertab=widget, win_id=self._win_id, baseurl=url, handler(browsertab=widget, win_id=self._win_id, baseurl=url,
tab=tab, background=bg, window=window) tab=tab, background=bg, window=window)
elif where in ['up', 'increment', 'decrement']: elif where in ['up', 'increment', 'decrement']:
if where is 'up':
url = url.adjusted(QUrl.RemoveFragment | QUrl.RemoveQuery)
new_url = handlers[where](url, count) new_url = handlers[where](url, count)
self._open(new_url, tab, bg, window, related=True) self._open(new_url, tab, bg, window, related=True)
else: # pragma: no cover else: # pragma: no cover