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