mirror of
https://github.com/neovim/neovim.git
synced 2026-05-27 07:18:36 +00:00
feat(options): add 'winpinned' to pin a window #39157
Problem: - Unable to "pin" a window to prevent closing without specifically being targeted. - :fclose closes hidden windows (even before visible windows). Solution: - Add 'winpinned' window-local option. When set, window is skipped by :fclose and :only. Pin the ui2 cmdline window (which should always be visible), so that it is not closed by :only/fclose. - Skip over hidden (and pinned) windows with :fclose. Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -10713,6 +10713,19 @@ local options = {
|
||||
type = 'number',
|
||||
varname = 'p_wmw',
|
||||
},
|
||||
{
|
||||
abbreviation = 'wp',
|
||||
defaults = false,
|
||||
desc = [=[
|
||||
If enabled, the window is pinned and will not be closed by |:only|
|
||||
and |:fclose|. Only commands specifically targeting the window can
|
||||
close it.
|
||||
]=],
|
||||
full_name = 'winpinned',
|
||||
scope = { 'win' },
|
||||
short_desc = N_('prevent closing window with :only and :fclose'),
|
||||
type = 'boolean',
|
||||
},
|
||||
{
|
||||
abbreviation = 'wiw',
|
||||
cb = 'did_set_winwidth',
|
||||
|
||||
Reference in New Issue
Block a user