diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_help.vim | 16 | ||||
-rw-r--r-- | src/nvim/window.c | 6 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_help.vim b/src/nvim/testdir/test_help.vim new file mode 100644 index 0000000000..26edc16107 --- /dev/null +++ b/src/nvim/testdir/test_help.vim @@ -0,0 +1,16 @@ + +" Tests for :help + +func Test_help_restore_snapshot() + help + set buftype= + help + edit x + help + helpclose +endfunc + +func Test_help_errors() + call assert_fails('help doesnotexist', 'E149:') + call assert_fails('help!', 'E478:') +endfunc diff --git a/src/nvim/window.c b/src/nvim/window.c index ebb998e3af..a34daccb89 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -5365,10 +5365,8 @@ restore_snapshot ( clear_snapshot(curtab, idx); } -/* - * Check if frames "sn" and "fr" have the same layout, same following frames - * and same children. - */ +/// Check if frames "sn" and "fr" have the same layout, same following frames +/// and same children. And the window pointer is valid. static int check_snapshot_rec(frame_T *sn, frame_T *fr) { if (sn->fr_layout != fr->fr_layout |