summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2016-04-25 19:03:20 +0200
committerFlorian Bruhin <git@the-compiler.org>2016-04-25 19:03:20 +0200
commitd6c72c5821967451a980628c6b120f76dcecb67f (patch)
tree998f1405a3797400d627e55fd4177eca034c72e9
parent6349c00c72edf8e2a85268f1a44d34658c066465 (diff)
parent22ad416f352065a4ab58bd2c9dc3988877feedc9 (diff)
downloadqutebrowser-d6c72c5821967451a980628c6b120f76dcecb67f.tar.gz
qutebrowser-d6c72c5821967451a980628c6b120f76dcecb67f.zip
Merge branch 'develop' of https://github.com/kanikaa1234/qutebrowser into kanikaa1234-develop
-rw-r--r--.gitignore2
-rw-r--r--qutebrowser/browser/commands.py3
-rw-r--r--tests/integration/features/navigate.feature5
3 files changed, 10 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index d1826d402..b9d41a67f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
__pycache__
+*.py~
*.pyc
*.swp
/build
@@ -30,6 +31,7 @@ __pycache__
/.testmondata
/.hypothesis
/prof
+/venv
TODO
/scripts/testbrowser_cpp/Makefile
/scripts/testbrowser_cpp/main.o
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py
index 8641bfc7b..a81bbfa9d 100644
--- a/qutebrowser/browser/commands.py
+++ b/qutebrowser/browser/commands.py
@@ -430,6 +430,8 @@ class CommandDispatcher:
new_url = urlutils.incdec_number(url, incdec, segments=segments)
except urlutils.IncDecError as error:
raise cmdexc.CommandError(error.msg)
+ url.setFragment(None)
+
self._open(new_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!")
new_path = posixpath.join(path, posixpath.pardir)
url.setPath(new_path)
+ url.setFragment(None)
self._open(url, tab, background, window)
@cmdutils.register(instance='command-dispatcher', scope='window')
diff --git a/tests/integration/features/navigate.feature b/tests/integration/features/navigate.feature
index e5fd20d52..b356e399c 100644
--- a/tests/integration/features/navigate.feature
+++ b/tests/integration/features/navigate.feature
@@ -38,6 +38,11 @@ Feature: Using :navigate
And I run :navigate next
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
Scenario: Incrementing number in URL