diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-09-19 13:46:52 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-09-19 13:46:52 +0200 |
commit | 714db3bb819bb7f9f52270f2352b274bba3a9ff4 (patch) | |
tree | bdde3d8e31273b35691691c11b28c1c86f77f927 /src/main.c | |
parent | 103650de9083ba5451869a3f8ed729ba47746b3a (diff) |
updated for version 7.4.445v7.4.445
Problem: Clipboard may be cleared on startup.
Solution: Set clip_did_set_selection to -1 during startup. (Christian
Brabandt)
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 73f6697ac6..fe75495828 100644 --- a/src/main.c +++ b/src/main.c @@ -958,8 +958,17 @@ vim_main2(int argc UNUSED, char **argv UNUSED) if (p_im) need_start_insertmode = TRUE; +#ifdef FEAT_CLIPBOARD + if (clip_unnamed) + /* do not overwrite system clipboard while starting up */ + clip_did_set_selection = -1; +#endif #ifdef FEAT_AUTOCMD apply_autocmds(EVENT_VIMENTER, NULL, NULL, FALSE, curbuf); +# ifdef FEAT_CLIPBOARD + if (clip_did_set_selection < 0) + clip_did_set_selection = TRUE; +# endif TIME_MSG("VimEnter autocommands"); #endif |