Skip to content

Swap doesn't work with commented code #765

@kuator

Description

@kuator

Describe the bug
Swap doesn't work with commented code

To Reproduce
Download minimal init.lua: https://gist.github.com/kuator/10f7898c6e15c1c5edf54aba6eb9bd44.
Run:

$ mkdir ~/.config/repro
$ cd ~/.config/repro
$ wget https://gist.githubusercontent.com/kuator/10f7898c6e15c1c5edf54aba6eb9bd44/raw/fbf8f79460d870da11d2ea53b1050e07f695f476/init.lua
$ NVIM_APPNAME=repro nvim init.lua

Jump to the test_code, specifically line 118, try to do a swap, it does nothing, swap works on main though.

Expected behavior
Swap happens

Output of nvim --version
NVIM v0.12.0-dev-347+gbee45fc0e7
Build type: RelWithDebInfo
LuaJIT 2.1.1744317938
Run "nvim -V1 -v" for more info

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions