Adding support for using mc/edit-lines without transient mark mode.

This commit is contained in:
Eyal Erez 2013-01-22 15:30:01 -05:00
parent 9a376a6fa2
commit 6a5969e14a
2 changed files with 14 additions and 1 deletions

View File

@ -42,3 +42,16 @@ Feature: Switching from a multiline region to multiple cursors
And I go to the front of the word "long" And I go to the front of the word "long"
And I press "C-S-c C-S-c" And I press "C-S-c C-S-c"
Then I should have 2 cursors Then I should have 2 cursors
Scenario: Edit without using transient mark mode
Given I turn off transient-mark-mode
And I insert:
"""
hello
there
"""
And I go to the front of the word "hello"
And I set the mark
And I go to the front of the word "there"
And I press "C-S-c C-S-c"
Then I should have 2 cursors

View File

@ -35,7 +35,7 @@
Starts from mark and moves in straight down or up towards the Starts from mark and moves in straight down or up towards the
line point is on." line point is on."
(interactive) (interactive)
(when (not (use-region-p)) (when (not (and mark-active (/= (point) (mark))))
(error "Mark a set of lines first.")) (error "Mark a set of lines first."))
(mc/remove-fake-cursors) (mc/remove-fake-cursors)
(let* ((col (current-column)) (let* ((col (current-column))