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

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

[elpa] externals/yaml 67e8b5f3dc 096/124: Fix off-by-one bug for storing


From: ELPA Syncer
Subject: [elpa] externals/yaml 67e8b5f3dc 096/124: Fix off-by-one bug for storing position
Date: Fri, 29 Nov 2024 16:00:06 -0500 (EST)

branch: externals/yaml
commit 67e8b5f3dc8c16d5515359820569d4c9642cf424
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>

    Fix off-by-one bug for storing position
---
 yaml.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/yaml.el b/yaml.el
index 916b273871..01e0545df7 100644
--- a/yaml.el
+++ b/yaml.el
@@ -761,7 +761,8 @@ repeat for each character in a text.")
              (let ((str (substring yaml--parsing-input beg 
yaml--parsing-position)))
                (list ,name
                      (if yaml--parsing-store-position
-                         (propertize str 'yaml-position (cons beg 
yaml--parsing-position))
+                         (propertize str 'yaml-position (cons (1+ beg)
+                                                              (1+ 
yaml--parsing-position)))
                        str)
                      ,res-symbol)))
             ((equal res-type 'list) (list ,name ,res-symbol))



reply via email to

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