mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	vim-patch:8.0.0331
Problem:    Restoring help snapshot accesses freed memory. (Dominique Pelle)
Solution:   Don't restore a snapshot when the window closes.
343b8c0429
			
			
This commit is contained in:
		
							
								
								
									
										16
									
								
								src/nvim/testdir/test_help.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/nvim/testdir/test_help.vim
									
									
									
									
									
										Normal file
									
								
							| @@ -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 | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Justin M. Keyes
					Justin M. Keyes