Change lib.open_file semantics somewhat to open files in the window from which the tree was opened, if possible. I call this window the target. If the buffer in the target window is modified, then execute the desired configured split (split or vsplit) relative to the target. If the target is unmodified, open the selected node in the target, hiding the buffer. If the selected node is already visible in a window, don't do any of the foregoing; instead, just jump to that window. If the target has been closed, the preserve the original semantics. |
||
|---|---|---|
| .. | ||
| lib | ||
| nvim-tree.lua | ||