Skip to content

Commit

Permalink
Use derived-mode-p instead of checking buffer names
Browse files Browse the repository at this point in the history
  • Loading branch information
phikal committed May 18, 2022
1 parent dbb9154 commit 3d1e157
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions dumb-jump.el
Original file line number Diff line number Diff line change
Expand Up @@ -2112,8 +2112,7 @@ to keep looking for another root."
(dumb-jump-git-grep-installed?)
(dumb-jump-grep-installed?)))
(dumb-jump-issue-result "nogrep"))
((or (string= (buffer-name) "*shell*")
(string= (buffer-name) "*eshell*"))
((derived-mode-p 'shell-mode 'eshell-mode)
(dumb-jump-fetch-shell-results prompt))
((and (not prompt) (not (region-active-p)) (not (thing-at-point 'symbol)))
(dumb-jump-issue-result "nosymbol"))
Expand Down
1 change: 1 addition & 0 deletions test/dumb-jump-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
(let* ((go-js-file (f-join test-data-dir-proj1 "src" "js" "fake.js"))
(default-directory test-data-dir-proj1))
(with-current-buffer (get-buffer-create "*shell*")
(shell-mode)
(insert ".js doSomeStuff()")
(goto-char (point-min))
(forward-char 6)
Expand Down

0 comments on commit 3d1e157

Please sign in to comment.