Commit afc29ac4 authored by Dylan Araps's avatar Dylan Araps

general: Faster read on newer bash

parent caea0f05
......@@ -3573,7 +3573,10 @@ get_window_size() {
# user input so we have to use read to store the out
# -put as a variable.
# The 1 second timeout is required for older bash
IFS=';t' read -d t -t 1 -sra term_size
case "${BASH_VERSINFO[0]}" in
4|5) IFS=';t' read -d t -t 0.05 -sra term_size ;;
*) IFS=';t' read -d t -t 1 -sra term_size ;;
esac
unset IFS
# Split the string into height/width.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment