mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
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:
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user