| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.445 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.445 |
| Problem: Clipboard may be cleared on startup. |
| Solution: Set clip_did_set_selection to -1 during startup. (Christian |
| Brabandt) |
| Files: src/main.c, src/ui.c |
| |
| |
| |
| |
| |
| *** 958,965 **** |
| --- 958,974 ---- |
| 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 |
| |
| |
| |
| |
| *** 571,577 **** |
| { |
| clip_unnamed_saved = clip_unnamed; |
| |
| ! if (clip_did_set_selection) |
| { |
| clip_unnamed = FALSE; |
| clip_did_set_selection = FALSE; |
| --- 571,577 ---- |
| { |
| clip_unnamed_saved = clip_unnamed; |
| |
| ! if (clip_did_set_selection > 0) |
| { |
| clip_unnamed = FALSE; |
| clip_did_set_selection = FALSE; |
| |
| *** 584,590 **** |
| void |
| end_global_changes() |
| { |
| ! if (!clip_did_set_selection) |
| { |
| clip_did_set_selection = TRUE; |
| clip_unnamed = clip_unnamed_saved; |
| --- 584,590 ---- |
| void |
| end_global_changes() |
| { |
| ! if (clip_did_set_selection == FALSE) /* not when -1 */ |
| { |
| clip_did_set_selection = TRUE; |
| clip_unnamed = clip_unnamed_saved; |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 445, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 159. You get excited whenever discussing your hard drive. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |