comparison src/eval.c @ 1533:8abc0abf8cbd v7.1.248

updated for version 7.1-248
author vimboss
date Wed, 13 Feb 2008 11:42:46 +0000
parents dfcff6590aba
children 0d0bf7598dcb
comparison
equal deleted inserted replaced
1532:87b9f21264a7 1533:8abc0abf8cbd
14774 { 14774 {
14775 pos_T pos; 14775 pos_T pos;
14776 int fnum; 14776 int fnum;
14777 char_u *name; 14777 char_u *name;
14778 14778
14779 rettv->vval.v_number = -1;
14779 name = get_tv_string_chk(argvars); 14780 name = get_tv_string_chk(argvars);
14780 if (name != NULL) 14781 if (name != NULL)
14781 { 14782 {
14782 if (list2fpos(&argvars[1], &pos, &fnum) == OK) 14783 if (list2fpos(&argvars[1], &pos, &fnum) == OK)
14783 { 14784 {
14784 --pos.col; 14785 --pos.col;
14785 if (name[0] == '.') /* cursor */ 14786 if (name[0] == '.' && name[1] == NUL)
14786 { 14787 {
14788 /* set cursor */
14787 if (fnum == curbuf->b_fnum) 14789 if (fnum == curbuf->b_fnum)
14788 { 14790 {
14789 curwin->w_cursor = pos; 14791 curwin->w_cursor = pos;
14790 check_cursor(); 14792 check_cursor();
14793 rettv->vval.v_number = 0;
14791 } 14794 }
14792 else 14795 else
14793 EMSG(_(e_invarg)); 14796 EMSG(_(e_invarg));
14794 } 14797 }
14795 else if (name[0] == '\'') /* mark */ 14798 else if (name[0] == '\'' && name[1] != NUL && name[2] == NUL)
14796 (void)setmark_pos(name[1], &pos, fnum); 14799 {
14800 /* set mark */
14801 if (setmark_pos(name[1], &pos, fnum) == OK)
14802 rettv->vval.v_number = 0;
14803 }
14797 else 14804 else
14798 EMSG(_(e_invarg)); 14805 EMSG(_(e_invarg));
14799 } 14806 }
14800 } 14807 }
14801 } 14808 }