Code Monkey home page Code Monkey logo

Comments (7)

gelguy avatar gelguy commented on May 30, 2024

I can reproduce this. Renderer has to be using a floating window (e.g. wildmenu_renderer with mode: 'float' or popupmenu_renderer).

This is a Neovim bug, see neovim/neovim#15280.

A workaround is to use an autocmd instead of autochdir.

autocmd BufEnter * call Chdir()

function! Chdir()
  let l:dir = expand('%:p:h')
  if isdirectory(l:dir)
    execute 'cd ' . l:dir
  endif
endfunction

But I'm not sure if this fully replaces what autochdir does.

from wilder.nvim.

cnfczn avatar cnfczn commented on May 30, 2024

There seems to be a problem with the chdir function. For example, I open three files in turn:
/home/user1/file1
/home/user1/dir1/file2
/home/user1/file3
Then, file3 is turned off, the active buffer is file2, and the current path will stay at /home/user1 instead of /home/user1/dir1

from wilder.nvim.

gelguy avatar gelguy commented on May 30, 2024

I can't reproduce this.

Could you elaborate on what it means to turn off file3? Or list the steps in terms of :e file1, :bdelete file1, etc.

from wilder.nvim.

cnfczn avatar cnfczn commented on May 30, 2024

I tried again today, and I couldn't reproduce the problem. thank you for your reply. Looking forward to neovim fixing the float window bug.

from wilder.nvim.

zeertzjq avatar zeertzjq commented on May 30, 2024

This is actually a bug of nvim_buf_set_name().

from wilder.nvim.

kontheocharis avatar kontheocharis commented on May 30, 2024

Has there been any progress with this? The workaround proposed by @gelguy works about 90% of the time but sometimes it does not change the directory.

from wilder.nvim.

gelguy avatar gelguy commented on May 30, 2024

This is blocked by the bug mentioned in neovim/neovim#15280.

from wilder.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.