-
Notifications
You must be signed in to change notification settings - Fork 66
:WikiFzfPages fails for iCloud directory #243
Copy link
Copy link
Closed
Description
Using :WikiFzfPages fails when the root dir is set to an iCloud Drive directory or any directory with a ~ in the path. The error is
(NFA) Could not pop the stack!
The full path to iCloud Drive on Mac systems is now: ~/Library/Mobile\ Documents/com~apple~CloudDocs. When :WikiFzfPages is creating paths to search (L20), it uses the filenames within substitute() but doesn't escape the extra tildes, resulting in the error.
wiki.vim/autoload/wiki/fzf.vim
Lines 18 to 22 in e310526
| call map(l:pages, {_, x -> x . '#####' | |
| \ .'/' . fnamemodify( | |
| \ substitute(x, escape(l:root, '\'), '', ''), | |
| \ ':r') | |
| \}) |
A possible fix is to escape the path with '\V', like so:
substitute(x, '\V' . escape(l:root, '\'), '', '')
See this issue for reference.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels