fix(cli): ignore invalid __DOOMGEOM value
This commit is contained in:
parent
beef0aef02
commit
074f63ff31
1 changed files with 5 additions and 5 deletions
|
@ -576,11 +576,11 @@ Throws `doom-cli-invalid-option-error' for illegal values."
|
||||||
(string-to-number step)
|
(string-to-number step)
|
||||||
-1))
|
-1))
|
||||||
;; The geometry of the terminal window.
|
;; The geometry of the terminal window.
|
||||||
(geometry (when-let* ((geom (getenv "__DOOMGEOM"))
|
(geometry (save-match-data
|
||||||
((not (string-blank-p geom)))
|
(when-let* ((geom (getenv "__DOOMGEOM"))
|
||||||
(geom (split-string geom "x")))
|
((string-match "^\\([0-9]+\\)x\\([0-9]+\\)$" geom)))
|
||||||
(cons (string-to-number (car geom))
|
(cons (string-to-number (match-string 1 geom))
|
||||||
(string-to-number (cadr geom)))))
|
(string-to-number (match-string 2 geom))))))
|
||||||
;; Whether the script is being piped into or out of
|
;; Whether the script is being piped into or out of
|
||||||
(pipes (cl-loop for (env . scope) in `((,(getenv "__DOOMGPIPE") . global)
|
(pipes (cl-loop for (env . scope) in `((,(getenv "__DOOMGPIPE") . global)
|
||||||
(,(getenv "__DOOMPIPE") . local))
|
(,(getenv "__DOOMPIPE") . local))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue