Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty buffer opens when selecting a help-git-grep result #16201

Closed
JuanCaicedo opened this issue Nov 29, 2023 · 2 comments
Closed

Empty buffer opens when selecting a help-git-grep result #16201

JuanCaicedo opened this issue Nov 29, 2023 · 2 comments

Comments

@JuanCaicedo
Copy link

Hi everyone!

Description :octocat:

When I'm trying to search within my code base and open a result, an empty buffer opens instead.

Reproduction guide 🪲

  • run a search with SPC g / from within a git project
  • type in some text
  • highlight a result and press enter

Observed behaviour: 👀 💔

  • An empty buffer opens with this name
    mouse-1: select candidate
    mouse-3: menu actions
    

Expected behaviour: ❤️ 😄

  • The selected code should open in a new buffer

System Info 💻

  • OS: darwin
  • Emacs: 28.2
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. 8f70193)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(go
 (typescript :variables typescript-backend 'tide typescript-linter 'eslint typescript-fmt-tool 'prettier typescript-lsp-linter nil)
 sql python elixir html clojure emoji typescript nginx docker csv helm emacs-lisp elm git
 (node :variables node-add-modules-path t)
 javascript tide
 (keyboard-layout :variables kl-layout 'dvp)
 markdown neotree org osx ruby yaml shell-scripts)
  • System configuration features: ACL GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB

Backtrace 🐾

<<BACKTRACE IF RELEVANT>>

Other info

I've tried to disable all mouse actions within my editor by adding this code.

(defun dotspacemacs/user-config ()

  (define-key evil-normal-state-map (kbd "<C-down-mouse-1>") 'nothing)
  (define-key evil-normal-state-map (kbd "<M-down-mouse-1>") 'nothing)
  (define-key evil-normal-state-map (kbd "<mouse-2>") 'nothing)
  (define-key evil-normal-state-map (kbd "<M-drag-mouse-1>") 'nothing)
  (define-key evil-normal-state-map (kbd "<M-mouse-1>") 'nothing)
  (define-key evil-normal-state-map (kbd "<M-mouse-2>") 'nothing)
  (define-key evil-normal-state-map (kbd "<M-mouse-3>") 'nothing)
  (define-key evil-normal-state-map (kbd "<S-mouse-1>") 'nothing)
  (define-key evil-normal-state-map (kbd "<S-mouse-2>") 'nothing)
  (define-key evil-normal-state-map (kbd "<S-mouse-3>") 'nothing)
  (define-key evil-normal-state-map (kbd "<mouse-3>") 'nothing)
  (dolist (mouse '("<down-mouse-1>" "<mouse-1>"))
    (global-unset-key (kbd mouse)))

However I still see the same behavior even if I comment that out

@alexey0308
Copy link

Hi @JuanCaicedo,

it seems to be an upstream issue, please check the solution mentioned here yasuyk/helm-git-grep#52.

Although not a direct solution, but I find using e.g. ag much faster to search the code base.

@JuanCaicedo
Copy link
Author

Thanks for that tip! I added (setq helm-allow-mouse nil) to my spacemacs file and that fixed it 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants