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

[Bug]: System exit > 0 after upgrade to v1.3.1 (v1.3.0 works fine) #158

Closed
1 task done
chardskarth opened this issue Feb 26, 2024 · 11 comments · Fixed by #159
Closed
1 task done

[Bug]: System exit > 0 after upgrade to v1.3.1 (v1.3.0 works fine) #158

chardskarth opened this issue Feb 26, 2024 · 11 comments · Fixed by #159
Assignees
Labels
bug Something isn't working

Comments

@chardskarth
Copy link

chardskarth commented Feb 26, 2024

Similar Issues

  • Before filing, I have searched for similar issues.

Neovim Version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info

Multiplexer Integration

tmux

Multiplexer Version

tmux 3.3a

Steps to Reproduce

  1. Start tmux session
  2. Open neovim
  3. Exit

Expected Behavior

System should exit without any error status code

Actual Behavior

Exits with more than 0 status code

Minimal Configuration to Reproduce

local root = vim.fn.fnamemodify('./.repro', ':p')

-- set stdpaths to use .repro
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
  vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end

-- bootstrap lazy
local lazypath = root .. '/plugins/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    '--single-branch',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  -- do not remove the colorscheme! it makes testing nicer
  'folke/tokyonight.nvim',
  'mrjones2014/smart-splits.nvim',
  -- add any other pugins here
}

require('lazy').setup(plugins, {
  root = root .. '/plugins',
})

-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme! it makes testing nicer
vim.cmd([[colorscheme tokyonight]])

Additional Details and/or Screenshots

No response

@chardskarth chardskarth added the bug Something isn't working label Feb 26, 2024
@mrjones2014
Copy link
Owner

Try updating tmux. I cannot reproduce on tmux 3.4

@tlindsay
Copy link

I'm getting the same issue on tmux v3.4. Neovim exits with a 134 with smart-splits v1.3.1, 0 on smart-splits v1.3.0.

I started investigating this in the first place because this seems to also be responsible for breaking things that open the $EDITOR in the middle of the command like git commit --amend. Again, that all works on v1.3.0, but on v1.3.1 I get something like this:

$ git commit --amend
hint: Waiting for your editor to close the file... error: There was a problem with the editor 'nvim'.
Please supply the message using either -m or -F option.

@tlindsay
Copy link

I've also confirmed that commenting out the body of the on_exit method fixes both of my problems. I'm not sure why, as the logs don't indicate that these tmux commands are failing and running them manually seems to work as expected.

I haven't updated my tmux config to use the new @pane-is-vim stuff yet. Not sure if that's important or not.

@mrjones2014
Copy link
Owner

Ah, I probably need to check if the vim loop has exited already before checking the error

@mrjones2014
Copy link
Owner

Thanks for investigating!

@mrjones2014
Copy link
Owner

@tlindsay could you please test #159 and let me know if that fixes the issue?

@mrjones2014
Copy link
Owner

If that doesn't fix it we can try the workaround here: neovim/neovim#21856 (comment)

@tlindsay
Copy link

@mrjones2014 Nope, still getting the error...

$ tmux -V
tmux 3.4
$ git commit --amend
hint: Waiting for your editor to close the file... error: There was a problem with the editor 'nvim'.
Please supply the message using either -m or -F option.

Screen Shot 2024-02-28 at 17 10 28

@tlindsay
Copy link

Oh! But the exit code is now 1 instead of 134....

@mrjones2014
Copy link
Owner

Okay, I've added the workaround I linked, can you test again?

@tlindsay
Copy link

@mrjones2014 Yep, that did the trick! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants