Fix Find Pasteboard bugs

As a temporary precaution, the Find Pasteboard is not used during a fork
since this caused the entire machine to lock up.

Also, only patterns from a search (/ and ?) are added to the pboard; not
patterns from a substitution (:s).
This commit is contained in:
Bjorn Winckler
2008-02-13 17:54:20 +01:00
parent 5e1defcf44
commit dd78d32dd4
2 changed files with 7 additions and 2 deletions
+3
View File
@@ -1527,6 +1527,9 @@ gui_macvim_add_to_find_pboard(char_u *pat)
{
if (!pat) return;
// HACK: Do not call Cocoa during a fork or bad things (TM) will happen.
if (gui.dofork) return;
#ifdef FEAT_MBYTE
pat = CONVERT_TO_UTF8(pat);
#endif
+4 -2
View File
@@ -280,7 +280,8 @@ save_re_pat(idx, pat, magic)
if (spats[idx].pat != pat)
{
#if FEAT_GUI_MACVIM
gui_macvim_add_to_find_pboard(pat);
if (RE_SEARCH == idx)
gui_macvim_add_to_find_pboard(pat);
#endif
vim_free(spats[idx].pat);
spats[idx].pat = vim_strsave(pat);
@@ -426,7 +427,8 @@ set_last_search_pat(s, idx, magic, setlast)
int setlast;
{
#if FEAT_GUI_MACVIM
gui_macvim_add_to_find_pboard(s);
if (RE_SEARCH == idx)
gui_macvim_add_to_find_pboard(s);
#endif
vim_free(spats[idx].pat);