Git Product home page Git Product logo

Comments (3)

fannheyward avatar fannheyward commented on August 17, 2024

Can't reproduce with vim 9.1 and nvim. Here's my steps:

  1. mkdir -p ~/A and mkdir -p ~/B
  2. cd ~/A
  3. vim B/test4.txt -c "cd ~/B"
  4. CocList mru, B/test4.txt exists

from coc.nvim.

aispeaking avatar aispeaking commented on August 17, 2024

@fannheyward

  1. vim B/test4.txt -c "cd ~/B"

Missing the ~/ before B, which create a folder under current folder A. C-g will print ~/A/B/test4.txt.
Using vim ~/B/test4.txt -c "cd ~/B" instead.

from coc.nvim.

fannheyward avatar fannheyward commented on August 17, 2024

Reproduced. The core issue is workspace root detecting.

vim ~/B/test4.txt -c "cd ~/B" still uses ~/A as cwd, by default, mru only lists files that under current cwd, that's why test4 is missing. You can use :CocList mru -A to list all.

https://github.com/neoclide/coc-lists/blob/720f8713860a6c45be6aac6b042416c9de680173/src/mru.ts#L95

coc.nvim didn't change the root at cmd -c "cd ~/B". Looks like vim didn't fire DirChanged on the cmd.

events.on('DirChanged', cwd => {
this._cwd = normalizeFilePath(cwd)
}, null, this.disposables)

from coc.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.