From ba48b0489b2963f5edc6ddad6510adfa96a4f3e7 Mon Sep 17 00:00:00 2001 From: obemu Date: Thu, 19 Dec 2024 11:22:20 +0100 Subject: [PATCH] Added global vim variable 'is_cppman_active', when using vim or nvim as a pager --- cppman/lib/pager.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cppman/lib/pager.sh b/cppman/lib/pager.sh index 2805f0e..439be07 100755 --- a/cppman/lib/pager.sh +++ b/cppman/lib/pager.sh @@ -84,15 +84,22 @@ case $pager_type in [ -z "$PAGER" ] && PAGER=less render | $PAGER ;; - vim|nvim) + vim|nvim) render | remove_escape 3<&- | { - $pager_type -R -c "let g:page_name=\"$page_name\"" -S $vim_config /dev/fd/3