| Age | Commit message (Collapse) | Author |
|
|
|
Conflicts:
content_scripts/vimium_frontend.coffee
|
|
|
|
Return to the original viewport (when no find matches)
|
|
Previously, we removed the selection on exiting visual mode. This
collapses the selection instead.
My own experience with visual mode suggests that this is better. In
particular, if we remove the selection, then when the user re-enters
visual mode, they're dropped into caret mode. It is unlikely that the
default caret position selected by caret mode is better than the last
text selected by the user in either caret mode or visual mode.
|
|
|
|
|
|
The intention here is that, under visual mode, a find query with no
matches leaves us at some aribtrary place in the page. Whereas the user
was probably looking at the text they're interested in in the viewport
to begin with. This PR returns to the original viewport in such cases.
(In this commit, return-to-viewport is enabled for *all* finds, not just
under visual mode. I want to try it out like this to see what it feels
like. This is probably not the right UX. It is not what Chrome does.)
|
|
|
|
When we exit visual mode with "y"...
"y" is a command for visual mode. Currently it clears the selection.
Because it's executed as a command, scrollIntoView is called after
running the command. Because the selection is cleared, scrollIntoView
found nothing to scroll, and was creating an error.
So we need to check whether there's anything to scroll into view, before
trying to scroll it.
Also fix mis-named file in the tests.
|
|
- convert getCaretCoordinates from JS to CS
- handle x axis in scrollIntoView
- better comments throughout.
|
|
which was broken.
|
|
There's considerable discussion in #1441 as to what we should do with
the selection on leaving visual mode. Good arguments have been made as
to why we should keep the selection. However, at this point,
keep-it-simple seems like the best strategy, and wholly removing the
selection (probably) provides fewer ways for the user to shoot
themselves in the foot.
|
|
This effectively reverts 95e086563b918364d3038f6489cc97c73fcb7180
(Escape-Escape clears selection) pending discussion of the right UX
around exitng visual mode.
|
|
This reverts commit c1681fea2f2629c6bee1e27c5dfc704d77553d96.
|
|
|
|
When caret mode guesses a selection score text nodes by their visible
area and the number of non-whitespace characters they contain. Choose
the first non-whitespace character in the highest-scoring node.
The intention is to avoid making a poor choice for the initial caret
position.
|
|
|
|
|
|
|
|
|
|
- Collapse to focus when entering caret mode from visual mode.
|
|
- When the user exits visual mode via escape, we reinstall the original
selection (from launch).
|
|
|
|
|
|
|
|
|
|
When visual mode launches and there *is* a selection but it's outside of
the viewport, instead of scrolling it into view, ignore it, and start
with a visible caret.
|
|
- And drop "J".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- better definition of vimword.
- fix initial selection as just one character when entering caret mode.
- fix initial caret when entering visual mode from edit mode.
- better selectLine.
- "o" and "Y" are commands for visual mode, not movements.
- simplify find mode within visual mode.
- add FindMode binding for "/".
|
|
|
|
- Simplify the SuppressPrintable key handler.
- Rework the protectClipboard logic.
- Some commands (x, X, etc) never affect the clipboard.
|
|
|
|
|
|
It turns out we need to check different properties of the selection in
order to correctly detect when the selection has changed in
contentEditable elements.
|
|
Also, change how vim's "w" is implemented.
Also some code-review/cleanup.
Better dd and yy for gmail.
|
|
- Use a has for singletons (as it was previously), but with a distinct
identity generated by Utils.getIdentity.
- Fix counts not be using in a number of places.
|
|
- Minor refactoring.
- Better selection of entity for "daw" an friends.
- dd uses count, and works for empty lines.
- Count for daw, etc.
- Fix bug whereby selection cleared when changing tabs.
|
|
- Minor changes.
- Deactivate modes on inputs from focusInput().
|
|
|
|
- Various argument forms for runMovement.
- Better visual line mode line selection.
- Include preceding white space for "daw" and friends.
- Vim-like handling of "2d3w" - count is six".
|
|
|