1
0
forked from aniani/vim

updated for version 7.3.852

Problem:    system() breaks clipboard text. (Yukihiro Nakadaira)
Solution:   Use Xutf8TextPropertyToTextList(). (Christian Brabandt)
            Also do not put the text in the clip buffer if conversion fails.
This commit is contained in:
Bram Moolenaar
2013-03-07 18:02:30 +01:00
parent 210f3704f7
commit e2e663f67d
3 changed files with 28 additions and 3 deletions

View File

@@ -2119,7 +2119,13 @@ clip_x11_request_selection_cb(w, success, sel_atom, type, value, length,
text_prop.encoding = *type;
text_prop.format = *format;
text_prop.nitems = len;
status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop,
#ifdef FEAT_MBYTE
if (*type == utf8_atom)
status = Xutf8TextPropertyToTextList(X_DISPLAY, &text_prop,
&text_list, &n_text);
else
#endif
status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop,
&text_list, &n_text);
if (status != Success || n_text < 1)
{