Image: Possibly fix xterm 1/0 error.

This commit is contained in:
Dylan Araps 2017-06-30 13:59:19 +10:00
parent 6a483c1ad5
commit 69deb4309d
1 changed files with 1 additions and 1 deletions

View File

@ -2404,7 +2404,7 @@ get_term_size() {
fi
# Get terminal width/height if \033[14t is unsupported.
if [[ -z "$term_width" ]]; then
if [[ -z "$term_width" ]] || (( "$term_width" < 50 )); then
if type -p xdotool >/dev/null 2>&1; then
current_window="$(xdotool getactivewindow)"
source <(xdotool getwindowgeometry --shell "$current_window")