feat(man): respect 'wrapmargin' when wrapping man pages (#24091)

This commit is contained in:
Gregory Anders 2023-06-21 14:42:23 -05:00 committed by GitHub
parent e27377e33e
commit 08db61b19b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -134,6 +134,8 @@ The following changes to existing APIs or features add new behavior.
• |:checkhealth| buffer now implements |folding|. The initial folding status is
defined by the 'foldenable' option.
• |:Man| now respects 'wrapmargin'
==============================================================================
REMOVED FEATURES *news-removed*

View File

@ -436,7 +436,7 @@ local function get_page(path, silent)
elseif vim.env.MANWIDTH then
manwidth = vim.env.MANWIDTH
else
manwidth = api.nvim_win_get_width(0)
manwidth = api.nvim_win_get_width(0) - vim.o.wrapmargin
end
local cmd = localfile_arg and { 'man', '-l', path } or { 'man', path }