When terminal occupies main window and user directly opens a file (:e somefile) in that window, the window's buffer no longer matches term.bufnr. Previously this caused the hide path to incorrectly swap back original_bufnr, wiping the user's file. Now we detect mismatch, clear winid/borrowed, and re-evaluate use_main — which will correctly fall through to a split when a real file is present. |
||
|---|---|---|
| .. | ||
| init.lua | ||