Merge branch 'develop' of https://github.com/kanikaa1234/qutebrowser into kanikaa1234-develop

This commit is contained in:
Florian Bruhin 2016-04-25 19:03:20 +02:00
commit d6c72c5821
3 changed files with 10 additions and 0 deletions

2
.gitignore vendored
View File

@ -1,4 +1,5 @@
__pycache__ __pycache__
*.py~
*.pyc *.pyc
*.swp *.swp
/build /build
@ -30,6 +31,7 @@ __pycache__
/.testmondata /.testmondata
/.hypothesis /.hypothesis
/prof /prof
/venv
TODO TODO
/scripts/testbrowser_cpp/Makefile /scripts/testbrowser_cpp/Makefile
/scripts/testbrowser_cpp/main.o /scripts/testbrowser_cpp/main.o

View File

@ -430,6 +430,8 @@ class CommandDispatcher:
new_url = urlutils.incdec_number(url, incdec, segments=segments) new_url = urlutils.incdec_number(url, incdec, segments=segments)
except urlutils.IncDecError as error: except urlutils.IncDecError as error:
raise cmdexc.CommandError(error.msg) raise cmdexc.CommandError(error.msg)
url.setFragment(None)
self._open(new_url, tab, background, window) self._open(new_url, tab, background, window)
def _navigate_up(self, url, tab, background, window): def _navigate_up(self, url, tab, background, window):
@ -446,6 +448,7 @@ class CommandDispatcher:
raise cmdexc.CommandError("Can't go up!") raise cmdexc.CommandError("Can't go up!")
new_path = posixpath.join(path, posixpath.pardir) new_path = posixpath.join(path, posixpath.pardir)
url.setPath(new_path) url.setPath(new_path)
url.setFragment(None)
self._open(url, tab, background, window) self._open(url, tab, background, window)
@cmdutils.register(instance='command-dispatcher', scope='window') @cmdutils.register(instance='command-dispatcher', scope='window')

View File

@ -38,6 +38,11 @@ Feature: Using :navigate
And I run :navigate next And I run :navigate next
Then the error "No forward links found!" should be shown Then the error "No forward links found!" should be shown
Scenario: Navigating to next page to a fragment
When I open data/navigate#fragment
And I run :navigate next
Then data/navigate/next.html should be loaded
# increment/decrement # increment/decrement
Scenario: Incrementing number in URL Scenario: Incrementing number in URL