Faster line-number-at-pos calculation

This commit is contained in:
Renato Ferreira
2019-05-02 21:41:14 -03:00
parent 5ffb19af48
commit b39e9631d6
4 changed files with 21 additions and 8 deletions

View File

@@ -579,8 +579,8 @@ If the region is inactive or on a single line, it will behave like
(interactive "P")
(if (and (use-region-p)
(not (> (mc/num-cursors) 1))
(not (= (line-number-at-pos (region-beginning))
(line-number-at-pos (region-end)))))
(not (= (mc/line-number-at-pos (region-beginning))
(mc/line-number-at-pos (region-end)))))
(if arg
(call-interactively 'mc/edit-lines)
(call-interactively 'mc/mark-all-in-region))