Skip to content

Can't open URL with gx after opening vim session #20934

Description

@GamesByFelix

Steps to reproduce

  1. Create a text file url.txt containing a website URL, e.g. https://www.vim.org
  2. Move the cursor over the URL and press gx to open it in your browser
  3. Create a session file with :mks!
  4. Exit vim and re-open it with vim -S
  5. Move the cursor over the URL and press gx and get the error messages:
E117: Unknown function: GetWordUnderCursor                                        
E116: Invalid arguments for function dist#vim9#Open

Expected behaviour

The gx command should open the URL no matter if vim is running a session or not.

Version of Vim

9.2.900

Environment

macOS 26.5.2
Terminal / xterm 2.15
zsh 5.9 (arm64-apple-darwin25.0)

and

Fedora Linux 44 (Workstation Edition)
Termial / ptyxis 50.1
bash 5.3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions