diff src/testdir/test_textprop.vim @ 25050:7ef7a211f6bf v8.2.3062

patch 8.2.3062: internal error when adding several text properties Commit: https://github.com/vim/vim/commit/4cd5c52d64a66ad1984d33462a40e0c6721ca232 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 27 13:04:00 2021 +0200 patch 8.2.3062: internal error when adding several text properties Problem: Internal error when adding several text properties. Solution: Do not handle text properties when deleting a line for splitting a data block. (closes #8466)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Jun 2021 13:15:03 +0200
parents 4bc0bda6857d
children eafc0e07b188
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -1488,5 +1488,27 @@ def Test_prop_splits_data_block()
   prop_type_delete('someprop')
 enddef
 
+" This was calling ml_delete_int() and try to change text properties.
+def Test_prop_add_delete_line()
+  new
+  var a = 10
+  var b = 20
+  repeat([''], a)->append('$')
+  prop_type_add('Test', {highlight: 'ErrorMsg'})
+  for lnum in range(1, a)
+    for col in range(1, b)
+      prop_add(1, 1, {end_lnum: lnum, end_col: col, type: 'Test'})
+    endfor
+  endfor
+
+  # check deleting lines is OK
+  :5del
+  :1del
+  :$del
+
+  prop_type_delete('Test')
+  bwipe!
+enddef
+
 
 " vim: shiftwidth=2 sts=2 expandtab