]> git.gir.st - VimFx.git/commit
Make scrolling commands scroll the focused element
authorSimon Lydell <simon.lydell@gmail.com>
Fri, 30 Jan 2015 21:17:45 +0000 (22:17 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Thu, 14 May 2015 22:06:16 +0000 (00:06 +0200)
commit6ce700ea80bcb6448d5a7f06c78526cf7b5b63e4
tree6940ad9135110a50b582fd81ce1949981121b8ac
parent79b669baa3dcaf8877d1ca5196911ae8d929ef15
Make scrolling commands scroll the focused element

Fixes #11. If the currently focused element is scrollable, it is scrolled by the
scrolling commands. Otherwise the whole document is scrolled.

In other words, you may now choose which element to scroll with the 'f' or 'vf'
command, and then you can scroll it with the scroll commands.

Fixes #399. Using counts with scrolling commands now works reliably.

The scrolling commands respect built-in Firefox prefs:

- general.smoothScroll: Turn smooth scrolling on/off for _all_ scrolling
  commands.
- general.smoothScroll.lines: h, j, k, l only.
- general.smoothScroll.pages: d, u, <space>, <s-space> only.
- general.smoothScroll.other: gg, G only.
- toolkit.scrollbox.horizontalScrollDistance: Scroll step for h, l.
- toolkit.scrollbox.verticalScrollDistance: Scroll step for j, k.

The two last prefs replace the scroll step setting.

A bunch of new (hidden) prefs let you customize the smooth scrolling, in the
same spirit as the built-in `general.smoothScroll.<type>.duration{Min,Max}MS`.
They're called `smoothScroll.<type>.spring-constant` and work like
`layout.css.scroll-behavior.spring-constant`.

This commit also bumps the minimum Firefox version to 36, since
`Element.prototype.scroll{To,By}` are used and first available in that version.
21 files changed:
extension/defaults/preferences/defaults.js
extension/lib/commands.coffee
extension/lib/events.coffee
extension/lib/prefs.coffee
extension/lib/utils.coffee
extension/lib/vim.coffee
extension/locale/de/options.dtd
extension/locale/el-GR/options.dtd
extension/locale/en-US/options.dtd
extension/locale/hu/options.dtd
extension/locale/id/options.dtd
extension/locale/it/options.dtd
extension/locale/ja/options.dtd
extension/locale/nl/options.dtd
extension/locale/pl/options.dtd
extension/locale/ru/options.dtd
extension/locale/sv-SE/options.dtd
extension/locale/zh-CN/options.dtd
extension/locale/zh-TW/options.dtd
extension/options.xul
package.json
Imprint / Impressum