branch: externals/realgud
commit e7b622cd8947cdf0178e7a347fdded506d27ba7d
Author: yangyingchao <[email protected]>
Commit: yangyingchao <[email protected]>
Fix error in realgud-expand-format introduced in `d21f338`
`src-file-name-raw` could be `nil`, resulting in an error when calling
`file-remote-p` and causing
this function to break.
---
realgud/common/send.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/realgud/common/send.el b/realgud/common/send.el
index a5363a0725..7d6327f064 100644
--- a/realgud/common/send.el
+++ b/realgud/common/send.el
@@ -150,7 +150,8 @@ taken from current buffer, or OPT-BUFFER if non-nil. Some
(let* ((buffer (or opt-buffer (current-buffer)))
(srcbuf (realgud-get-srcbuf buffer))
(src-file-name-raw (and srcbuf (buffer-file-name srcbuf)))
- (src-file-name (if (file-remote-p src-file-name-raw) (file-remote-p
src-file-name-raw 'localname) src-file-name-raw))
+ (src-file-name (and src-file-name-raw
+ (if (file-remote-p src-file-name-raw)
(file-remote-p src-file-name-raw 'localname) src-file-name-raw)))
result)
(while (and fmt-str
(let ((case-fold-search nil))