diff options
| author | Christoph Lohmann <20h@r-36.net> | 2012-10-28 06:32:54 +0100 | 
|---|---|---|
| committer | Christoph Lohmann <20h@r-36.net> | 2012-10-28 06:32:54 +0100 | 
| commit | 35421371ca150b6bd0fd1330e7b30a99029dbce1 (patch) | |
| tree | 071233f251151c201c8f7182ce4693b6ea14c952 | |
| parent | ee3fbeb6c8c354cf4db226a5b1583c531ea37af4 (diff) | |
Applying the patch of Rafa Garcia Gallega <rafael.garcia.gallego@gmail.com> to
not emulate the vt100 behaviour of selecting all whitespaces. Thanks!
| -rw-r--r-- | st.c | 11 | 
1 files changed, 6 insertions, 5 deletions
| @@ -678,7 +678,7 @@ bpress(XEvent *e) {  void  selcopy(void) { -	char *str, *ptr, *p; +	char *str, *ptr;  	int x, y, bufsize, is_selected = 0, size;  	Glyph *gp; @@ -693,11 +693,12 @@ selcopy(void) {  			for(x = 0; x < term.col; x++) {  				gp = &term.line[y][x]; -				if(!(is_selected = selected(x, y))) +				if(!(is_selected = selected(x, y)) +						|| !(gp->state & GLYPH_SET)) {  					continue; -				p = (gp->state & GLYPH_SET) ? gp->c : " "; -				size = utf8size(p); -				memcpy(ptr, p, size); +				} +				size = utf8size(gp->c); +				memcpy(ptr, gp->c, size);  				ptr += size;  			}  			/* \n at the end of every selected line except for the last one */ | 
