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

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

[nongnu] elpa/crux c3b6138 107/112: Fixed extra line issue when duplicat


From: ELPA Syncer
Subject: [nongnu] elpa/crux c3b6138 107/112: Fixed extra line issue when duplicating
Date: Wed, 11 Aug 2021 09:58:03 -0400 (EDT)

branch: elpa/crux
commit c3b61380caa115e1065cebbf5450f52459988f90
Author: Yevgnen Koh <wherejoystarts@gmail.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>

    Fixed extra line issue when duplicating
---
 crux.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/crux.el b/crux.el
index d7654cf..a6ca1fa 100644
--- a/crux.el
+++ b/crux.el
@@ -384,7 +384,8 @@ there's a region, all lines that region covers will be 
duplicated."
                (region (buffer-substring-no-properties beg end)))
     (dotimes (_i arg)
       (goto-char end)
-      (newline)
+      (unless (use-region-p)
+        (newline))
       (insert region)
       (setq end (point)))
     (goto-char (+ origin (* (length region) arg) arg))))
@@ -402,7 +403,8 @@ there's a region, all lines that region covers will be 
duplicated."
     (setq end (line-end-position))
     (dotimes (_ arg)
       (goto-char end)
-      (newline)
+      (unless (use-region-p)
+        (newline))
       (insert region)
       (setq end (point)))
     (goto-char (+ origin (* (length region) arg) arg))))



reply via email to

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