| To: vim-dev@vim.org |
| Subject: Patch 7.1.140 |
| 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.1.140 |
| Problem: v:count is set only after typing a non-digit, that makes it |
| difficult to make a nice mapping. |
| Solution: Set v:count while still typing the count. |
| Files: src/normal.c |
| |
| |
| |
| |
| |
| *** 690,695 **** |
| --- 690,702 ---- |
| ca.count0 = ca.count0 * 10 + (c - '0'); |
| if (ca.count0 < 0) /* got too large! */ |
| ca.count0 = 999999999L; |
| + #ifdef FEAT_EVAL |
| + /* Set v:count here, when called from main() and not a stuffed |
| + * command, so that v:count can be used in an expression mapping |
| + * right after the count. */ |
| + if (toplevel && stuff_empty()) |
| + set_vcount(ca.count0, ca.count0 == 0 ? 1 : ca.count0); |
| + #endif |
| if (ctrl_w) |
| { |
| ++no_mapping; |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 140, |
| /**/ |
| |
| -- |
| How To Keep A Healthy Level Of Insanity: |
| 11. Specify that your drive-through order is "to go". |
| |
| /// 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 /// |