To: vim_dev@googlegroups.com Subject: Patch 7.3.704 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.704 Problem: Repeating "cgn" does not always work correctly. Solution: Also fetch the operator character. (Christian Brabandt) Files: src/normal.c *** ../vim-7.3.703/src/normal.c 2012-08-15 13:30:55.000000000 +0200 --- src/normal.c 2012-10-21 03:51:38.000000000 +0200 *************** *** 960,967 **** #ifdef FEAT_CMDL_INFO need_flushbuf |= add_to_showcmd(ca.nchar); #endif if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`' ! || ca.nchar == Ctrl_BSL) { cp = &ca.extra_char; /* need to get a third character */ if (ca.nchar != 'r') --- 960,970 ---- #ifdef FEAT_CMDL_INFO need_flushbuf |= add_to_showcmd(ca.nchar); #endif + /* For "gn" from redo, need to get one more char to determine the + * operator */ if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`' ! || ca.nchar == Ctrl_BSL ! || ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty())) { cp = &ca.extra_char; /* need to get a third character */ if (ca.nchar != 'r') *************** *** 1083,1088 **** --- 1086,1093 ---- ca.nchar = ca.extra_char; idx = find_command(ca.cmdchar); } + else if (ca.nchar == 'n' || ca.nchar == 'N') + ca.oap->op_type = get_op_type(*cp, NUL); else if (*cp == Ctrl_BSL) { long towait = (p_ttm >= 0 ? p_ttm : p_tm); *************** *** 8009,8015 **** #ifdef FEAT_VISUAL if (!current_search(cap->count1, cap->nchar == 'n')) #endif ! beep_flush(); break; /* --- 8014,8020 ---- #ifdef FEAT_VISUAL if (!current_search(cap->count1, cap->nchar == 'n')) #endif ! clearopbeep(oap); break; /* *** ../vim-7.3.703/src/version.c 2012-10-21 03:45:57.000000000 +0200 --- src/version.c 2012-10-21 03:53:51.000000000 +0200 *************** *** 721,722 **** --- 721,724 ---- { /* Add new patch number below this line */ + /**/ + 704, /**/ -- The word "leader" is derived from the word "lead", as in the material that bullets are made out of. The term "leader" was popularized at about the same time as the invention of firearms. It grew out of the observation that the person in charge of every organization was the person whom everyone wanted to fill with hot lead. I don't recomment this; it's just a point of historical interest. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///