emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/multiple-cursors a6984a1 203/434: Merge pull request #53 f


From: ELPA Syncer
Subject: [nongnu] elpa/multiple-cursors a6984a1 203/434: Merge pull request #53 from oneself/master
Date: Sat, 7 Aug 2021 09:20:26 -0400 (EDT)

branch: elpa/multiple-cursors
commit a6984a1141fb969d721409f231481f27191a84af
Merge: 9a376a6 6a5969e
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>

    Merge pull request #53 from oneself/master
    
    Adding support for using mc/edit-lines without transient mark mode.
---
 features/edit-lines.feature | 13 +++++++++++++
 mc-edit-lines.el            |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/features/edit-lines.feature b/features/edit-lines.feature
index 69c40a6..814f784 100644
--- a/features/edit-lines.feature
+++ b/features/edit-lines.feature
@@ -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 press "C-S-c C-S-c"
     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
diff --git a/mc-edit-lines.el b/mc-edit-lines.el
index 76452cc..d185a2c 100644
--- a/mc-edit-lines.el
+++ b/mc-edit-lines.el
@@ -35,7 +35,7 @@
 Starts from mark and moves in straight down or up towards the
 line point is on."
   (interactive)
-  (when (not (use-region-p))
+  (when (not (and mark-active (/= (point) (mark))))
     (error "Mark a set of lines first."))
   (mc/remove-fake-cursors)
   (let* ((col (current-column))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]