Mercurial > vim
comparison src/gui.c @ 1943:96276cc11d8e v7.2.240
updated for version 7.2-240
author | vimboss |
---|---|
date | Wed, 29 Jul 2009 09:11:15 +0000 |
parents | f9c55e12835e |
children | 4f3857aa1785 |
comparison
equal
deleted
inserted
replaced
1942:fe26299d6f70 | 1943:96276cc11d8e |
---|---|
5002 int i; | 5002 int i; |
5003 int type = (flags & FRD_TYPE_MASK); | 5003 int type = (flags & FRD_TYPE_MASK); |
5004 char_u *p; | 5004 char_u *p; |
5005 regmatch_T regmatch; | 5005 regmatch_T regmatch; |
5006 int save_did_emsg = did_emsg; | 5006 int save_did_emsg = did_emsg; |
5007 static int busy = FALSE; | |
5008 | |
5009 /* When the screen is being updated we should not change buffers and | |
5010 * windows structures, it may cause freed memory to be used. Also don't | |
5011 * do this recursively (pressing "Find" quickly several times. */ | |
5012 if (updating_screen || busy) | |
5013 return FALSE; | |
5014 | |
5015 /* refuse replace when text cannot be changed */ | |
5016 if ((type == FRD_REPLACE || type == FRD_REPLACEALL) && text_locked()) | |
5017 return FALSE; | |
5018 | |
5019 busy = TRUE; | |
5007 | 5020 |
5008 ga_init2(&ga, 1, 100); | 5021 ga_init2(&ga, 1, 100); |
5009 if (type == FRD_REPLACEALL) | 5022 if (type == FRD_REPLACEALL) |
5010 ga_concat(&ga, (char_u *)"%s/"); | 5023 ga_concat(&ga, (char_u *)"%s/"); |
5011 | 5024 |
5092 msg_didout = 0; /* overwrite any message */ | 5105 msg_didout = 0; /* overwrite any message */ |
5093 need_wait_return = FALSE; /* don't wait for return */ | 5106 need_wait_return = FALSE; /* don't wait for return */ |
5094 } | 5107 } |
5095 | 5108 |
5096 vim_free(ga.ga_data); | 5109 vim_free(ga.ga_data); |
5110 busy = FALSE; | |
5097 return (ga.ga_len > 0); | 5111 return (ga.ga_len > 0); |
5098 } | 5112 } |
5099 | 5113 |
5100 #endif | 5114 #endif |
5101 | 5115 |