mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Remove old buffer when renaming rather than complaining, GitHub issue
3467 from Jean-Philippe Paradis.
This commit is contained in:
		
							
								
								
									
										7
									
								
								paste.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								paste.c
									
									
									
									
									
								
							| @@ -241,11 +241,8 @@ paste_rename(const char *oldname, const char *newname, char **cause) | ||||
| 	} | ||||
|  | ||||
| 	pb_new = paste_get_name(newname); | ||||
| 	if (pb_new != NULL) { | ||||
| 		if (cause != NULL) | ||||
| 			xasprintf(cause, "buffer %s already exists", newname); | ||||
| 		return (-1); | ||||
| 	} | ||||
| 	if (pb_new != NULL) | ||||
| 		paste_free(pb_new); | ||||
|  | ||||
| 	RB_REMOVE(paste_name_tree, &paste_by_name, pb); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm