mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix: use no_ff instead of ffdos as condition
Problem: line2byte behavior is changed after commit b051b13
. It no
longer return `-1` on empty buffer.
Solution: use `nof_ff` instead of `!ff_dos` as condition. Then
compatible behavior of line2byte() is restored.
This commit is contained in:
@@ -1876,6 +1876,7 @@ describe('api/buf', function()
|
||||
it('works in empty buffer', function()
|
||||
eq(0, get_offset(0))
|
||||
eq(1, get_offset(1))
|
||||
eq(-1, funcs.line2byte('$'))
|
||||
end)
|
||||
|
||||
it('works in buffer with one line inserted', function()
|
||||
|
Reference in New Issue
Block a user