Better fix for issue #25
This commit is contained in:
		
							parent
							
								
									964bf133bb
								
							
						
					
					
						commit
						71a7940d74
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| VERSION = 1.0 | VERSION = git-20111101 | ||||||
| 
 | 
 | ||||||
| CC      = gcc | CC      = gcc | ||||||
| CFLAGS  = -ansi -Wall -pedantic -O2 | CFLAGS  = -ansi -Wall -pedantic -O2 | ||||||
|  | |||||||
| @ -69,10 +69,7 @@ bool it_switch_mode(arg_t a) { | |||||||
| 			img.slideshow = false; | 			img.slideshow = false; | ||||||
| 			reset_timeout(slideshow); | 			reset_timeout(slideshow); | ||||||
| 		} | 		} | ||||||
| 		if (fileidx < tns.cnt) | 		tns.sel = fileidx; | ||||||
| 			tns.sel = fileidx; |  | ||||||
| 		else |  | ||||||
| 			tns.sel = tns.cnt > 0 ? tns.cnt - 1 : 0; |  | ||||||
| 		tns.dirty = true; | 		tns.dirty = true; | ||||||
| 		mode = MODE_THUMB; | 		mode = MODE_THUMB; | ||||||
| 	} else { | 	} else { | ||||||
|  | |||||||
							
								
								
									
										7
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								main.c
									
									
									
									
									
								
							| @ -416,10 +416,13 @@ void run(void) { | |||||||
| 		{ | 		{ | ||||||
| 			/* load thumbnails */ | 			/* load thumbnails */ | ||||||
| 			set_timeout(redraw, TO_REDRAW_THUMBS, false); | 			set_timeout(redraw, TO_REDRAW_THUMBS, false); | ||||||
| 			if (tns_load(&tns, tns.cnt, &files[tns.cnt], false, false)) | 			if (tns_load(&tns, tns.cnt, &files[tns.cnt], false, false)) { | ||||||
| 				tns.cnt++; | 				tns.cnt++; | ||||||
| 			else | 			} else { | ||||||
| 				remove_file(tns.cnt, false); | 				remove_file(tns.cnt, false); | ||||||
|  | 				if (tns.sel >= tns.cnt) | ||||||
|  | 					tns.sel--; | ||||||
|  | 			} | ||||||
| 			if (tns.cnt == filecnt) | 			if (tns.cnt == filecnt) | ||||||
| 				redraw(); | 				redraw(); | ||||||
| 			else | 			else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert Münnich
						Bert Münnich