-
-
Notifications
You must be signed in to change notification settings - Fork 955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect cwd when call vim with '-c cd xxx' #5037
Comments
Can't reproduce with vim 9.1 and nvim. Here's my steps:
|
Missing the |
Reproduced. The core issue is workspace root detecting.
https://github.com/neoclide/coc-lists/blob/720f8713860a6c45be6aac6b042416c9de680173/src/mru.ts#L95 coc.nvim didn't change the root at cmd coc.nvim/src/core/documents.ts Lines 84 to 86 in 26d7db1
|
@fannheyward How about init |
Yes, the |
This issue only occurs in vim, nvim will fire |
Result from CocInfo
versions
vim version: VIM - Vi IMproved 9.0 9001563
node version: v20.12.0
coc.nvim version: 0.0.82-c3ae5c3 2024-05-23 20:39:40 +0800
coc.nvim directory: /home/liyt/code/extern/vim-runtime/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-06-11T16:20:08.984 INFO (pid:852781) [extension:coc-git] - Looking for git in: git
2024-06-11T16:20:09.017 WARN (pid:852781) [workspace] - Extension "undefined" registered synchronized autocmd "VimLeavePre", which could be slow.
2024-06-11T16:20:10.176 INFO (pid:852781) [plugin] - coc.nvim initialized with node: v20.12.0 after 1423
2024-06-11T16:20:10.297 INFO (pid:852781) [extension:@yaegassy/coc-marksman] - marksman binary is already downloaded
2024-06-11T16:20:10.302 INFO (pid:852781) [language-client-index] - Language server "marksman" started with 852834
2024-06-11T16:20:10.343 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 7 ]
2024-06-11T16:20:11.911 INFO (pid:852781) [extension:@yaegassy/coc-marksman] - Client onReady
2024-06-11T16:20:11.943 INFO (pid:852781) [extension:@yaegassy/coc-marksman] - Got marksman/status notification
2024-06-11T16:20:15.053 INFO (pid:852781) [attach] - receive notification: openList [ 'mru' ]
2024-06-11T16:20:15.054 INFO (pid:852781) [extension:coc-lists] - cwd: /home/liyt/.config/coc/extensions/node_modules/coc-lists/lib
2024-06-11T16:20:15.088 INFO (pid:852781) [extension:coc-lists] - files: /share/note/notebook.md
2024-06-11T16:20:15.095 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 2, 2 ]
2024-06-11T16:20:15.114 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 7 ]
2024-06-11T16:20:16.677 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 7 ]
2024-06-11T16:20:16.727 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 7 ]
2024-06-11T16:20:22.525 INFO (pid:852781) [attach] - receive notification: openList [ 'mru' ]
2024-06-11T16:20:22.526 INFO (pid:852781) [extension:coc-lists] - cwd: /share/note
2024-06-11T16:20:22.556 INFO (pid:852781) [extension:coc-lists] - files: /share/note/notebook.md
2024-06-11T16:20:22.567 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 2, 3 ]
2024-06-11T16:20:22.584 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 7 ]
2024-06-11T16:20:23.560 INFO (pid:852781) [attach] - receive notification: doAutocmd [ 7 ]
2024-06-11T16:20:26.440 INFO (pid:852781) [attach] - receive notification: showInfo []
Describe the bug
When using
vim /share/note/notebook.md -c 'cd /share/note
and then openmru
list, no recent files in/share/note
exist.I add some log to print the cwd in mru list and found it is not the expected one as
:pwd
.Reproduce the bug
A
.B
and cd toB
in vim arguments:vim /B/test.txt -c 'cd /B'
. Make sureB
is not a sub dir ofA
.CocList mru
in vim./B/test.txt
is not there.cd /B
in vim.CocList mrc
again./B/test.txt
is in the list.Screenshots (optional)
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: