mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 20:03:48 -05:00
Previously closing NERDTree while two windows were showing the same buffer would focus the first window, which was not necessarily the previously active one. Instead of obtaining the buffer ID of the previous buffer and mapping that to the window ID (which is a 1:n mapping) we obtain the unique window ID and focus the right window after closing NERDTree. win_getid() and win_gotoid() are available from VIM 7.4.1557 but the old behavior is used as a fallback if the two functions are not available.