summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-03-13 17:50:25 +0100
committerBram Moolenaar <Bram@vim.org>2013-03-13 17:50:25 +0100
commit1a0316ca2a617c5becc187337c4b9e3f08578d3b (patch)
treef2a84974bd787069b0dafbcceef7bf4467bc7c2d /src/ui.c
parentb3cb98216296dc166f3d4544dd95d661cefe73b1 (diff)
downloadvim-git-1a0316ca2a617c5becc187337c4b9e3f08578d3b.tar.gz
updated for version 7.3.856v7.3.856
Problem: When calling system() multi-byte clipboard contents is garbled. Solution: Save and restore the clipboard contents. (Yukihiro Nakadaira)
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index 4a4506efc..c83530587 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1456,6 +1456,21 @@ clip_gen_request_selection(cbd)
#endif
}
+ int
+clip_gen_owner_exists(cbd)
+ VimClipboard *cbd;
+{
+#ifdef FEAT_XCLIPBOARD
+# ifdef FEAT_GUI_GTK
+ if (gui.in_use)
+ return clip_gtk_owner_exists(cbd);
+ else
+# endif
+ return clip_x11_owner_exists(cbd);
+#endif
+ return TRUE;
+}
+
#endif /* FEAT_CLIPBOARD */
/*****************************************************************************
@@ -2398,7 +2413,8 @@ clip_x11_lose_selection(myShell, cbd)
Widget myShell;
VimClipboard *cbd;
{
- XtDisownSelection(myShell, cbd->sel_atom, CurrentTime);
+ XtDisownSelection(myShell, cbd->sel_atom,
+ XtLastTimestampProcessed(XtDisplay(myShell)));
}
int
@@ -2440,6 +2456,13 @@ clip_x11_set_selection(cbd)
VimClipboard *cbd UNUSED;
{
}
+
+ int
+clip_x11_owner_exists(cbd)
+ VimClipboard *cbd;
+{
+ return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;
+}
#endif
#if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \