When modifying a line (by doing py3 vim.current.buffer[lineno] = 'new line') neovim will remove marks on that line. Vim does not (even if the marks become invalid because the line gets shorter). The builtin setline() also does not delete marks.
This can lead to incompatibilities (see https://github.com/SirVer/ultisnips/issues/1473) but could also be problem on its own, because it is not possible to recover the lost marks.
Would it be possible to adapt the behavior to match that of setline()/vim ?
If not, what would be the best way to modify a line without losing marks?
When modifying a line (by doing
py3 vim.current.buffer[lineno] = 'new line'
) neovim will remove marks on that line. Vim does not (even if the marks become invalid because the line gets shorter). The builtinsetline()
also does not delete marks. This can lead to incompatibilities (see https://github.com/SirVer/ultisnips/issues/1473) but could also be problem on its own, because it is not possible to recover the lost marks.Would it be possible to adapt the behavior to match that of
setline()
/vim ? If not, what would be the best way to modify a line without losing marks?