cursors from selection doesn't work before a first selection has been made
Closed this issue · 0 comments
Description
The error message: (wrong-type-argument integer-or-marker-p nil)
Is shown if grI
or grA
is pressed before a selection has been made after starting Emacs.
Reproduction guide 🪲
- start Emacs
- open the scratch buffer
- press
grI
orgrA
Observed behaviour: 👀 💔
evil-mc-make-cursor-in-visual-selection: Wrong type argument: integer-or-marker-p, nil
Expected behaviour: ❤️ 😄
A message could be shown:
evil-mc-make-cursor-in-visual-selection-beg: Only works with a selection
evil-mc-make-cursor-in-visual-selection-end: Only works with a selection
Something like this:
(message "%s: Only works with a selection" this-command)
Cause
The function:
evil-mc/evil-mc-cursor-make.el
Line 477 in ef22ee1
calls: (count-lines evil-visual-beginning evil-visual-end)
but before a selection has been made then both variables:
evil-visual-beginning
and evil-visual-end
are nil
.
System Info 💻
evil-mc-20191124.538
GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
Windows 1903