| To: vim-dev@vim.org |
| Subject: Patch 7.0.041 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.0.041 |
| Problem: cursor([1, 1]) doesn't work. (Peter Hodge) |
| Solution: Allow leaving out the third item of the list and use zero for the |
| virtual column offset. |
| Files: src/eval.c |
| |
| |
| |
| |
| |
| *** 16465,16473 **** |
| long i = 0; |
| long n; |
| |
| ! /* List must be: [fnum, lnum, col, coladd] */ |
| ! if (arg->v_type != VAR_LIST || l == NULL |
| ! || l->lv_len != (fnump == NULL ? 3 : 4)) |
| return FAIL; |
| |
| if (fnump != NULL) |
| --- 16465,16476 ---- |
| long i = 0; |
| long n; |
| |
| ! /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there |
| ! * when "fnump" isn't NULL and "coladd" is optional. */ |
| ! if (arg->v_type != VAR_LIST |
| ! || l == NULL |
| ! || l->lv_len < (fnump == NULL ? 2 : 3) |
| ! || l->lv_len > (fnump == NULL ? 3 : 4)) |
| return FAIL; |
| |
| if (fnump != NULL) |
| |
| *** 16493,16500 **** |
| #ifdef FEAT_VIRTUALEDIT |
| n = list_find_nr(l, i, NULL); |
| if (n < 0) |
| ! return FAIL; |
| ! posp->coladd = n; |
| #endif |
| |
| return OK; |
| --- 16496,16504 ---- |
| #ifdef FEAT_VIRTUALEDIT |
| n = list_find_nr(l, i, NULL); |
| if (n < 0) |
| ! posp->coladd = 0; |
| ! else |
| ! posp->coladd = n; |
| #endif |
| |
| return OK; |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 41, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 43. You tell the kids they can't use the computer because "Daddy's got work to |
| do" and you don't even have a job. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |