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

having 2 buffers and closing one via 'bd' unset rnu and nu #8

Closed
zijian-x opened this issue Sep 1, 2021 · 4 comments
Closed

having 2 buffers and closing one via 'bd' unset rnu and nu #8

zijian-x opened this issue Sep 1, 2021 · 4 comments

Comments

@zijian-x
Copy link

zijian-x commented Sep 1, 2021

open nvim and have more than 2 buffers, then close one via :bd while in venter mode unset relative number and number.

using neovim: NVIM v0.6.0-dev+206-g284199bc4

@JMcKiern
Copy link
Owner

JMcKiern commented Sep 4, 2021

Hmm, I can't replicate this with NVIM v0.5.0 (their latest nightly job failed so there is no nightly release is available - and I can't be bothered to build from source).

The only time number and relativenumber are modified is in the snippet below but this should only change what is shown in the newly created window from L135 as both settings are "local to window".

execute 'vertical '.a:pos.' new'
" Add empty lines
call append(0, map(range(0, &lines), '""'))
normal! gg
" Buffer settings
set nonumber norelativenumber nocursorline nocursorcolumn
setlocal buftype=nofile bufhidden=wipe nomodifiable nobuflisted

If I remember to, I will try to replicate this bug with the next neovim nightly.

@zijian-x
Copy link
Author

zijian-x commented Sep 5, 2021

Maybe it is caused by other plugins so I tested again with a minimal config(config.vim) consisting of

set rnu nu

call plug#begin('$XDG_DATA_HOME/nvim/site/plugged')
	Plug 'jmckiern/vim-venter'
call plug#end()
nnoremap ,z <CMD>VenterToggle<CR>

and running nvim -u config.vim buf1 buf2, using ,z start venter, and then just :bd to delete the first buffer and untoggle venter mode, displaying a [No Name] buffer with relative number and number unset, which can be resetted via set rnu nu again.
Removed the nightly and installed the stable version from official repo (pacman -S neovim) caused the same thing on my machine.
Unfortunately I am so illiterate with it comes to vimL, and it's a minor thing anyway and I've been using a custom command to delete buffers while in venter mode via b# | bd #, which works flawlessly except when there is only a single buffer.

@zijian-x
Copy link
Author

zijian-x commented Sep 7, 2021

Update:
I've tried an other minimal plugin henriquehbr/ataraxis.lua, with which it also disabled rnu and nu on closing the buffer. Now I think it's rather an internal issue, rather than an issue with the plugins itself.

@zijian-x zijian-x closed this as completed Sep 7, 2021
@JMcKiern
Copy link
Owner

Interesting, thanks for getting back!

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