File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ autodetect() {
6262 IFS=" ;" read -a REPLY -s -t ${timeout} -d " S" -p $' \e [?1;1;0S' >&2
6363 [[ ${REPLY[1]} == " 0" ]] && numcolors=${REPLY[2]}
6464
65+ # BUG WORKAROUND: mlterm does not report number of colors.
66+ if [[ $TERM =~ mlterm ]]; then numcolors=1024; fi
67+
6568 # Increase colors, if needed
6669 if [[ $numcolors -lt 256 ]]; then
6770 # Attempt to set the number of colors to 256.
@@ -97,7 +100,7 @@ autodetect() {
97100
98101 # BUG WORKAROUND: XTerm cannot show images wider than 1000px.
99102 # Remove this hack once XTerm gets fixed. Last checked: XTerm(327)
100- if [[ $width -ge 1000 ]]; then width=1000; fi
103+ if [[ $TERM =~ xterm && $ width -ge 1000 ]]; then width=1000; fi
101104
102105 # Space on either side of each tile is less than 0.5% of total screen width
103106 tilexspace=$(( width/ 201 ))
You can’t perform that action at this time.
0 commit comments