mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	patch 9.1.1348: still E315 with the terminal feature
Problem:  still E315 with the terminal feature
          (user202729)
Solution: call update_topline() in limit_scrollback()
          (Hirohito Higashi)
fixes: #17195
closes: #17196
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
			
			
This commit is contained in:
		
				
					committed by
					
						 Christian Brabandt
						Christian Brabandt
					
				
			
			
				
	
			
			
			
						parent
						
							fbe4a8f5c0
						
					
				
				
					commit
					fa9753a721
				
			| @@ -3455,8 +3455,8 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) | |||||||
| 	    sizeof(sb_line_T) * gap->ga_len); | 	    sizeof(sb_line_T) * gap->ga_len); | ||||||
|     if (update_buffer) |     if (update_buffer) | ||||||
|     { |     { | ||||||
| 	win_T	    *curwin_save = curwin; | 	win_T *curwin_save = curwin; | ||||||
| 	win_T	    *wp = NULL; | 	win_T *wp = NULL; | ||||||
|  |  | ||||||
| 	term->tl_scrollback_scrolled -= todo; | 	term->tl_scrollback_scrolled -= todo; | ||||||
|  |  | ||||||
| @@ -3466,14 +3466,11 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) | |||||||
| 	    { | 	    { | ||||||
| 		curwin = wp; | 		curwin = wp; | ||||||
| 		check_cursor(); | 		check_cursor(); | ||||||
|  | 		update_topline(); | ||||||
| 	    } | 	    } | ||||||
| 	} | 	} | ||||||
| 	curwin = curwin_save; | 	curwin = curwin_save; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // make sure cursor is on a valid line |  | ||||||
|     if (curbuf == term->tl_buffer) |  | ||||||
| 	check_cursor(); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /* | /* | ||||||
|   | |||||||
| @@ -245,6 +245,10 @@ func Test_termwinscroll() | |||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_termwinscroll_topline() | func Test_termwinscroll_topline() | ||||||
|  |   if has('win32') | ||||||
|  |     CheckGithubActions | ||||||
|  |   endif | ||||||
|  |  | ||||||
|   set termwinscroll=1000 mouse=a |   set termwinscroll=1000 mouse=a | ||||||
|   terminal |   terminal | ||||||
|   call assert_equal(2, winnr('$')) |   call assert_equal(2, winnr('$')) | ||||||
|   | |||||||
| @@ -704,6 +704,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     1348, | ||||||
| /**/ | /**/ | ||||||
|     1347, |     1347, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user