fix(man.lua): open in current window if it's already a man page (#21987)

This matters when there are multiple man page windows open.
This commit is contained in:
0xAdk 2023-01-25 06:39:25 -08:00 committed by GitHub
parent e2a9d71521
commit 3c48d3c83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,6 +420,10 @@ local function extract_sect_and_name_path(path)
end
local function find_man()
if vim.bo.filetype == 'man' then
return true
end
local win = 1
while win <= fn.winnr('$') do
local buf = fn.winbufnr(win)