[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 6a62e60 367/434: Fix issue #131 (#247)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 6a62e60 367/434: Fix issue #131 (#247) |
Date: |
Sat, 7 Aug 2021 09:21:01 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 6a62e60bf2920b0790ce27dfce8afd7c9f079f80
Author: jtamagnan <jtamagnan@gmail.com>
Commit: Steve Purcell <steve@sanityinc.com>
Fix issue #131 (#247)
* Fix issue #131
This issue would occur because the function was recieving a raw prefix
arg instead of a number. This commit fixes that.
* Fix issue with previous commit, add test cases
---
features/insert-letters.feature | 8 +++++++-
features/insert-numbers.feature | 6 ++++++
mc-separate-operations.el | 6 ++++--
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/features/insert-letters.feature b/features/insert-letters.feature
index 7bf56a3..adec2da 100644
--- a/features/insert-letters.feature
+++ b/features/insert-letters.feature
@@ -16,4 +16,10 @@ Feature: Insert increasing letters
Given I have cursors at "text" in "This text contains the word text thrice
(text)"
When I press "C-u 2 5 H-3"
And I press "SPC"
- Then I should see "This z text contains the word aa text thrice (ab text)"
\ No newline at end of file
+ Then I should see "This z text contains the word aa text thrice (ab text)"
+
+ Scenario: Three cursors, a-b-c
+ Given I have cursors at "text" in "This text contains the word text thrice
(text)"
+ When I press "C-u H-3"
+ And I press "SPC"
+ Then I should see "This e text contains the word f text thrice (g text)"
diff --git a/features/insert-numbers.feature b/features/insert-numbers.feature
index 75f5665..59db91f 100644
--- a/features/insert-numbers.feature
+++ b/features/insert-numbers.feature
@@ -11,3 +11,9 @@ Feature: Insert increasing numbers
When I press "C-9 H-0"
And I press "SPC"
Then I should see "This 9 text contains the word 10 text thrice (11 text)"
+
+ Scenario: Three cursors, 9-10-11
+ Given I have cursors at "text" in "This text contains the word text thrice
(text)"
+ When I press "C-u H-0"
+ And I press "SPC"
+ Then I should see "This 4 text contains the word 5 text thrice (6 text)"
diff --git a/mc-separate-operations.el b/mc-separate-operations.el
index 29385f7..487a650 100644
--- a/mc-separate-operations.el
+++ b/mc-separate-operations.el
@@ -33,7 +33,8 @@
(defun mc/insert-numbers (arg)
"Insert increasing numbers for each cursor, starting at 0 or ARG."
(interactive "P")
- (setq mc--insert-numbers-number (or arg 0))
+ (setq mc--insert-numbers-number (or (and arg (prefix-numeric-value arg))
+ 0))
(mc/for-each-cursor-ordered
(mc/execute-command-for-fake-cursor 'mc--insert-number-and-increase
cursor)))
@@ -58,7 +59,8 @@
"Insert increasing letters for each cursor, starting at 0 or ARG.
Where letter[0]=a letter[2]=c letter[26]=aa"
(interactive "P")
- (setq mc--insert-letters-number (or arg 0))
+ (setq mc--insert-letters-number (or (and arg (prefix-numeric-value arg))
+ 0))
(mc/for-each-cursor-ordered
(mc/execute-command-for-fake-cursor 'mc--insert-letter-and-increase
cursor)))
- [nongnu] elpa/multiple-cursors 2b536cb 283/434: Added mc/edit-lines-empty-lines, (continued)
- [nongnu] elpa/multiple-cursors 2b536cb 283/434: Added mc/edit-lines-empty-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 75ece68 288/434: Merge pull request #118 from aspiers/fix-compile-warnings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9f4502b 304/434: Change file load timing, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e94567c 303/434: Add installation instructions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 98f2346 305/434: Merge pull request #152 from ShingoFukuyama/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 653d523 308/434: Added mc-hide-unmatched-lines mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3f1611c 345/434: Factor out a superfluous variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 68961b4 355/434: Avoid requiring cl at runtime, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4c52fb1 358/434: Merge pull request #239 from ilohmar/dwim-mouse-select, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e31b1eb 360/434: Merge pull request #240 from ilohmar/toggle-click-improvements, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6a62e60 367/434: Fix issue #131 (#247),
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 2329611 380/434: Merge remote-tracking branch 'upstream/master', ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 60b9ef8 385/434: Updated readme according to `mc/always-run-for-all, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ad95d28 386/434: Update docstring of `mc/cursor-is-bar`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 21e4825 387/434: mc/mark-previous-like-this-word/symbol., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 95f2e41 391/434: Add @AndreaOrru to list of contributors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e14fdb7 401/434: Merge pull request #298 from Quasilyte/update_readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8172edd 417/434: Realign the file according to Elisp conventions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b9b851a 426/434: Merge pull request #358 from renatofdds/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6a04a14 428/434: Fix docstrings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7b13b03 433/434: Add homepage, ELPA Syncer, 2021/08/07