Skip to content

Commit 3d1e157

Browse files
committed
Use derived-mode-p instead of checking buffer names
1 parent dbb9154 commit 3d1e157

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dumb-jump.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,8 +2112,7 @@ to keep looking for another root."
21122112
(dumb-jump-git-grep-installed?)
21132113
(dumb-jump-grep-installed?)))
21142114
(dumb-jump-issue-result "nogrep"))
2115-
((or (string= (buffer-name) "*shell*")
2116-
(string= (buffer-name) "*eshell*"))
2115+
((derived-mode-p 'shell-mode 'eshell-mode)
21172116
(dumb-jump-fetch-shell-results prompt))
21182117
((and (not prompt) (not (region-active-p)) (not (thing-at-point 'symbol)))
21192118
(dumb-jump-issue-result "nosymbol"))

test/dumb-jump-test.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@
491491
(let* ((go-js-file (f-join test-data-dir-proj1 "src" "js" "fake.js"))
492492
(default-directory test-data-dir-proj1))
493493
(with-current-buffer (get-buffer-create "*shell*")
494+
(shell-mode)
494495
(insert ".js doSomeStuff()")
495496
(goto-char (point-min))
496497
(forward-char 6)

0 commit comments

Comments
 (0)