Mercurial > vim
comparison src/testdir/test_textprop.vim @ 16786:98ca522e6453 v8.1.1395
patch 8.1.1395: saving for undo may access invalid memory
commit https://github.com/vim/vim/commit/adfde115d5c9c9ac4a052874bcf85d2507fe1355
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 25 22:11:45 2019 +0200
patch 8.1.1395: saving for undo may access invalid memory
Problem: Saving for undo may access invalid memory. (Dominique Pelle)
Solution: Set ml_line_len also when returning a constant string.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 May 2019 22:15:04 +0200 |
parents | 18093a6accb5 |
children | ba7727889385 |
comparison
equal
deleted
inserted
replaced
16785:27616b16dc88 | 16786:98ca522e6453 |
---|---|
764 func Test_textprop_empty_buffer() | 764 func Test_textprop_empty_buffer() |
765 call prop_type_add('comment', {'highlight': 'Search'}) | 765 call prop_type_add('comment', {'highlight': 'Search'}) |
766 new | 766 new |
767 call prop_add(1, 1, {'type': 'comment'}) | 767 call prop_add(1, 1, {'type': 'comment'}) |
768 close | 768 close |
769 call prop_type_delete('comment') | |
770 endfunc | |
771 | |
772 " Adding a text property to an empty buffer and then editing another | |
773 func Test_textprop_empty_buffer_next() | |
774 call prop_type_add("xxx", {}) | |
775 call prop_add(1, 1, {"type": "xxx"}) | |
776 next X | |
777 call prop_type_delete('xxx') | |
769 endfunc | 778 endfunc |
770 | 779 |
771 func Test_textprop_remove_from_buf() | 780 func Test_textprop_remove_from_buf() |
772 new | 781 new |
773 let buf = bufnr('') | 782 let buf = bufnr('') |