mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Add UTF-8 to grid_compare..
This commit is contained in:
		
							
								
								
									
										1
									
								
								TODO
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								TODO
									
									
									
									
									
								
							@@ -88,7 +88,6 @@
 | 
			
		||||
- swap-pane-up, swap-pane-down (maybe move-pane-*)
 | 
			
		||||
- test bug sshing from freebsd console
 | 
			
		||||
- c&p is funny w/ UTF-8: skips over width=2
 | 
			
		||||
- fix compare fn for UTF-8
 | 
			
		||||
 | 
			
		||||
- document repeat behaviour and -r on bind-key
 | 
			
		||||
- document status-keys
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								grid.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								grid.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: grid.c,v 1.14 2009-03-28 20:17:29 nicm Exp $ */
 | 
			
		||||
/* $Id: grid.c,v 1.15 2009-03-30 19:44:55 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -138,6 +138,7 @@ int
 | 
			
		||||
grid_compare(struct grid *ga, struct grid *gb)
 | 
			
		||||
{
 | 
			
		||||
	struct grid_cell	*gca, *gcb;
 | 
			
		||||
	struct grid_utf8	*gua, *gub;
 | 
			
		||||
	u_int			 xx, yy;
 | 
			
		||||
 | 
			
		||||
	if (ga->sx != gb->sx || ga->sy != ga->sy)
 | 
			
		||||
@@ -151,7 +152,12 @@ grid_compare(struct grid *ga, struct grid *gb)
 | 
			
		||||
			gcb = &gb->data[yy][xx];
 | 
			
		||||
			if (memcmp(gca, gcb, sizeof (struct grid_cell)) != 0)
 | 
			
		||||
				return (1);
 | 
			
		||||
			/* XXX */
 | 
			
		||||
			if (!(gca->flags & GRID_FLAG_UTF8))
 | 
			
		||||
				continue;
 | 
			
		||||
			gua = &ga->udata[yy][xx];
 | 
			
		||||
			gub = &gb->udata[yy][xx];
 | 
			
		||||
			if (memcmp(gua, gub, sizeof (struct grid_utf8)) != 0)
 | 
			
		||||
				return (1);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user