rc man: Expose the actual buffer-space's width

Fixes #675
This commit is contained in:
Frank LENORMAND 2019-10-20 21:38:58 +02:00
parent 4499286070
commit 2ed70ad5cc

View File

@ -33,7 +33,7 @@ define-command -hidden -params 2..3 man-impl %{ evaluate-commands %sh{
manout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) manout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX)
manerr=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) manerr=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX)
colout=$(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=$? retval=$?
col -b -x > ${colout} < ${manout} col -b -x > ${colout} < ${manout}
rm ${manout} rm ${manout}