branch: externals/realgud
commit dc0e13169c207a752c6f4d19f0fc0c30fdbdf83f
Author: rocky <[email protected]>
Commit: rocky <[email protected]>
Guard against nil (realgud:get-command-name "eval")
---
realgud/common/track.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/realgud/common/track.el b/realgud/common/track.el
index eeeb3e9..4140974 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -189,7 +189,8 @@ message."
(defun realgud:eval-command-p(text)
"Checks the TEXT if the command that was ran was an eval command."
- (string-prefix-p (realgud:get-command-name "eval")
(realgud:get-output-command text)))
+ (let (cmd-name (realgud:get-command-name "eval"))
+ (and (stringp cmd-name) (string-prefix-p (realgud:get-command-name
"eval") (realgud:get-output-command text)))))
(defun realgud:truncate-eval-message(text)
"Truncates the TEXT to the size of realgud-eval-message-print-length."