Skip to content

:WikiFzfPages fails for iCloud directory #243

@dfsnow

Description

@dfsnow

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.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions