summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.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/gui_gtk_x11.c
parentb3cb98216296dc166f3d4544dd95d661cefe73b1 (diff)
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/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index d0eebf371f..61432a20d9 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -5674,12 +5674,8 @@ clip_mch_request_selection(VimClipboard *cbd)
void
clip_mch_lose_selection(VimClipboard *cbd UNUSED)
{
- /* WEIRD: when using NULL to actually disown the selection, we lose the
- * selection the first time we own it. */
- /*
- gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, (guint32)GDK_CURRENT_TIME);
+ gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, gui.event_time);
gui_mch_update();
- */
}
/*
@@ -5705,6 +5701,12 @@ clip_mch_set_selection(VimClipboard *cbd UNUSED)
{
}
+ int
+clip_gtk_owner_exists(VimClipboard *cbd)
+{
+ return gdk_selection_owner_get(cbd->gtk_sel_atom) != NULL;
+}
+
#if defined(FEAT_MENU) || defined(PROTO)
/*