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

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

[elpa] externals/realgud 4a7f6ef 019/140: Fix infinite loop in realgud:b


From: Rocky Bernstein
Subject: [elpa] externals/realgud 4a7f6ef 019/140: Fix infinite loop in realgud:backtrace-init
Date: Sat, 25 May 2019 19:35:22 -0400 (EDT)

branch: externals/realgud
commit 4a7f6efc82f1a8a3d065e2783b0aef413e37775a
Author: denin <address@hidden>
Commit: denin <address@hidden>

    Fix infinite loop in realgud:backtrace-init
    
    match-end and match-begin is overriden in realgud:file-loc-from-line.
    It is better to store them in variables.
---
 realgud/common/buffer/backtrace.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/realgud/common/buffer/backtrace.el 
b/realgud/common/buffer/backtrace.el
index 2b68bb0..448927a 100644
--- a/realgud/common/buffer/backtrace.el
+++ b/realgud/common/buffer/backtrace.el
@@ -407,6 +407,8 @@ filename, line number, whether the frame is selected as 
text properties."
            ;; FIXME: Remove hack that group 1 is always the frame indicator.
            (frame-indicator
             (substring stripped-string (match-beginning 1) (match-end 1)))
+           (whole-match-begin (match-beginning 0))
+           (whole-match-end (match-end 0))
            (frame-num-pos)
 
            )
@@ -462,12 +464,12 @@ filename, line number, whether the frame is selected as 
text properties."
 
        (when (and (stringp filename) (numberp line-num))
          (let ((loc (realgud:file-loc-from-line filename line-num cmdbuf)))
-           (put-text-property (match-beginning 0) (match-end 0)
+           (put-text-property whole-match-begin whole-match-end
                               'loc loc string)
            ))
-       (put-text-property (match-beginning 0) (match-end 0)
+       (put-text-property whole-match-begin whole-match-end
                           'frame-num  frame-num string)
-       (setq last-pos (match-end 0))
+       (setq last-pos whole-match-end)
 
        (if (string-match frame-indicator-re frame-indicator)
          (setq selected-frame-num frame-num))



reply via email to

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