Skip to content

Commit 518c4a3

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-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"))

0 commit comments

Comments
 (0)