Fix: use relative path when opening wiki files by jpmor · Pull Request #1450 · vimwiki/vimwiki
added
need-more-info
link
labels
Nov 30, 2024Use fnamemodify's ':.' modifier so vimwiki buffers display paths relative to the current directory rather than absolute paths, matching standard Vim behavior when opening files directly. Apply fnamemodify to the raw a:filename before fnameescape, since fnamemodify expects a literal path. Escaping first would cause incorrect results for filenames with spaces or special characters.
jpmor
changed the title
Use relative filename modifier.
Fix: use relative path when opening wiki files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters