Skip to content

Neovim: Opening a file via :FZF clears messages (e.g. warning W325 for existing swapfile is not shown) #3818

Open
@camoz

Description

@camoz

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.52.0 (bcda25a)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

Neovim 0.10 changed how to handle files for which there already exists a running neovim process. From https://neovim.io/doc/user/news-0.10.html:

By default, the swapfile "ATTENTION" E325 dialog is skipped if the swapfile is owned by a running Nvim process, instead of prompting. If you always want the swapfile dialog, delete the default SwapExists handler: autocmd! nvim_swapfile. default-autocmds

Neovim will show a warning instead. This can be easily tested by:

  • First nvim instance: :e ~/foobar -> save
  • Second nvim instance: :e ~/foobar -> it prints W325: Ignoring swapfile from Nvim process ...

However, when opening the second file with :FZF, the warning is not shown.

I think there are two reasons why it might be really nice to fix this:

  • Neovim sets 'hidden' by default, which makes it easy to have some unsaved changes in a background buffer.
  • Since opening files with FZF is so easy, it may encourage workflows where one opens the same file in multiple windows.

Is there a way to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions