Skip to content

Commit 5d5825b

Browse files
committed
Revert "headerline: Fix error for files with symlinks (#3913)"
This reverts commit 653c31a. - Fixes #3951
1 parent 32d3cdd commit 5d5825b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lsp-headerline.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,12 @@ PATH is the current folder to be checked."
313313
(defun lsp-headerline--build-path-up-to-project-string ()
314314
"Build the path-up-to-project segment for the breadcrumb."
315315
(if-let ((root (lsp-headerline--workspace-root)))
316-
(let ((segments (progn
317-
(unless lsp-headerline--path-up-to-project-segments
318-
(setq lsp-headerline--path-up-to-project-segments
319-
(list (lsp-headerline--path-up-to-project-root
320-
root
321-
(file-name-directory (file-truename (buffer-file-name)))))))
322-
(car lsp-headerline--path-up-to-project-segments))))
316+
(let ((segments (or
317+
lsp-headerline--path-up-to-project-segments
318+
(setq lsp-headerline--path-up-to-project-segments
319+
(lsp-headerline--path-up-to-project-root
320+
root
321+
(lsp-f-parent (buffer-file-name)))))))
323322
(mapconcat (lambda (next-dir)
324323
(propertize next-dir
325324
'font-lock-face

0 commit comments

Comments
 (0)