Closed zoechi closed 1 year ago
I'm having the same problem!
@zoechi I just found the solution
(use-package treemacs
:bind
(:map global-map
([f2] . treemacs)
:map treemacs-mode-map ;; THE SOLUTION
([drag-mouse-1] . nil)) ;; IS RIGHT HERE
:init (setq treemacs-show-hidden-files nil))
@ignamartinoli thanks a lot🚀. I guess this can be closed then.
@zoechi I just found the solution
This is the correct approach.
That or overriding the behavior of treemacs-dragleftclick-action
with fset
or advice.
I often use the mouse to navigate (scroll, expand/collaps folders, ...) and often when I click the treemacs window scrolls a bit or I accidentally move the mouse a bit, suddenly files or folders are moved. Restoring that is quite cumbersome.
I never use the mouse to move files or folders intentionally and it would be great if I could just disable drag-n-drop.