term_font: Fix crash when parsing Xresources. Closes #1195
This commit is contained in:
parent
6e9f00445f
commit
7fd9ff75a3
1 changed files with 10 additions and 3 deletions
13
neofetch
13
neofetch
|
@ -4194,10 +4194,17 @@ term_padding() {
|
||||||
|
|
||||||
case "$term" in
|
case "$term" in
|
||||||
urxvt*|"rxvt-unicode")
|
urxvt*|"rxvt-unicode")
|
||||||
[[ -z "$xrdb" ]] && xrdb="$(xrdb -query)"
|
[[ -z "$xrdb" ]] &&
|
||||||
[[ $xrdb != *.internalBorder:* ]] && return
|
xrdb="$(xrdb -query)"
|
||||||
|
|
||||||
|
[[ $xrdb != *".internalBorder:"* ]] &&
|
||||||
|
return
|
||||||
|
|
||||||
padding="${xrdb/*.internalBorder:}"
|
padding="${xrdb/*.internalBorder:}"
|
||||||
((padding=${padding/$'\n'*}))
|
padding="${padding/$'\n'*}"
|
||||||
|
|
||||||
|
[[ $padding =~ ^[0-9]+$ ]] ||
|
||||||
|
padding=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue