diff options
author | glepnir <glephunter@gmail.com> | 2023-12-09 17:28:28 +0800 |
---|---|---|
committer | glepnir <glephunter@gmail.com> | 2023-12-12 13:49:04 +0800 |
commit | d95e3a4c9c8f468158a1f1f23921ebbaae75cf8b (patch) | |
tree | 810c2a3176b2a5bbebf10cc412697cedda359bfb /test/functional/api/buffer_spec.lua | |
parent | 0b74ad0a641f28d9d3da5353e98372d87078bd9d (diff) | |
download | rneovim-d95e3a4c9c8f468158a1f1f23921ebbaae75cf8b.tar.gz rneovim-d95e3a4c9c8f468158a1f1f23921ebbaae75cf8b.tar.bz2 rneovim-d95e3a4c9c8f468158a1f1f23921ebbaae75cf8b.zip |
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.
Diffstat (limited to 'test/functional/api/buffer_spec.lua')
-rw-r--r-- | test/functional/api/buffer_spec.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/functional/api/buffer_spec.lua b/test/functional/api/buffer_spec.lua index 6ed9aa574a..ed93135acb 100644 --- a/test/functional/api/buffer_spec.lua +++ b/test/functional/api/buffer_spec.lua @@ -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() |