alok / notational-fzf-vim

Notational velocity for vim.
1.12k stars 64 forks source link

Add path normalization so \\users\\xy can be opened #53

Closed Yogen88 closed 4 years ago

Yogen88 commented 4 years ago

On windows if the notes are in the %userprofile%/example directory, preview is not available, since python gets \users\xy\example\xy path which open can't handle, and it will crash silently since called with 2 > NUL

alok commented 4 years ago

@Laptop765 mind testing this? i don't have a windows machine.

Laptop765 commented 4 years ago

Sure, I’ll be happy to take a look! I should be able to tonight.

Sent with GitHawk

Laptop765 commented 4 years ago

@Yogen88 I'm not sure I repro the problem. I tried setting g:nv_search_paths = ['\\unc\network\path\to\dir'] and it worked fine without the fix. Could you post an example g:nv_search_paths that shows the bug? I'm also a bit confused how %userprofile%/example turns into \users\xy\example\xy.

Yogen88 commented 4 years ago

Hello, I used let g:nv_search_paths = ['~/wiki'] It turns into \\users\\myusername\\wiki if I print out file variable in python

Laptop765 commented 4 years ago

@Yogen88 Thanks, I understand where my confusion came from now =)

@alok The change looks good to me!