auto-session icon indicating copy to clipboard operation
auto-session copied to clipboard

Folds are only saved for visible buffers

Open haraldan opened this issue 1 year ago • 1 comments

Issue When restoring a saved session, folds for all the buffers that are not in one of the current windows are lost.

To Reproduce

  1. Open more then one buffer in a Neovim session
  2. Toggle a fold closed
  3. Switch to another buffer
  4. Close and open Neovim
  5. Switch back to the first buffer
  6. All folds are open again

Expected behavior Folds are restored in all buffers.

Baseline:

  • sessionoptions=blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions
  • OS. : WSL2 under Windows 10 22H2 19045.4291, Linux 5.15.146.1-microsoft-standard-WSL2
  • Neovim version : v0.9.5
  • URL to config : https://github.com/haraldan/dotfiles/tree/main/.config/nvim

haraldan avatar May 10 '24 15:05 haraldan

Does this happen if you save and restore a session manually with mksess and source? Pretty sure this is just how Neovim's sessions work and auto-session doesn't actually have control over whether folds are saved on closed buffers

rmagatti avatar May 21 '24 02:05 rmagatti