Slight optimisation

This commit is contained in:
Magnar Sveen 2012-06-07 07:49:46 +02:00
parent 9938acaf71
commit dfe8a2d1e8

View File

@ -223,10 +223,8 @@ mark-multiple if point and mark is on different columns."
(error "Mark a set of lines first."))
(mc/remove-additional-cursors)
(let* ((point-line (line-number-at-pos))
(mark-line (save-excursion (exchange-point-and-mark) (line-number-at-pos)))
(num-cursors (abs (- point-line mark-line)))
(mark-line (progn (exchange-point-and-mark) (line-number-at-pos)))
(navigation-func (if (< point-line mark-line) 'previous-line 'next-line)))
(exchange-point-and-mark)
(deactivate-mark)
(while (not (eq (line-number-at-pos) point-line))
(mc/add-cursor-at-point)