Mercurial > vim
diff src/testdir/test_packadd.vim @ 32206:5372bf23bf72 v9.0.1434
patch 9.0.1434: crash when adding package already in 'runtimepath'
Commit: https://github.com/vim/vim/commit/39c9ec16ea7ef13c5d783481542ee9aa6c05282c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat Apr 1 13:52:03 2023 +0100
patch 9.0.1434: crash when adding package already in 'runtimepath'
Problem: Crash when adding package already in 'runtimepath'.
Solution: Change order for using 'runtimepath' entries. (closes https://github.com/vim/vim/issues/12215)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Apr 2023 15:00:06 +0200 |
parents | aec031683d61 |
children | 61389a392fe8 |
line wrap: on
line diff
--- a/src/testdir/test_packadd.vim +++ b/src/testdir/test_packadd.vim @@ -21,6 +21,13 @@ func Test_packadd() call mkdir(s:plugdir . '/plugin/also', 'p') call mkdir(s:plugdir . '/ftdetect', 'p') call mkdir(s:plugdir . '/after', 'p') + + " This used to crash Vim + let &rtp = 'nosuchdir,' . s:plugdir . '/after' + packadd mytest + " plugdir should be inserted before plugdir/after + call assert_match('^nosuchdir,' . s:plugdir . ',', &rtp) + set rtp& let rtp = &rtp filetype on