mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Fix window choice mode, again.
This commit is contained in:
		
							
								
								
									
										2
									
								
								TODO
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								TODO
									
									
									
									
									
								
							@@ -91,8 +91,6 @@
 | 
			
		||||
- test bug sshing from freebsd console
 | 
			
		||||
- better support for stupid margin terminals. strcmp for cons25 sucks, how can
 | 
			
		||||
  these be autodetected?
 | 
			
		||||
- the escape timer for M- is too short for escape+key. fiddle with it
 | 
			
		||||
- page up/down in choose mode is STILL broken. damn
 | 
			
		||||
- set-option should be set-session-option and should be overall global options
 | 
			
		||||
  for stuff like mode keys?
 | 
			
		||||
- document status-keys
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: window-choose.c,v 1.12 2009-02-21 17:46:13 nicm Exp $ */
 | 
			
		||||
/* $Id: window-choose.c,v 1.13 2009-03-02 17:01:00 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -237,10 +237,13 @@ window_choose_key(struct window_pane *wp, unused struct client *c, int key)
 | 
			
		||||
		if (data->selected > items - 1)
 | 
			
		||||
			data->selected = items - 1;
 | 
			
		||||
		data->top += screen_size_y(s);
 | 
			
		||||
		if (screen_size_y(s) < items) {
 | 
			
		||||
			if (data->top + screen_size_y(s) > items)
 | 
			
		||||
				data->top = items - screen_size_y(s);
 | 
			
		||||
		} else
 | 
			
		||||
			data->top = 0;
 | 
			
		||||
		if (data->selected < data->top)
 | 
			
		||||
			data->top = data->selected;
 | 
			
		||||
		if (data->top + screen_size_y(s) > items)
 | 
			
		||||
			data->top = items - screen_size_y(s);
 | 
			
		||||
		window_choose_redraw_screen(wp);
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user