don't mix TextTag and tag names in buffer.insert_with_tags. Fixes #5581
This commit is contained in:
		
							parent
							
								
									841e3401d3
								
							
						
					
					
						commit
						4fe50e9466
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -1158,7 +1158,10 @@ class ConversationTextview(gobject.GObject): | |||
| 			all_tags = tags[:] | ||||
| 			if use_other_tags: | ||||
| 				all_tags += other_tags | ||||
| 			buffer_.insert_with_tags_by_name(end_iter, special_text, *all_tags) | ||||
| 			# convert all names to TextTag | ||||
| 			ttt = buffer_.get_tag_table() | ||||
| 			all_tags = [(ttt.lookup(t) if isinstance(t, str) else t) for t in all_tags] | ||||
| 			buffer_.insert_with_tags(end_iter, special_text, *all_tags) | ||||
| 
 | ||||
| 	def print_empty_line(self): | ||||
| 		buffer_ = self.tv.get_buffer() | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue