To: vim-dev@vim.org Subject: Patch 6.1.112 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.112 Problem: When using ":argdo", ":bufdo" or ":windo", CTRL-O doesn't go to the cursor position from before this command but every position where the argument was executed. Solution: Only remember the cursor position from before the ":argdo", ":bufdo" and ":windo". Files: src/ex_cmds2.c, src/mark.c *** ../vim61.111/src/ex_cmds2.c Sun Mar 17 14:14:58 2002 --- src/ex_cmds2.c Mon Jun 24 22:44:49 2002 *************** *** 1258,1264 **** (eap->forceit ? ECMD_FORCEIT : 0)); /* like Vi: set the mark where the cursor is in the file. */ ! setmark('\''); } } --- 1258,1265 ---- (eap->forceit ? ECMD_FORCEIT : 0)); /* like Vi: set the mark where the cursor is in the file. */ ! if (eap->cmdidx != CMD_argdo) ! setmark('\''); } } *************** *** 1428,1435 **** --- 1429,1441 ---- #ifdef FEAT_WINDOWS win = firstwin; #endif + /* set pcmark now */ if (eap->cmdidx == CMD_bufdo) goto_buffer(eap, DOBUF_FIRST, FORWARD, 0); + else + setpcmark(); + listcmd_busy = TRUE; /* avoids setting pcmark below */ + while (!got_int) { if (eap->cmdidx == CMD_argdo) *************** *** 1454,1463 **** #endif /* execute the command */ - listcmd_busy = TRUE; do_cmdline(eap->arg, eap->getline, eap->cookie, DOCMD_VERBOSE + DOCMD_NOWAIT); - listcmd_busy = FALSE; if (eap->cmdidx == CMD_bufdo) { --- 1460,1467 ---- *************** *** 1482,1488 **** --- 1486,1494 ---- } #endif } + listcmd_busy = FALSE; } + #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) if (new_ei != NULL) { *** ../vim61.111/src/mark.c Wed May 15 22:31:55 2002 --- src/mark.c Mon Jun 24 22:02:38 2002 *************** *** 99,105 **** #endif /* for :global the mark is set only once */ ! if (global_busy) return; curwin->w_prev_pcmark = curwin->w_pcmark; --- 99,105 ---- #endif /* for :global the mark is set only once */ ! if (global_busy || listcmd_busy) return; curwin->w_prev_pcmark = curwin->w_pcmark; *** ../vim61.111/src/version.c Sun Jun 23 21:29:33 2002 --- src/version.c Mon Jun 24 22:42:11 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 112, /**/ -- Not too long ago, a program was something you watched on TV... /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///