nvlime
nvlime copied to clipboard
Fix REPL window opening in a redundant split
If there are multiple tabs where each has its own REPL window (sharing the same buffer), then an issue occurs that opens a new split with a REPL window instead of reusing an existing one. This occurs because there is always only one "main window" which has a single associated REPL window, and there is no code that recalculates the current REPL window when the main one changes (e.g, when switching tabs).
Steps to reproduce:
- Start a server and connect to it.
- Send something to the REPL so that its window opens in a split in the current tab.
- Open a new tab and repeat step 2 there.
- Go back to the first tab, repeat step 2.
This change adds specific behaviour for REPL windows to try and reuse existing ones in the current tab.