summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/memline.c2
-rw-r--r--src/testdir/test_textprop.vim6
-rw-r--r--src/version.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/memline.c b/src/memline.c
index d79e7ce8c..6b4a76634 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -5380,7 +5380,7 @@ ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp)
// lengths.
len = 0;
for (i = start_idx; i <= idx; ++i)
- len += STRLEN((char_u *)dp + ((dp->db_index[idx]) & DB_INDEX_MASK)) + 1;
+ len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
}
else
#endif
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index ccf7d2846..e63ce6bf0 100644
--- 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')
diff --git a/src/version.c b/src/version.c
index dc1135827..06f7a8a49 100644
--- a/src/version.c
+++ b/src/version.c
@@ -800,6 +800,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 643,
+/**/
642,
/**/
641,