diff options
| author | Stephen Blott | 2016-02-28 10:07:19 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-02-28 10:07:19 +0000 | 
| commit | ff6dee4a3f5d49ae4ea7ae037f6e0df78b65eb31 (patch) | |
| tree | 9e6872a4cfecac459e2a06365b82c0fa1de62745 /background_scripts/commands.coffee | |
| parent | f6a3bc3aa0c14af41a9b6035cc809071b4a27af1 (diff) | |
| download | vimium-ff6dee4a3f5d49ae4ea7ae037f6e0df78b65eb31.tar.bz2 | |
Pass to count to scroll commands.
Currently, `10j` keeping `j` held down scrolls quickly for a time then
reduces back the regular hold-`j` scroll speed.  Therefore, the user
cannot use a count to influence the smooth-scrolling scroll speed.
This PR fixes that by passing the count to the scroll functions.
Consequently, we adjust the actual scroll amount (which affects the
scroll speed) rather than calling the scroll commands several times
(which doesn't).
Diffstat (limited to 'background_scripts/commands.coffee')
| -rw-r--r-- | background_scripts/commands.coffee | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 74c2d08b..4b087060 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -278,20 +278,20 @@ defaultKeyMappings =  commandDescriptions =    # Navigating the current page    showHelp: ["Show help", { background: true }] -  scrollDown: ["Scroll down"] -  scrollUp: ["Scroll up"] -  scrollLeft: ["Scroll left"] -  scrollRight: ["Scroll right"] +  scrollDown: ["Scroll down", { passCountToFunction: true }] +  scrollUp: ["Scroll up", { passCountToFunction: true }] +  scrollLeft: ["Scroll left", { passCountToFunction: true }] +  scrollRight: ["Scroll right", { passCountToFunction: 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 }] -  scrollPageDown: ["Scroll a page down"] -  scrollPageUp: ["Scroll a page up"] -  scrollFullPageDown: ["Scroll a full page down"] -  scrollFullPageUp: ["Scroll a full page up"] +  scrollPageDown: ["Scroll a page down", { passCountToFunction: true }] +  scrollPageUp: ["Scroll a page up", { passCountToFunction: true }] +  scrollFullPageDown: ["Scroll a full page down", { passCountToFunction: true }] +  scrollFullPageUp: ["Scroll a full page up", { passCountToFunction: true }]    reload: ["Reload the page", { noRepeat: true }]    toggleViewSource: ["View page source", { noRepeat: true }] | 
