To: vim-dev@vim.org Subject: Patch 7.2b.022 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.2b.022 Problem: When using ":normal" while updating the status line the count of an operator is lost. (Dominique Pelle) Solution: Save and restore "opcount". Files: src/ex_docmd.c, src/globals.h, src/normal.c *** ../vim-7.2b.021/src/ex_docmd.c Thu Jul 24 18:44:23 2008 --- src/ex_docmd.c Sat Jul 26 13:51:05 2008 *************** *** 8913,8918 **** --- 8913,8919 ---- tasave_T tabuf; int save_insertmode = p_im; int save_finish_op = finish_op; + int save_opcount = opcount; #ifdef FEAT_MBYTE char_u *arg = NULL; int l; *************** *** 9040,9045 **** --- 9041,9047 ---- restart_edit = save_restart_edit; p_im = save_insertmode; finish_op = save_finish_op; + opcount = save_opcount; msg_didout |= save_msg_didout; /* don't reset msg_didout now */ /* Restore the state (needed when called from a function executed for *** ../vim-7.2b.021/src/globals.h Tue Jun 24 22:56:42 2008 --- src/globals.h Sat Jul 26 13:53:29 2008 *************** *** 868,873 **** --- 868,874 ---- * command interpreter. */ EXTERN int finish_op INIT(= FALSE);/* TRUE while an operator is pending */ + EXTERN int opcount INIT(= 0); /* count for pending operator */ /* * ex mode (Q) state *** ../vim-7.2b.021/src/normal.c Tue Jun 24 22:21:08 2008 --- src/normal.c Sat Jul 26 13:55:51 2008 *************** *** 565,571 **** oparg_T *oap; int toplevel; /* TRUE when called from main() */ { - static long opcount = 0; /* ca.opcount saved here */ cmdarg_T ca; /* command arguments */ int c; int ctrl_w = FALSE; /* got CTRL-W command */ --- 565,570 ---- *** ../vim-7.2b.021/src/version.c Thu Jul 24 22:08:32 2008 --- src/version.c Sat Jul 26 16:02:53 2008 *************** *** 678,679 **** --- 678,681 ---- { /* Add new patch number below this line */ + /**/ + 22, /**/ -- We do not stumble over mountains, but over molehills. Confucius /// 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 ///