vim-ctrlspace / vim-ctrlspace

Vim Space Controller
1.75k stars 73 forks source link

Error loading workspace #302

Closed lvim-tech closed 3 years ago

lvim-tech commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Save bookmarks
  2. Save workspace (not found root directory)
  3. Manualy set root directory
  4. Save workspace
  5. Close nvim
  6. Open nvim
  7. Load bookmark
  8. Error loading workspace

Expected behavior It should load my workspace properly.

Screenshots Screenshot from 2021-09-25 12-27-26

Version(s) (please complete the following information):

Additional context nvim 0.5 - same problem

Konfekt commented 3 years ago

The pen-ultimate step, Load bookmark, only changes directory to the bookmarked directory. Then, over here, loading the saved workspace, say named ws, works fine.

How come with your setup loading the bookmark directly loads a workspace (which one?). (I suspected it due to let g:CtrlSpaceLoadLastWorkspaceOnStart = 1 but to no avail.)

Konfekt commented 3 years ago

As an aside, the last commit should make let g:CtrlSpaceLoadLastWorkspaceOnStart = 1 work for custom root dirs without repo root markers.

Konfekt commented 3 years ago

I decided against loading the last active workspace by default on loading a bookmark (in addition to loading it on Vim startup) if CtrlSpaceLoadLastWorkspaceOnStart = 1 because it will break users' expectactions.