mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	avoid doing the cleanup every time
This commit is contained in:
		
							parent
							
								
									1be62c7ad2
								
							
						
					
					
						commit
						0f3a6b4b20
					
				
							
								
								
									
										5
									
								
								autojump
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								autojump
									
									
									
									
									
								
							| @ -22,7 +22,7 @@ from sys import argv,exit,stderr | ||||
| import os | ||||
| import signal | ||||
| max_keyweight=1000 | ||||
| max_stored_paths=300 | ||||
| max_stored_paths=400 | ||||
| completion_separator='__' | ||||
| 
 | ||||
| def signal_handler(arg1,arg2): | ||||
| @ -62,7 +62,8 @@ def forget(path_dict,dic_file): | ||||
| def clean_dict(sorted_dirs,path_dict): | ||||
|     """Limits the sized of the path_dict to max_stored_paths. Returns True if keys were deleted""" | ||||
|     if len(sorted_dirs) > max_stored_paths: | ||||
|         for dir,dummy in sorted_dirs[max_stored_paths:]: | ||||
|         #remove 25 more than needed, to avoid doing it every time | ||||
|         for dir,dummy in sorted_dirs[max_stored_paths-25:]: | ||||
|             del path_dict[dir] | ||||
|         return True | ||||
|     else: return False | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user