branch: externals/realgud
commit 5fb027b628ebe9b54bcba8b0749dfa768275a77f
Author: rocky <[email protected]>
Commit: rocky <[email protected]>

    Add more-careful column number test
---
 realgud/common/file.el | 2 +-
 realgud/common/loc.el  | 5 +++--
 test/test-track.el     | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/realgud/common/file.el b/realgud/common/file.el
index 5ed57243ee..3b3eb3e409 100644
--- a/realgud/common/file.el
+++ b/realgud/common/file.el
@@ -95,7 +95,7 @@ column.  CMD-MARKER and BP-NUM get stored in the realgud-loc
 object. FIND-FILE-FN is a function which do special things to
 transform filename so it can be found. This could include searching
 classpaths (in Java), stripping leading and trailing blanks, or
-deliberately ignoring 'pseudo-file patterns like (eval 1) of Perl and
+deliberately ignoring pseudo-file patterns like (eval 1) of Perl and
 <string> of Python.
 
 If we're unable find the source code we return a string describing the
diff --git a/realgud/common/loc.el b/realgud/common/loc.el
index df9f5c03e5..7a64059daf 100644
--- a/realgud/common/loc.el
+++ b/realgud/common/loc.el
@@ -1,3 +1,4 @@
+;; -- lexical-binding: t; --
 ;; Copyright (C) 2015-2017, 2019, 2026 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <[email protected]>
@@ -172,7 +173,7 @@ the source-code buffer, is returned. Otherwise, nil is 
returned."
                 (let ((current-text (realgud:buffer-line-no-props))
                       (loc-text (realgud-loc-source-text loc)))
                   (unless (and loc-text
-                               (eql column-number 1)
+                               (> column-number 1)
                                (equal
                                 (realgud:strip current-text)
                                 (realgud:strip loc-text)))
@@ -192,7 +193,7 @@ the source-code buffer, is returned. Otherwise, nil is 
returned."
                 ;; reliable.
                 (let ((src-marker))
                   (loc-changes-goto line-number)
-                  (when (and column-number (> column-number 0))
+                  (when (and column-number (> column-number 1))
                     (move-to-column (1- column-number)))
                   (setq src-marker (point-marker))
                   (realgud-loc-marker= loc src-marker)))))
diff --git a/test/test-track.el b/test/test-track.el
index b8882ca871..5cb0f4ab2f 100644
--- a/test/test-track.el
+++ b/test/test-track.el
@@ -1,7 +1,7 @@
 ;; -*- lexical-binding:t -*-
 
 ;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) buffer-file-name)
+;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory 
(locate-library "test-simple.elc")) (file-name-directory (locate-library 
"load-relative.elc")) buffer-file-name)
 
 (require 'test-simple)
 (load-file "../realgud/common/track.el")

Reply via email to