Skip to content

Sessions cannot be properly restored by :mksession scripts created when there are floating windows #18432

@dstein64

Description

@dstein64

Neovim version (nvim -v)

0.7.0

Vim (not Nvim) behaves the same?

No, 8.2.3995

Operating system/version

Kubuntu 22.04

Terminal name/version

Konsole 21.12.3

$TERM environment variable

xterm-256color

Installation

appimage

How to reproduce the issue

Open Neovim and open a file:

nvim --clean
:edit /some/path/to/a/file

Next create a floating window:

:let config = {'relative': 'editor', 'focusable': v:false, 'width': 10, 'height': 3, 'row': 0, 'col': 1, 'style': 'minimal'}
:let buf = nvim_create_buf(v:false, v:true)
:let win = nvim_open_win(buf, v:false, config)

Create a session-restoration script:

:mksession!

Exit Neovim, then reload Neovim with the mksession script:

:qall!
nvim --clean -S Session.vim

Expected behavior

  • The file that was open would be reloaded. This would match the behavior of Vim where floating window usage was replaced with popups.
  • The floating window would be reloaded. This would not match the behavior of Vim, as popups are not restored.
  • The status line and command line position would be retained.

Actual behavior

  • No file is loaded.
  • The floating window is not restored.
  • The status line and command line are higher than usual.

Additional Information

This is based on dstein64/nvim-scrollview#71.

Metadata

Metadata

Assignees

No one assigned

    Labels

    floatwinfloating windows, popups, hover

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions