summaryrefslogtreecommitdiff
path: root/docs/selections.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/selections.md')
-rw-r--r--docs/selections.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/selections.md b/docs/selections.md
index 5cc1df1a..0817c215 100644
--- a/docs/selections.md
+++ b/docs/selections.md
@@ -121,3 +121,30 @@ the replay.
line is its own haystack, so `^`/`$` hold at every line and a class like
`\s` does not reach the newline unless the pattern names `\n`.
- Undo restores only the primary (above).
+
+## The mouse
+
+A B1, B2 or B3 sweep selects a stream, as acme's does (libframe
+frselect.c:115): from the press to the end of its line, the lines between
+whole, the last from its start to the release, the character under the
+pointer included. A plain B1 click puts the caret on its cell. A second
+plain click at the same cell within half a second is acme's double-click
+(plan9port acme text.c:1407, textdoubleclick): just after `{ [ ( < «` or
+just before their closers it selects up to the match, nested pairs
+counted; at a line's start or end the whole line; just inside `' " \``
+the quoted text; anywhere else the word (letters, digits, `_` and any
+non-ASCII character). It works in bodies, tags and a terminal in normal
+mode; a terminal whose program has the tty gets its own clicks.
+
+A B2 or B3 pressed while B1 holds a sweep is acme's chord: B1-B2 cuts,
+B1-B3 pastes over it. Everything done while B1 stays down is one undo
+step, as acme marks the file once per B1 hold (text.c:881, textselect), so
+B1-B2 then B1-B3 is a copy: the text cut and pasted back, the cut text
+left in the register.
+
+A B1 sweep held past a pane's top (on its tag) or bottom (past it, or on
+its last row when the pane reaches the screen's bottom, which the pointer
+cannot leave) scrolls the body a line a tick, as acme's frselect scrolls,
+the sweep's end under the pointer and its start on its text. A sweep that
+scrolled ends as the text's own selection, from where it began to where it
+ended. B2 and B3 sweeps do not scroll.