Incorrect `start` field of a text property after undo/redo
Author: david-kCreated Sep 20, 2026Updated Sep 24, 2026
Labelsbug
Steps to reproduce
If a text property starts with a line that was previously deleted and is then brought back to live via undo, then redoing the deletion causes the start field of the text property to be zero, even though it is now on the first line.
new
call setline(1, ['one', 'two', 'three', 'four'])
" Start new undo block
exe "norm i\<C-g>u"
" Delete line "two", then undo the deletion
exe "norm 2Gdd"
undo
call prop_type_add('my_prop', {'highlight': 'Comment'})
" Create a text property spanning lines 2 to 3
call prop_add(2, 1, {'end_lnum': 3, 'end_col': 6, 'type': 'my_prop'})
" Removes line "two"
redo
echo prop_list(1, {'end_lnum': -1})The output of the call to prop_list() is:
[{'lnum': 2, 'id': 0, 'col': 1, 'type_bufnr': 0, 'end': 1, 'type': 'my_prop', 'length': 5, 'start': 0}]Note that the property spans a single line so we would expect both start and end to be 1, but start is 0.
Expected behaviour
The expected output of prop_list() should be:
[{'lnum': 2, 'id': 0, 'col': 1, 'type_bufnr': 0, 'end': 1, 'type': 'my_prop', 'length': 5, 'start': 1}]Only difference is 'start': 1.
Version of Vim
9.2 (2026 Feb 14, compiled Sep 08 2026 13:11:21). Included patches: 1-1046
Environment
Operating system: Arch Linux
Terminal: kitty 0.48.2
Value of $TERM: xterm-kitty
Shell: bash 5.3.20(1)
Logs and stack traces
Source: vim/vim