jaypei / emacs-neotree

A emacs tree plugin like NerdTree for Vim.
GNU General Public License v3.0
1.56k stars 147 forks source link

Neotree creates a second neotree window after calling evil-window-move #322

Closed JediLuke closed 1 year ago

JediLuke commented 5 years ago

If I have windows & a neotree buffer open, like this

+----------+----------------------+----------------------+
|                   |                                      |                                       |
| Neotree    |          Window 1            |           Window 2           |
|                   |                                      |                                       |
|                   |                                      |                                       |
+----------+----------------------+----------------------+

And I call evil-window-move-far-right when inside window 1 (or far-left, very-top, the direction doesn't seem to matter) I end up with an extra Neotree window, something like this...

+----------+---------+-------------+----------------+
|                   |                |                        |                           |
| Neotree    | Neotree  |    Window 2   |   Window 1        |
|                   |                |                        |                           |
|                   |                |                        |                           |
+----------+---------+-------------+---------------+

evil version: 20190729.704 neotree version: 0.5.2 (package: 20181121.2026) emacs version: 27.0.50

Edit: apologies, my "diagrams" did not render correctly even with code blocks. I hope they still convey the message, WIndow 1 moves to the far right and a second neotree buffer is created

JediLuke commented 5 years ago

Incase anyone else comes across this, I created the following workaround

(defun move-window-far-right-with-neotree-workaround ()
   (interactive)
   (if (neo-global--window-exists-p)
         (progn (neotree-hide)
                (evil-window-move-far-right)
                (neotree-show))
         ; else
         (evil-window-move-far-right)))
Abdisalan commented 1 year ago

Can you clarify how the bug is happening? I'm not able to recreate it doing these actions

  1. Open NeoTree with 2 other windows (like your first diagram)
  2. I go to window 1 and run evil-window-move-far-right

Also, are you able to recreate it by only running the neotree package? emacs -q -l path/to/neotree.el

Abdisalan commented 1 year ago

Closing as stale. If you're still experiencing this, please open a new issue.