test_ga \
test_gf \
test_glob2regpat \
+ test_global \
test_gn \
test_goto \
test_gui \
EXTERN int clip_autoselectml INIT(= FALSE);
EXTERN int clip_html INIT(= FALSE);
EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
-EXTERN int clip_did_set_selection INIT(= TRUE);
EXTERN int clip_unnamed_saved INIT(= 0);
#endif
VIsual = old_visual;
VIsual_mode = old_visual_mode;
}
- else
+ else if (!is_clipboard_needs_update())
{
clip_free_selection(cbd);
void clip_own_selection(VimClipboard *cbd);
void clip_lose_selection(VimClipboard *cbd);
void start_global_changes(void);
+int is_clipboard_needs_update(void);
void end_global_changes(void);
void clip_auto_select(void);
int clip_isautosel_star(void);
source test_float_func.vim
source test_fnamemodify.vim
source test_functions.vim
-source test_glob2regpat.vim
source test_ga.vim
+source test_glob2regpat.vim
+source test_global.vim
source test_goto.vim
source test_help_tagjump.vim
source test_join.vim
--- /dev/null
+
+func Test_yank_put_clipboard()
+ new
+ call setline(1, ['a', 'b', 'c'])
+ set clipboard=unnamed
+ g/^/normal yyp
+ call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6))
+
+ set clipboard&
+ bwipe!
+endfunc
#if defined(FEAT_CLIPBOARD) || defined(PROTO)
-static void clip_copy_selection(VimClipboard *clip);
-
/*
* Selection stuff using Visual mode, for cutting and pasting text to other
* windows.
* considerably.
*/
static int global_change_count = 0; /* if set, inside a start_global_changes */
-static int clipboard_needs_update; /* clipboard needs to be updated */
+static int clipboard_needs_update = FALSE; /* clipboard needs to be updated */
+static int clip_did_set_selection = TRUE;
/*
* Save clip_unnamed and reset it.
}
}
+/*
+ * Return TRUE if setting the clipboard was postponed, it already contains the
+ * right text.
+ */
+ int
+is_clipboard_needs_update()
+{
+ return clipboard_needs_update;
+}
+
/*
* Restore clip_unnamed and set the selection when needed.
*/
}
}
}
+ clipboard_needs_update = FALSE;
}
/*
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 522,
/**/
521,
/**/