Skip to content

Commit 0b4bfd4

Browse files
authored
Fix errors while calling go-coverage. (#3058)
Fix #3056. buffer-file-name may be nil in some buffers.
1 parent 9eb043f commit 0b4bfd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lsp-headerline.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ PATH is the current folder to be checked."
259259

260260
(defun lsp-headerline--build-file-string ()
261261
"Build the file-segment string for the breadcrumb."
262-
(let* ((file-path (buffer-file-name))
262+
(let* ((file-path (or (buffer-file-name) ""))
263263
(filename (f-filename file-path)))
264264
(if-let ((file-ext (f-ext file-path)))
265265
(concat (lsp-icons-get-by-file-ext file-ext 'headerline-breadcrumb)

0 commit comments

Comments
 (0)