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

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

[elpa] externals/org-remark eb9c557051: fix: incorrect beg end of a high


From: ELPA Syncer
Subject: [elpa] externals/org-remark eb9c557051: fix: incorrect beg end of a highlight
Date: Sun, 8 Jan 2023 04:58:09 -0500 (EST)

branch: externals/org-remark
commit eb9c55705127cd8911819e09e24c452e8d5cf94c
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>

    fix: incorrect beg end of a highlight
    
    When a range of text is selected, the beg and end gets swapped if the
    user selects from the end of the range and the pointer is on the beg.
    
    The highlight gets incorrectly recorded in marginal notes file (beg >
    end).
---
 org-remark.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index b764651e17..46ba002e99 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1306,7 +1306,12 @@ function extends the behavior and looks for the word at 
point"
     ;; Check beg end is required as the cursor may be on an empty point with no
     ;; word under it.
     (if (and beg end)
-        (list beg end)
+        (progn
+          (when (> beg end)
+            (let ((large beg))
+              (setq beg end
+                    end large)))
+          (list beg end))
       (user-error "No region selected and the cursor is not on a word"))))
 
 



reply via email to

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