From 2ed70ad5cc606d604a0b9573b5e279463fc79721 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Sun, 20 Oct 2019 21:38:58 +0200 Subject: [PATCH] rc man: Expose the actual buffer-space's width Fixes #675 --- rc/tools/man.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/tools/man.kak b/rc/tools/man.kak index b167343e..8d450fab 100644 --- a/rc/tools/man.kak +++ b/rc/tools/man.kak @@ -33,7 +33,7 @@ define-command -hidden -params 2..3 man-impl %{ evaluate-commands %sh{ manout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) manerr=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) colout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) - MANWIDTH=${kak_window_width} man "$@" > "$manout" 2> "$manerr" + env MANWIDTH=${kak_window_range##* } man "$@" > "$manout" 2> "$manerr" retval=$? col -b -x > ${colout} < ${manout} rm ${manout}