diff options
| author | Stephen Blott | 2016-01-31 14:31:37 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-01-31 14:31:37 +0000 |
| commit | 8f54de210ebc1109cf9a82eae14296667a37f751 (patch) | |
| tree | 1d8fe0e056885e8f24ffa8195b8716fefbe08746 | |
| parent | d16c7c52ef12debbde5538a353f683be845e8847 (diff) | |
| parent | d0371a08fd667c31d2681473a8c4e6c8eca4b6ef (diff) | |
| download | vimium-8f54de210ebc1109cf9a82eae14296667a37f751.tar.bz2 | |
Merge branch 'goToLine'
| -rw-r--r-- | background_scripts/commands.coffee | 2 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 0a296c3e..a307f23f 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -256,7 +256,7 @@ commandDescriptions = scrollLeft: ["Scroll left"] scrollRight: ["Scroll right"] - scrollToTop: ["Scroll to the top of the page", { noRepeat: true }] + scrollToTop: ["Scroll to the top of the page", { passCountToFunction: true }] scrollToBottom: ["Scroll to the bottom of the page", { noRepeat: true }] scrollToLeft: ["Scroll all the way to the left", { noRepeat: true }] scrollToRight: ["Scroll all the way to the right", { noRepeat: true }] diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index e041245d..803f8b80 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -308,9 +308,9 @@ extend window, scrollToBottom: -> Marks.setPreviousPosition() Scroller.scrollTo "y", "max" - scrollToTop: -> + scrollToTop: (count) -> Marks.setPreviousPosition() - Scroller.scrollTo "y", 0 + Scroller.scrollTo "y", (count - 1) * Settings.get("scrollStepSize") scrollToLeft: -> Scroller.scrollTo "x", 0 scrollToRight: -> Scroller.scrollTo "x", "max" scrollUp: -> Scroller.scrollBy "y", -1 * Settings.get("scrollStepSize") |
