Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 299725 Details for
Bug 400585
app-editors/vim-7.3: broken unicode while copy/paste with X PRIMARY and CLIPBOARD
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
patch to add support for copy/paste utf8 to/from X PRIMARY/CLIPBOARD
clip-utf8.patch (text/plain), 2.36 KB, created by
Alex Efros
on 2012-01-24 11:30:47 UTC
(
hide
)
Description:
patch to add support for copy/paste utf8 to/from X PRIMARY/CLIPBOARD
Filename:
MIME Type:
Creator:
Alex Efros
Created:
2012-01-24 11:30:47 UTC
Size:
2.36 KB
patch
obsolete
>--- src/ui.c.orig 2012-01-24 12:35:51.000000000 +0200 >+++ src/ui.c 2012-01-24 12:35:58.000000000 +0200 >@@ -1920,6 +1920,7 @@ > #endif > static Atom compound_text_atom; > static Atom text_atom; >+static Atom utf8_atom; > static Atom targets_atom; > static Atom timestamp_atom; /* Used to get a timestamp */ > >@@ -1931,6 +1932,7 @@ > #ifdef FEAT_MBYTE > vimenc_atom = XInternAtom(dpy, VIMENC_ATOM_NAME,False); > #endif >+ utf8_atom = XInternAtom(dpy, "UTF8_STRING", False); > compound_text_atom = XInternAtom(dpy, "COMPOUND_TEXT", False); > text_atom = XInternAtom(dpy, "TEXT", False); > targets_atom = XInternAtom(dpy, "TARGETS", False); >@@ -2074,7 +2076,7 @@ > } > #endif > >- else if (*type == compound_text_atom || ( >+ else if (*type == utf8_atom || *type == compound_text_atom || ( > #ifdef FEAT_MBYTE > enc_dbcs != 0 && > #endif >@@ -2128,7 +2130,7 @@ > #else > 1 > #endif >- ; i < 5; i++) >+ ; i < 6; i++) > { > switch (i) > { >@@ -2136,8 +2138,9 @@ > case 0: type = vimenc_atom; break; > #endif > case 1: type = vim_atom; break; >- case 2: type = compound_text_atom; break; >- case 3: type = text_atom; break; >+ case 2: type = utf8_atom; break; >+ case 3: type = compound_text_atom; break; >+ case 4: type = text_atom; break; > default: type = XA_STRING; > } > success = MAYBE; >@@ -2230,7 +2233,7 @@ > { > Atom *array; > >- if ((array = (Atom *)XtMalloc((unsigned)(sizeof(Atom) * 6))) == NULL) >+ if ((array = (Atom *)XtMalloc((unsigned)(sizeof(Atom) * 7))) == NULL) > return False; > *value = (XtPointer)array; > i = 0; >@@ -2242,6 +2245,7 @@ > array[i++] = vim_atom; > array[i++] = text_atom; > array[i++] = compound_text_atom; >+ array[i++] = utf8_atom; > *type = XA_ATOM; > /* This used to be: *format = sizeof(Atom) * 8; but that caused > * crashes on 64 bit machines. (Peter Derr) */ >@@ -2255,6 +2259,7 @@ > && *target != vimenc_atom > #endif > && *target != vim_atom >+ && *target != utf8_atom > && *target != text_atom > && *target != compound_text_atom) > return False; >@@ -2282,10 +2287,10 @@ > return False; > } > >- if (*target == XA_STRING) >+ if (*target == XA_STRING || *target == utf8_atom) > { > mch_memmove(result, string, (size_t)(*length)); >- *type = XA_STRING; >+ *type = *target; > } > else if (*target == compound_text_atom > || *target == text_atom)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 400585
: 299725