mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-27 02:23:26 +03:00
rc man: Handle early window resize
If the window gets resized before the `man` command is called, the hook will error out and display an error. Fix #3432
This commit is contained in:
parent
a56a03c454
commit
61366fd1ef
@ -27,8 +27,11 @@ hook global WinSetOption filetype=man %{
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window man-hooks }
|
||||
}
|
||||
|
||||
define-command -hidden -params 2..3 man-impl %{ evaluate-commands %sh{
|
||||
define-command -hidden -params ..3 man-impl %{ evaluate-commands %sh{
|
||||
buffer_name="$1"
|
||||
if [ -z "${buffer_name}" ]; then
|
||||
exit
|
||||
fi
|
||||
shift
|
||||
manout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX)
|
||||
manerr=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX)
|
||||
|
Loading…
Reference in New Issue
Block a user