otavioschwanck / arrow.nvim

Bookmark your files, separated by project, and quickly navigate through them.
Other
454 stars 19 forks source link

Fix normalization of path name to be compatabile with windows #14

Closed oonamo closed 6 months ago

oonamo commented 6 months ago

On windows, trying to save a file would result in an error on line 115 in persist.lua in function cache_file.
The path would look something like this: C:\Users\user_name\AppData\Local\Temp/arrow.nvim/C:\Users\user_name\..."

This change normalizes the path to use forward slashes so the proper substitutions are done to the path.

oonamo commented 6 months ago

Also managed to fix an issue with the cursor disappearing after leaving the UI with scheduling. The issue was related to the timing of the executions of the autocommand to that of the buffer actually leaving, so by wrapping it in a vim.schedule, it lets neovim do its thing.

otavioschwanck commented 6 months ago

Thanks for the PR <3