comparison src/getchar.c @ 847:d40242891d35

updated for version 7.0f04
author vimboss
date Fri, 28 Apr 2006 22:32:28 +0000
parents d3bbb5dd3913
children d58e3db4a7d1
comparison
equal deleted inserted replaced
846:db44f7b81373 847:d40242891d35
2319 2319
2320 #ifdef FEAT_EVAL 2320 #ifdef FEAT_EVAL
2321 /* 2321 /*
2322 * Handle ":map <expr>": evaluate the {rhs} as an 2322 * Handle ":map <expr>": evaluate the {rhs} as an
2323 * expression. Save and restore the typeahead so that 2323 * expression. Save and restore the typeahead so that
2324 * getchar() can be used. 2324 * getchar() can be used. Also save and restore the
2325 * command line for "normal :".
2325 */ 2326 */
2326 if (mp->m_expr) 2327 if (mp->m_expr)
2327 { 2328 {
2328 tasave_T tabuf; 2329 tasave_T tabuf;
2329 int save_vgetc_busy = vgetc_busy; 2330 int save_vgetc_busy = vgetc_busy;
4299 eval_map_expr(str) 4300 eval_map_expr(str)
4300 char_u *str; 4301 char_u *str;
4301 { 4302 {
4302 char_u *res; 4303 char_u *res;
4303 char_u *p; 4304 char_u *p;
4304 4305 char_u *save_cmd;
4306
4307 save_cmd = save_cmdline_alloc();
4308 if (save_cmd == NULL)
4309 return NULL;
4305 p = eval_to_string(str, NULL, FALSE); 4310 p = eval_to_string(str, NULL, FALSE);
4311 restore_cmdline_alloc(save_cmd);
4306 if (p == NULL) 4312 if (p == NULL)
4307 return NULL; 4313 return NULL;
4308 res = vim_strsave_escape_csi(p); 4314 res = vim_strsave_escape_csi(p);
4309 vim_free(p); 4315 vim_free(p);
4310 4316