Bug 2370050 - Quoted %F in desktop file leads to nvim opening in netrw mode instead of new buffer mode.
Summary: Quoted %F in desktop file leads to nvim opening in netrw mode instead of new...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: neovim
Version: epel10
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-03 16:05 UTC by jounathaen
Modified: 2025-11-03 09:36 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-11-03 09:36:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description jounathaen 2025-06-03 16:05:46 UTC
Description of problem:

Opening Neovim via a starter in Fedora 42 without any file selected does not open a new empty buffer, but goes into netrw (file manager) mode.
It looks to me as if the reason for this is in the neovim.desktop file.
This contains the following line:

Exec=nvim "%F"

However, the Desktop Entry Specification states that "Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined. The %F and %U field codes may only be used as an argument on their own."

The quotation leads to "" being passed as argument to nvim, which leads to this somewhat unexpected behavior.

Removing the quotation (and doing `sudo update-desktop-database`) fixes the problem for me.

Version-Release number of selected component (if applicable):


How reproducible:

> nvim --version
NVIM v0.11.1
Build type: RelWithDebInfo
LuaJIT 2.1.1744318430
Run "nvim -V1 -v" for more info


Steps to Reproduce:
1. Start nvim e.g. via the Menu

Actual results:

nvim opens in netrw mode

Expected results:

nvim opens in new buffer mode

Additional info:

Comment 1 jounathaen 2025-06-06 09:59:19 UTC
Ok, apparently that was an upstream bug: https://github.com/neovim/neovim/issues/33669 which is resolved by now, and was even included in neovims backport for v0.11: https://github.com/neovim/neovim/pull/33685

Not sure if this can be closed then, or if it should be waited for either the next nvim version beeing published or the backport beeing build (if that's something that is actually done).


Note You need to log in before you can comment on or make changes to this bug.