Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wezterm strategy doesn't work again if test pane is closed #784

Open
jsilasbailey opened this issue Jan 12, 2024 · 2 comments
Open

Wezterm strategy doesn't work again if test pane is closed #784

jsilasbailey opened this issue Jan 12, 2024 · 2 comments

Comments

@jsilasbailey
Copy link

When using the wezterm strategy, after the initial test pane is split, if that pane is closed

To reproduce

  1. Run :TestNearest (pane is successfully split)
  2. Exit the pane (CTRL-D)
  3. Run :TestNearest again (pane will not re-open)

Versions:
nvim: 0.9.5
vim-test: master
wezterm: 20230712-072601-f4abf8fd

@emilford
Copy link
Contributor

Hey @jsilasbailey.

Hope you're doing well!

I came across this issue after running into this same behavior myself and looking for a solution. I haven't tested it much but clearing the test#wezterm#pane_id allows closing and re-opening a pane to work as expected. I was expecting it to break in other ways, but I haven't run into anything yet in my minimal testing. If you're still using this combo this may work for you as well as a temporary workaround.

  init = function()
    vim.g["test#custom_strategies"] = {
      wezterm_wrapped = function(cmd)
        vim.fn["test#strategy#wezterm"]("clear; " .. cmd .. "\n")
        vim.g["test#wezterm#pane_id"] = nil
      end,
    }

    vim.g["test#strategy"] = "wezterm_wrapped"
  end,

@jsilasbailey
Copy link
Author

jsilasbailey commented May 9, 2024

Hey @emilford! Doing well thanks! I actually noticed this with another strategy as well (the neovim_sticky I believe) so I wonder if there is some generic handling of this that isn't working. I went back to tmux instead of using wezterms built in panes and windows so haven't needed this to work recently but I'll look into testing what you have there to confirm it works for me as well.

Also just want to say that I check your nvim dotfiles every now and again to see what new things are happening haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants