Skip to content
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

BUG: The buffer recovered from the session lost its focus function in the directory #1026

Open
3 tasks done
CnsMaple opened this issue Jul 4, 2023 · 5 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working working-on-it

Comments

@CnsMaple
Copy link

CnsMaple commented Jul 4, 2023

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

NVIM v0.9.1

Operating System / Version

windows11

Describe the Bug

i use lazy.nvim.this is my session plugins:

return {
    "folke/persistence.nvim",
    event = "BufReadPre",
    enabled = true,
    opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } },
    keys = {
        { "<leader>qs", function() require("persistence").load() end,                desc = "Restore Session" },
        { "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
        { "<leader>qd", function() require("persistence").stop() end,                desc = "Don't Save Current Session" },
    },
}

when i use :lua require("persistence").load() to resume session.
the buffer can not focus on the current file.
i have set :

filesystem = {
    follow_current_file = true, 
}

Then I open a new file from the neo-tree
This new file can be focused normally, but when moved to a file opened from the session, it will not be focused

Screenshots, Traceback

No response

Steps to Reproduce

none

Expected Behavior

none

Your Configuration

none
@CnsMaple CnsMaple added the bug Something isn't working label Jul 4, 2023
@pysan3
Copy link
Collaborator

pysan3 commented Jul 5, 2023

Hi @CnsMaple,

Could you paste a minimal config containing both neo-tree and presistance?

Also, it would be nice if you could follow the issue template thoroughly.
Especially, please write # Steps to reproduce.

I think the actions would be something like 1. open neotree, 2. save current session, 3. close and relaunch neovim, 4. run whatever, 5. look at ...

But I've never used presinstant so very detailed steps will be very nice :)

@pysan3 pysan3 added the question Further information is requested label Jul 5, 2023
@CnsMaple
Copy link
Author

CnsMaple commented Jul 6, 2023

sorry.
i try only run neo-tree and presinstant plugins.The problem still exists.

presinstant will automatically save the session, and we only need to use ': lua require ("persistence"). load()' at the beginning to do it.

  1. open nvim.Open any number of buffers.then close nvim use :qa.
  2. open nvim,use ': lua require ("persistence"). load()' .it will restore the buffer before closing.
  3. in this time,we look neo-tree,and move the buffer.The neo-tree has not undergone any changes.

this is my actions:
bug show.zip
@pysan3

@CnsMaple
Copy link
Author

CnsMaple commented Jul 7, 2023

i found this question is in windows11.when i try in ubuntu,it run normal.

in windows11:
then i open multiple label,i click the buffers tab,then back the file tab,the file tab will run normal,but the buffers tab no normal.
That's too strange.

@pysan3 pysan3 removed the question Further information is requested label Jul 9, 2023
@pysan3
Copy link
Collaborator

pysan3 commented Jul 14, 2023

As we have managed to flush out some of the issues with Windows paths in the conversations at #933, I think I will be able to find a solution to this issue as well.

Working on it! (Tho it may take some time...)

@pysan3 pysan3 self-assigned this Jul 14, 2023
@CnsMaple
Copy link
Author

It's ok, there are quite a few problems with nvim on windows, I'm using wsl now. thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working working-on-it
Projects
None yet
Development

No branches or pull requests

2 participants