Skip to content

Conversation

WayneYam
Copy link

@WayneYam WayneYam commented Oct 5, 2025

Fixes #35557

Problem:
The on_bytes event does not report the correct end positions when a line is deleted.

Solution:
Add a failing test case that demonstrates the incorrect behavior. The test is marked with FIXME comments that show the expected (correct) values.
@github-actions github-actions bot added test api libnvim, Nvim RPC API labels Oct 5, 2025
local eq = t.eq
local api = n.api

describe('API: on_bytes event', function()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the buf_attach tests live here:

describe('API: buffer events:', function()

@justinmk justinmk added the needs:response waiting for reply from the author label Oct 11, 2025
@justinmk
Copy link
Member

The test doesnt fail so I assume you are still working on this?

@WayneYam
Copy link
Author

Hi, there's a bigger issue where, when dd is used on the last line, the old_pos is always out of bound, see the discussion here

I'm not sure what the correct behavior is so I haven't been able to make progress.

@github-actions github-actions bot removed the needs:response waiting for reply from the author label Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api libnvim, Nvim RPC API test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dd in buffer with a single line causes on_bytes to be called with incorrect arguments

2 participants