nvlime icon indicating copy to clipboard operation
nvlime copied to clipboard

Fix REPL window opening in a redundant split

Open homedirectory opened this issue 1 year ago • 0 comments

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:

  1. Start a server and connect to it.
  2. Send something to the REPL so that its window opens in a split in the current tab.
  3. Open a new tab and repeat step 2 there.
  4. 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.

homedirectory avatar Mar 09 '24 19:03 homedirectory