mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Do not restore history flag if it was never set.
This commit is contained in:
		
							
								
								
									
										4
									
								
								screen.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								screen.c
									
									
									
									
									
								
							@@ -536,6 +536,7 @@ screen_alternate_on(struct screen *s, struct grid_cell *gc, int cursor)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	grid_view_clear(s->grid, 0, 0, sx, sy, 8);
 | 
						grid_view_clear(s->grid, 0, 0, sx, sy, 8);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						s->saved_flags = s->grid->flags;
 | 
				
			||||||
	s->grid->flags &= ~GRID_HISTORY;
 | 
						s->grid->flags &= ~GRID_HISTORY;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -579,7 +580,8 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
 | 
				
			|||||||
	 * Turn history back on (so resize can use it) and then resize back to
 | 
						 * Turn history back on (so resize can use it) and then resize back to
 | 
				
			||||||
	 * the current size.
 | 
						 * the current size.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	s->grid->flags |= GRID_HISTORY;
 | 
						if (s->saved_flags & GRID_HISTORY)
 | 
				
			||||||
 | 
							s->grid->flags |= GRID_HISTORY;
 | 
				
			||||||
	if (sy > s->saved_grid->sy || sx != s->saved_grid->sx)
 | 
						if (sy > s->saved_grid->sy || sx != s->saved_grid->sx)
 | 
				
			||||||
		screen_resize(s, sx, sy, 1);
 | 
							screen_resize(s, sx, sy, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user