aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode_visual_edit.coffee
AgeCommit message (Collapse)Author
2015-04-28Fix mode indicator for "gi".Stephen Blott
2015-04-19Merge branch 'remove-badges'Stephen Blott
Conflicts: content_scripts/vimium_frontend.coffee
2015-04-18Mode indicator: more fix HUD messages for caret mode.Stephen Blott
2015-04-18Merge pull request #1572 from smblott-github/return-to-viewportStephen Blott
Return to the original viewport (when no find matches)
2015-04-18Selection handling on exiting visual mode.Stephen Blott
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.
2015-04-18Mode indicator: initial move to HUD.Stephen Blott
2015-04-18Mode indicator: strip all references to badges.Stephen Blott
2015-02-23Find (from visual mode) returns to viewport on no match.Stephen Blott
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.)
2015-02-12Fix regexp performFind/performBackwardsFindmrmr1993
2015-02-11Fix error on yank/scroll.Stephen Blott
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.
2015-02-06Visual/edit modes: code cleanup.Stephen Blott
- convert getCaretCoordinates from JS to CS - handle x axis in scrollIntoView - better comments throughout.
2015-02-05Visual/edit modes: Fix ae1697b6697e24c77fc852b02c760871db995a3f...Stephen Blott
which was broken.
2015-02-05Visual/edit modes: always fully remove the selection on exit from visual mode.Stephen Blott
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.
2015-02-05Visual/edit modes: visualmode-escape clears selection.Stephen Blott
This effectively reverts 95e086563b918364d3038f6489cc97c73fcb7180 (Escape-Escape clears selection) pending discussion of the right UX around exitng visual mode.
2015-02-04Revert "Visual/edit modes: better (?) guessing for caret mode."Stephen Blott
This reverts commit c1681fea2f2629c6bee1e27c5dfc704d77553d96.
2015-02-03Visual/edit modes: fix bug in event handling.Stephen Blott
2015-02-03Visual/edit modes: better (?) guessing for caret mode.Stephen Blott
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.
2015-02-02Visual/edit modes: Escape-Escape clears selection.Stephen Blott
2015-02-02Visual/edit modes: WIP, scrolling content editable.Stephen Blott
2015-02-02Visual/edit modes: escape in visual mode clears selection.Stephen Blott
2015-02-02Visual/edit modes: WIP, scrolling content editable.Stephen Blott
2015-02-01Visual/edit modes: tweaks...Stephen Blott
- Collapse to focus when entering caret mode from visual mode.
2015-02-01Visual/edit modes: fine-tune entry/exit logic.Stephen Blott
- When the user exits visual mode via escape, we reinstall the original selection (from launch).
2015-02-01Visual/edit modes: yet another code review.Stephen Blott
2015-01-31Visual/edit modes: exit visual mode on click in input element.Stephen Blott
2015-01-31Visual/edit modes: character-by-character word movements.Stephen Blott
2015-01-31Visual/edit modes: change implementation of vimword.Stephen Blott
2015-01-31Visual/edit modes: change visual-mode start up...Stephen Blott
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.
2015-01-31Visual/edit modes: rework lexical selection...Stephen Blott
- And drop "J".
2015-01-30Visual/edit modes: re-introduce "dap".Stephen Blott
2015-01-30Visual/edit modes: better "yy", "dd", an so on.Stephen Blott
2015-01-30Visual/edit modes: better "2daw", an so on.Stephen Blott
2015-01-30Visual/edit modes: fix bug entering visual mode from edit mode.Stephen Blott
2015-01-30Visual/edit modes: another minor code review.Stephen Blott
2015-01-30Visual/edit modes: correctly suppress backspace/delete.Stephen Blott
2015-01-30Visual/edit modes: handle "0" as count prefix, when appropriate.Stephen Blott
2015-01-30Visual/edit modes: better find-mode integration.Stephen Blott
2015-01-30Visual/edit modes: miscellaneous improvements....Stephen Blott
- 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 "/".
2015-01-29Visual/edit modes: initial caret mode.Stephen Blott
2015-01-29Visual/edit modes: more changes...Stephen Blott
- Simplify the SuppressPrintable key handler. - Rework the protectClipboard logic. - Some commands (x, X, etc) never affect the clipboard.
2015-01-29Visual/edit modes: fix key suppression.Stephen Blott
2015-01-29Visual/edit modes: fix broken due to stray uncommented comment.Stephen Blott
2015-01-29Visual/edit modes: fix w movement for contentEditable.Stephen Blott
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.
2015-01-28Visual/edit modes: fix some movements...Stephen Blott
Also, change how vim's "w" is implemented. Also some code-review/cleanup. Better dd and yy for gmail.
2015-01-28Visual/edit modes: yet more minor changes.Stephen Blott
- 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.
2015-01-28Visual/edit modes: minor changes...Stephen Blott
- 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.
2015-01-27Visual/edit modes: minor changes.Stephen Blott
- Minor changes. - Deactivate modes on inputs from focusInput().
2015-01-27Visual/edit modes: self code review.Stephen Blott
2015-01-27Visual/edit modes: miscellaneous changes.Stephen Blott
- 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".
2015-01-27Visual/edit modes: better word-movement/"w".Stephen Blott