| Age | Commit message (Collapse) | Author |
|
Fixes #2273.
Fixes #2281.
This fixes the build with Coffeescript 1.11, so we can remove the
hard-wired dependency and notes.
|
|
Fixes #2092.
|
|
Assume there is an existing range selection.
Consider `v`, `Escape`. Previously, this had the side effect of
clearing the selection. That behaviour seems odd and wrong.
Here, we retain the selection if there was an existing range selection
when visual mode was launched.
Arguably, this removes a "feature" whereby `v`, `Escape` clears the
selection. Here, we take it that the oddity above outweighs the loss of
this arguably unintentional "feature".
|
|
The question here is where to callapse the selection to, anchor or
focus?
When exiting visual mode, mimic vim. When trasitioning between visual
and caret modes, do what's right to keep the selection in the same
place.
This also adds some related tests.
|
|
This is a better way of stubing for the tests.
Previously, if anything went wrong, there would actually be a visual
effect for the user (the page would scroll). This way, that cannot
happen.
|
|
The coverage here is far from completem but we do catch the basics.
|
|
|
|
While working on the visual-mode code, it became apparent that our
current "singleton" implementation is unnecessarily complicated.
This simplifies it. The keys are now required to be strings.
(Previously, they could be any object; which meant we needed to gove
objects an identity. All of which was complicated.)
|
|
- Refactor the three visual-mode modes.
- Use the key-handling framework from #2022.
- Strip some legacy edit-mode code.
- Rename the file (the old file name was misleading).
- Add "aw" and "as", previously we had the code for this from edit mode.
|
|
This previous file name was chosen when we (I) had the intention of
implementing edit mode too.
That initiative has been abandoned, so the file name is inappropriate.
Renaming now in preparation for a significant refactoring of visual
mode.
|
|
These modes turn out to be almost identical. So they're better off in a
single file.
|
|
|
|
|
|
|
|
Also:
- visual-mode template should block insert.
- hint mode should exit on click.
|
|
- Slight rework of HandlerStack.
- Remove classs ExitOnEscape and ExitOnBlur
- Rework InsertMode, plus trigger and blocker.
- Remove StateMode.
- Do no mixin options.
- Lots of tidy up (including set a debug variable to Mode).
|
|
|
|
|
|
|
|
|
|
- Add StateMode.
- PasskeysMode is a StateMode.
- BadgeUpdateMode is a StateMode.
- Improve badge handling.
- Add push method to Mode.
- Document how modes work.
- Cache badge on background page to reduce the number of updates.
- Remove badge restriction on document.body?.tagName.toLowerCase() == "frameset".
- Add ExitOnEscape mode, use it for ConstrainedMode and FindMode.
- Move PostFindMode to its own file.
|
|
|
|
|
|
Visual mode command has been create: bound to `v`, of course.
The template is in mode_visual.coffee. It shouldn't really be necessary
to make changes outside of there.
Let me know if you have any issues.
|
|
|