diff src/testdir/test_textprop.vim @ 15269:27783a6f430b v8.1.0643

patch 8.1.0643: computing byte offset wrong commit https://github.com/vim/vim/commit/00b1e041654e8a38fb6b81218a037e1dc94e0943 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 26 23:42:10 2018 +0100 patch 8.1.0643: computing byte offset wrong Problem: Computing byte offset wrong. (Bjorn Linse) Solution: Use the right variable for array index.
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Dec 2018 23:45:04 +0100
parents c5cb5151940d
children ba6f0f1bb9d0
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -229,11 +229,11 @@ endfunc
 func Test_prop_byteoff()
   call prop_type_add('comment', {'highlight': 'Directory'})
   new
-  call setline(1, ['line1', 'line2', ''])
+  call setline(1, ['line1', 'second line', ''])
   set ff=unix
-  call assert_equal(13, line2byte(3))
+  call assert_equal(19, line2byte(3))
   call prop_add(1, 1, {'end_col': 3, 'type': 'comment'})
-  call assert_equal(13, line2byte(3))
+  call assert_equal(19, line2byte(3))
 
   bwipe!
   call prop_type_delete('comment')