Justin M. Keyes

Results 2414 comments of Justin M. Keyes

Looks much better! Will wait to see if others have comments. cc @gpanders

Your maintenance of this PR gives confidence that you'll followup if necessary, so merging. Thanks!

Alternative: - https://github.com/neovim/neovim/issues/32287#issuecomment-2835155023 - https://github.com/neovim/neovim/issues/34547

> This approach previously worked with `require('lspconfig')[server_name].setup(...)`. If that's the only motiviation, I'm going to consider this a wontfix. Need a stronger use-case. `cmd` already supports a function form, it...

Why shouldn't these return 0 for an empty buffer? Related to https://github.com/neovim/neovim/issues/34272, which I see you also opened. It's good that you are thinking about this carefully, and we want...

> Both `byte2line` and `line2byte` are 1-indexed, so e.g. `line2byte(1)` returning `1` is the same as `nvim_buf_get_offset(0, 0)` returning `0`. There is no "byte", so indexing to the first item...

> However `nvim_buf_get_offset(0, 0)` returns 0, so are we saying that an empty buffer has 0 bytes but 1 line? If so, then `line2byte(1)` should return 1 and `byte2line(1)` should...

This isn't the right direction, see https://github.com/neovim/neovim/issues/34272#issuecomment-2972877283 . Either we need to "fix" undo so it correctly returns the buffer to a fully "empty" state, or document this clearly (or...

> Again, whether memline is uninitialized is not an internal state. It's a state that has a meaning to plugins. AFAICT, the bug is that byte2line/line2byte don't always return -1...

Closing and will consider #34272 as the tracking issue. Too much duplicate discussion happening here and in https://github.com/neovim/neovim/pull/34216