Skip to content

Commit a27d122

Browse files
committed
avoid showing invalid fringe color when color is invalid
1 parent d198100 commit a27d122

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lsp-dart-flutter-fringe.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ Increase for a better performance."
8181
(save-excursion
8282
(goto-char (point-min))
8383
(while (re-search-forward lsp-dart-flutter-fringe-color-name-pattern nil t)
84-
(let ((color (concat "#" (-> (match-string 1)
85-
(assoc lsp-dart-flutter-colors)
86-
cdr))))
87-
(lsp-dart-flutter-fringe--add-color color buffer (point-at-bol))))
84+
(if-let ((color (-> (match-string 1)
85+
(assoc lsp-dart-flutter-colors)
86+
cdr)))
87+
(lsp-dart-flutter-fringe--add-color (concat "#" color) buffer (point-at-bol))))
8888
(goto-char (point-min))
8989
(while (re-search-forward lsp-dart-flutter-fringe-color-hex-pattern nil t)
9090
(let ((color (concat "#" (substring (match-string 1) 2))))

0 commit comments

Comments
 (0)