summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-03-07 18:02:30 +0100
committerBram Moolenaar <Bram@vim.org>2013-03-07 18:02:30 +0100
commite2e663f67d9f44ae876659bd492f734d48bd2970 (patch)
tree68d090a7dd23ed00c415eab3868aa9ae5ad055d4 /src/ui.c
parent210f3704f795870c513a136725718e10ac2bdbfc (diff)
downloadvim-git-e2e663f67d9f44ae876659bd492f734d48bd2970.tar.gz
updated for version 7.3.852v7.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.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index 372e0375f..4a4506efc 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -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)
{