Fixed it_scroll_move(DIR_DOWN) in thumb mode for last line
This commit is contained in:
		
							parent
							
								
									d7ff54bb6e
								
							
						
					
					
						commit
						edd016945a
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| VERSION = git-20120313 | VERSION = git-20120316 | ||||||
| 
 | 
 | ||||||
| CC      = gcc | CC      = gcc | ||||||
| CFLAGS  = -ansi -Wall -pedantic -O2 | CFLAGS  = -ansi -Wall -pedantic -O2 | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								thumbs.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								thumbs.c
									
									
									
									
									
								
							| @ -399,14 +399,6 @@ bool tns_move_selection(tns_t *tns, direction_t dir) { | |||||||
| 	old = tns->sel; | 	old = tns->sel; | ||||||
| 
 | 
 | ||||||
| 	switch (dir) { | 	switch (dir) { | ||||||
| 		case DIR_LEFT: |  | ||||||
| 			if (tns->sel > 0) |  | ||||||
| 				tns->sel--; |  | ||||||
| 			break; |  | ||||||
| 		case DIR_RIGHT: |  | ||||||
| 			if (tns->sel < tns->cnt - 1) |  | ||||||
| 				tns->sel++; |  | ||||||
| 			break; |  | ||||||
| 		case DIR_UP: | 		case DIR_UP: | ||||||
| 			if (tns->sel >= tns->cols) | 			if (tns->sel >= tns->cols) | ||||||
| 				tns->sel -= tns->cols; | 				tns->sel -= tns->cols; | ||||||
| @ -414,6 +406,16 @@ bool tns_move_selection(tns_t *tns, direction_t dir) { | |||||||
| 		case DIR_DOWN: | 		case DIR_DOWN: | ||||||
| 			if (tns->sel + tns->cols < tns->cnt) | 			if (tns->sel + tns->cols < tns->cnt) | ||||||
| 				tns->sel += tns->cols; | 				tns->sel += tns->cols; | ||||||
|  | 			else if (tns->sel < tns->cnt - tns->cnt % tns->cols) | ||||||
|  | 				tns->sel = tns->cnt - 1; | ||||||
|  | 			break; | ||||||
|  | 		case DIR_LEFT: | ||||||
|  | 			if (tns->sel > 0) | ||||||
|  | 				tns->sel--; | ||||||
|  | 			break; | ||||||
|  | 		case DIR_RIGHT: | ||||||
|  | 			if (tns->sel < tns->cnt - 1) | ||||||
|  | 				tns->sel++; | ||||||
| 			break; | 			break; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert Münnich
						Bert Münnich