]> git.gir.st - VimFx.git/commit
Fix text selection when forusing text inputs
authorSimon Lydell <simon.lydell@gmail.com>
Thu, 3 Dec 2015 07:20:43 +0000 (08:20 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Thu, 3 Dec 2015 07:47:09 +0000 (08:47 +0100)
commitb3e8a037eb347d3c196fe975594dd161b8cd2d0d
tree4ed0170bf3c5fffe52150d3ff930b08fd256200c
parentef2e81a84e87abce1d61b1288114b60fdc3f154b
Fix text selection when forusing text inputs

When using one of the `f` commands to focus a text input, the previous selection
or caret position should be retained, just as if you had clicked it. However,
before this commit all of their text was accidentally selected (as if you had
pressed `<tab>` to foucs).

This also improves the `gi` command. Previously, it _always_ selected all text.
Now it does so only if you use a count, or use `gi` to re-focus an input after a
prevented autofocus. In those cases you likely want to replace what's in the
input, but otherwise you're likely returning to the text input after a temporary
leave and want to continue typing where you left off.
extension/lib/commands-frame.coffee
extension/lib/events-frame.coffee
extension/lib/utils.coffee
extension/lib/vim-frame.coffee
Imprint / Impressum