commit 3c48d3c83fc21dbc0841f9210f04bdb073d73cd1
parent e2a9d71521a1acdc5a554e3d9f54dfe543914db5
Author: 0xAdk <29005635+0xAdk@users.noreply.github.com>
Date: Wed, 25 Jan 2023 06:39:25 -0800
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.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
@@ -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)