comparison src/eval.c @ 1672:fddea6c03dee v7.2b.004

updated for version 7.2b-004
author vimboss
date Mon, 14 Jul 2008 21:05:15 +0000
parents 0b796e045c42
children 75dbeedddaa9
comparison
equal deleted inserted replaced
1671:5d25cdc3c3f3 1672:fddea6c03dee
14995 int options = SEARCH_KEEP; 14995 int options = SEARCH_KEEP;
14996 proftime_T tm; 14996 proftime_T tm;
14997 14997
14998 /* Make 'cpoptions' empty, the 'l' flag should not be used here. */ 14998 /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
14999 save_cpo = p_cpo; 14999 save_cpo = p_cpo;
15000 p_cpo = (char_u *)""; 15000 p_cpo = empty_option;
15001 15001
15002 #ifdef FEAT_RELTIME 15002 #ifdef FEAT_RELTIME
15003 /* Set the time limit, if there is one. */ 15003 /* Set the time limit, if there is one. */
15004 profile_setlimit(time_limit, &tm); 15004 profile_setlimit(time_limit, &tm);
15005 #endif 15005 #endif
15110 curwin->w_cursor = save_cursor; 15110 curwin->w_cursor = save_cursor;
15111 15111
15112 theend: 15112 theend:
15113 vim_free(pat2); 15113 vim_free(pat2);
15114 vim_free(pat3); 15114 vim_free(pat3);
15115 p_cpo = save_cpo; 15115 if (p_cpo == empty_option)
15116 p_cpo = save_cpo;
15117 else
15118 /* Darn, evaluating the {skip} expression changed the value. */
15119 free_string_option(save_cpo);
15116 15120
15117 return retval; 15121 return retval;
15118 } 15122 }
15119 15123
15120 /* 15124 /*
22501 char_u *ret; 22505 char_u *ret;
22502 char_u *save_cpo; 22506 char_u *save_cpo;
22503 22507
22504 /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */ 22508 /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
22505 save_cpo = p_cpo; 22509 save_cpo = p_cpo;
22506 p_cpo = (char_u *)""; 22510 p_cpo = empty_option;
22507 22511
22508 ga_init2(&ga, 1, 200); 22512 ga_init2(&ga, 1, 200);
22509 22513
22510 do_all = (flags[0] == 'g'); 22514 do_all = (flags[0] == 'g');
22511 22515
22562 vim_free(regmatch.regprog); 22566 vim_free(regmatch.regprog);
22563 } 22567 }
22564 22568
22565 ret = vim_strsave(ga.ga_data == NULL ? str : (char_u *)ga.ga_data); 22569 ret = vim_strsave(ga.ga_data == NULL ? str : (char_u *)ga.ga_data);
22566 ga_clear(&ga); 22570 ga_clear(&ga);
22567 p_cpo = save_cpo; 22571 if (p_cpo == empty_option)
22572 p_cpo = save_cpo;
22573 else
22574 /* Darn, evaluating {sub} expression changed the value. */
22575 free_string_option(save_cpo);
22568 22576
22569 return ret; 22577 return ret;
22570 } 22578 }
22571 22579
22572 #endif /* defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) */ 22580 #endif /* defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) */