neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit ea5b748f243883b9890e465d4abef598fe2b07fc
parent 84623dbe93777c0a8e7ddf57470ddeb2ea738069
Author: xudyang1 <61672396+xudyang1@users.noreply.github.com>
Date:   Tue, 15 Oct 2024 11:34:50 -0400

feat(man.vim): "q" always closes window #30819


Diffstat:
Mruntime/doc/news.txt | 4++++
Mruntime/ftplugin/man.vim | 6+-----
Mruntime/lua/man.lua | 1-
3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt @@ -269,6 +269,10 @@ These existing features changed their behavior. • |vim.on_key()| callbacks won't be invoked recursively when a callback itself consumes input. +• "q" in man pages now uses |CTRL-W_q| instead of |CTRL-W_c| to close the + current window, and it no longer throws |E444| when there is only one window + on the screen. Global variable `vim.g.pager` is removed. + ============================================================================== REMOVED FEATURES *news-removed* diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim @@ -26,11 +26,7 @@ if !exists('g:no_plugin_maps') && !exists('g:no_man_maps') nnoremap <silent> <buffer> k gk nnoremap <silent> <buffer> gO :lua require'man'.show_toc()<CR> nnoremap <silent> <buffer> <2-LeftMouse> :Man<CR> - if get(g:, 'pager') - nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>q - else - nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c - endif + nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>q endif if get(g:, 'ft_man_folding_enable', 0) diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua @@ -675,7 +675,6 @@ function M.init_pager() vim.cmd.file({ 'man://' .. fn.fnameescape(ref):lower(), mods = { silent = true } }) end - vim.g.pager = true set_options() end