Skip to content

Commit 08db61b

Browse files
authored
feat(man): respect 'wrapmargin' when wrapping man pages (neovim#24091)
1 parent e27377e commit 08db61b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

runtime/doc/news.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ The following changes to existing APIs or features add new behavior.
134134
|:checkhealth| buffer now implements |folding|. The initial folding status is
135135
defined by the 'foldenable' option.
136136

137+
|:Man| now respects 'wrapmargin'
138+
137139
==============================================================================
138140
REMOVED FEATURES *news-removed*
139141

runtime/lua/man.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ local function get_page(path, silent)
436436
elseif vim.env.MANWIDTH then
437437
manwidth = vim.env.MANWIDTH
438438
else
439-
manwidth = api.nvim_win_get_width(0)
439+
manwidth = api.nvim_win_get_width(0) - vim.o.wrapmargin
440440
end
441441

442442
local cmd = localfile_arg and { 'man', '-l', path } or { 'man', path }

0 commit comments

Comments
 (0)