comparison src/getchar.c @ 856:8cd729851562 v7.0g

updated for version 7.0g
author vimboss
date Sun, 30 Apr 2006 18:54:39 +0000
parents d58e3db4a7d1
children 99305c4c42d4
comparison
equal deleted inserted replaced
855:d2a4f08396fe 856:8cd729851562
4333 char_u *str; 4333 char_u *str;
4334 { 4334 {
4335 char_u *res; 4335 char_u *res;
4336 char_u *p; 4336 char_u *p;
4337 char_u *save_cmd; 4337 char_u *save_cmd;
4338 pos_T save_cursor;
4338 4339
4339 save_cmd = save_cmdline_alloc(); 4340 save_cmd = save_cmdline_alloc();
4340 if (save_cmd == NULL) 4341 if (save_cmd == NULL)
4341 return NULL; 4342 return NULL;
4343
4344 /* Forbid changing text or using ":normal" to avoid most of the bad side
4345 * effects. Also restore the cursor position. */
4346 ++textlock;
4347 #ifdef FEAT_EX_EXTRA
4348 ++ex_normal_lock;
4349 #endif
4350 save_cursor = curwin->w_cursor;
4342 p = eval_to_string(str, NULL, FALSE); 4351 p = eval_to_string(str, NULL, FALSE);
4352 --textlock;
4353 #ifdef FEAT_EX_EXTRA
4354 --ex_normal_lock;
4355 #endif
4356 curwin->w_cursor = save_cursor;
4357
4343 restore_cmdline_alloc(save_cmd); 4358 restore_cmdline_alloc(save_cmd);
4344 if (p == NULL) 4359 if (p == NULL)
4345 return NULL; 4360 return NULL;
4346 res = vim_strsave_escape_csi(p); 4361 res = vim_strsave_escape_csi(p);
4347 vim_free(p); 4362 vim_free(p);