Skip to content

Commit d4ec1da

Browse files
committed
Document default mouse behavior in the manual
Issue codemirror#5603
1 parent e4acffd commit d4ec1da

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

doc/manual.html

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,16 +332,27 @@ <h2>Configuration</h2>
332332
<dl>
333333
<dt><code><strong>unit</strong>: "char" | "word" | "line" | "rectangle" | fn(CodeMirror, Pos) → {from: Pos, to: Pos}</code></dt>
334334
<dd>The unit by which to select. May be one of the built-in
335-
units, or a function that takes a position and returns a
336-
range around that, for a custom unit.</dd>
335+
units or a function that takes a position and returns a
336+
range around that, for a custom unit. The default is to
337+
return <code>"word"</code> for double
338+
clicks, <code>"line"</code> for triple
339+
clicks, <code>"rectangle"</code> for alt-clicks (or, on
340+
Chrome OS, meta-shift-clicks), and <code>"single"</code>
341+
otherwise.</dd>
337342
<dt><code><strong>extend</strong>: bool</code></dt>
338-
<dd>Whether to extend the existing selection range or start a new one.</dd>
343+
<dd>Whether to extend the existing selection range or start
344+
a new one. By default, this is enabled when shift
345+
clicking.</dd>
339346
<dt><code><strong>addNew</strong>: bool</code></dt>
340-
<dd>When enabled, this adds a new range to the existing selection, rather than replacing it.</dd>
347+
<dd>When enabled, this adds a new range to the existing
348+
selection, rather than replacing it. The default behavior is
349+
to enable this for command-click on Mac OS, and
350+
control-click on other platforms.</dd>
341351
<dt><code><strong>moveOnDrag</strong>: bool</code></dt>
342352
<dd>When the mouse even drags content around inside the
343353
editor, this controls whether it is copied (false) or moved
344-
(true).</dd>
354+
(true). By default, this is enabled by alt-clicking on Mac
355+
OS, and ctrl-clicking elsewhere.</dd>
345356
</dl>
346357
</dd>
347358

0 commit comments

Comments
 (0)