To: vim-dev@vim.org Subject: Patch 6.0.057 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.057 Problem: Using ":wincmd g}" in a function doesn't work. (Gary Holloway) Solution: Execute the command directly, instead of putting it in the typeahead buffer. Files: src/normal.c, src/proto/normal.pro, src/window.c *** ../vim60.56/src/normal.c Thu Nov 1 14:44:27 2001 --- src/normal.c Wed Oct 31 11:51:54 2001 *************** *** 80,86 **** static void nv_ctrlo __ARGS((cmdarg_T *cap)); static void nv_hat __ARGS((cmdarg_T *cap)); static void nv_Zet __ARGS((cmdarg_T *cap)); - static void nv_ident __ARGS((cmdarg_T *cap)); #ifdef FEAT_VISUAL static int get_visual_text __ARGS((cmdarg_T *cap, char_u **pp, int *lenp)); #endif --- 80,85 ---- *************** *** 4546,4552 **** * [g] '#' ? to current identifier or string * g ']' :tselect for current identifier */ ! static void nv_ident(cap) cmdarg_T *cap; { --- 4545,4551 ---- * [g] '#' ? to current identifier or string * g ']' :tselect for current identifier */ ! void nv_ident(cap) cmdarg_T *cap; { *** ../vim60.56/src/proto/normal.pro Tue Sep 25 21:49:21 2001 --- src/proto/normal.pro Tue Oct 23 21:19:27 2001 *************** *** 16,21 **** --- 16,22 ---- void do_check_scrollbind __ARGS((int check)); void check_scrollbind __ARGS((linenr_T topline_diff, long leftcol_diff)); void scroll_redraw __ARGS((int up, long count)); + void nv_ident __ARGS((cmdarg_T *cap)); void start_selection __ARGS((void)); void may_start_select __ARGS((int c)); /* vim: set ft=c : */ *** ../vim60.56/src/window.c Fri Sep 14 21:55:06 2001 --- src/window.c Tue Oct 23 21:17:35 2001 *************** *** 526,533 **** postponed_split = Prenum; else postponed_split = -1; ! stuffcharReadbuff('g'); ! stuffcharReadbuff(xchar); break; default: --- 526,545 ---- postponed_split = Prenum; else postponed_split = -1; ! ! /* Execute the command right here, required when ! * "wincmd g}" was used in a function. */ ! { ! oparg_T oa; ! cmdarg_T ca; ! ! clear_oparg(&oa); ! vim_memset(&ca, 0, sizeof(ca)); ! ca.oap = &oa; ! ca.cmdchar = 'g'; ! ca.nchar = xchar; ! nv_ident(&ca); ! } break; default: *** ../vim60.56/src/version.c Thu Nov 1 14:44:27 2001 --- src/version.c Thu Nov 1 14:49:56 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 57, /**/ -- SOLDIER: What? Ridden on a horse? ARTHUR: Yes! SOLDIER: You're using coconuts! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///