From 4f3bb5262caa95a2a12d7366ef428ed5399d21c9 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Thu, 24 Nov 2016 23:39:25 -0700 Subject: vim-patch:7.4.1702 Problem: Using freed memory when parsing 'printoptions' fails. Solution: Save the old options and restore them in case of an error. (Dominique) https://github.com/vim/vim/commit/4afc7c5d4a73340831077a02bfe1f74935e7f4a1 --- src/nvim/testdir/test_hardcopy.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_hardcopy.vim b/src/nvim/testdir/test_hardcopy.vim index 4629d17dd2..ea9790d134 100644 --- a/src/nvim/testdir/test_hardcopy.vim +++ b/src/nvim/testdir/test_hardcopy.vim @@ -23,6 +23,10 @@ func Test_printoptions_parsing() set printoptions=formfeed:y set printoptions= set printoptions& + + call assert_fails('set printoptions=paper', 'E550:') + call assert_fails('set printoptions=shredder:on', 'E551:') + call assert_fails('set printoptions=left:no', 'E552:') endfunc func Test_printmbfont_parsing() -- cgit