To: vim-dev@vim.org Subject: Patch 6.0.236 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.236 Problem: ":edit" without argument should move cursor to line 1 in Vi compatible mode. Solution: Add 'g' flag to 'cpoptions'. Files: runtime/doc/options.txt, src/ex_docmd.c, src/option.h *** ../vim60.235/runtime/doc/options.txt Sun Feb 3 17:31:22 2002 --- runtime/doc/options.txt Mon Feb 18 13:55:08 2002 *************** *** 1,4 **** ! *options.txt* For Vim version 6.0. Last change: 2001 Sep 26 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *options.txt* For Vim version 6.0. Last change: 2002 Feb 18 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 1423,1435 **** 'B' included: "\^[" (^[ is a real ) 'B' excluded: "" (5 characters) ('<' excluded in both cases) - C Do not concatenate sourced lines that start with a - backslash. See |line-continuation|. c Searching continues at the end of any match at the cursor position. When not present searching continues one character from the cursor position. With 'c' "abababababab" only gets three matches when repeating "/abab", without 'c' there are five matches. d Using "./" in the 'tags' option doesn't mean to use the tags file relative to the current file, but the tags file in the current directory. --- 1425,1437 ---- 'B' included: "\^[" (^[ is a real ) 'B' excluded: "" (5 characters) ('<' excluded in both cases) c Searching continues at the end of any match at the cursor position. When not present searching continues one character from the cursor position. With 'c' "abababababab" only gets three matches when repeating "/abab", without 'c' there are five matches. + C Do not concatenate sourced lines that start with a + backslash. See |line-continuation|. d Using "./" in the 'tags' option doesn't mean to use the tags file relative to the current file, but the tags file in the current directory. *************** *** 1453,1458 **** --- 1455,1461 ---- argument will set the file name for the current buffer, if the current buffer doesn't have a file name yet. + g Goto line 1 when using ":edit" without argument. i When included, interrupting the reading of a file will leave it modified. j When joining lines, only add two spaces after a '.', *** ../vim60.235/src/ex_docmd.c Sun Feb 17 23:22:34 2002 --- src/ex_docmd.c Mon Feb 18 14:14:17 2002 *************** *** 5724,5730 **** readonlymode = TRUE; setpcmark(); if (do_ecmd(0, (eap->cmdidx == CMD_enew ? NULL : eap->arg), ! NULL, eap, eap->do_ecmd_lnum, (P_HID(curbuf) ? ECMD_HIDE : 0) + (eap->forceit ? ECMD_FORCEIT : 0) #ifdef FEAT_LISTCMDS --- 5724,5734 ---- readonlymode = TRUE; setpcmark(); if (do_ecmd(0, (eap->cmdidx == CMD_enew ? NULL : eap->arg), ! NULL, eap, ! /* ":edit" goes to first line if Vi compatible */ ! (*eap->arg == NUL && eap->do_ecmd_lnum == 0 ! && vim_strchr(p_cpo, CPO_GOTO1) != NULL) ! ? ECMD_ONE : eap->do_ecmd_lnum, (P_HID(curbuf) ? ECMD_HIDE : 0) + (eap->forceit ? ECMD_FORCEIT : 0) #ifdef FEAT_LISTCMDS *** ../vim60.235/src/option.h Mon Feb 18 10:26:40 2002 --- src/option.h Mon Feb 18 13:56:28 2002 *************** *** 125,130 **** --- 125,131 ---- #define CPO_EMPTYREGION 'E' /* operating on empty region is an error */ #define CPO_FNAMER 'f' /* set file name for ":r file" */ #define CPO_FNAMEW 'F' /* set file name for ":w file" */ + #define CPO_GOTO1 'g' /* goto line 1 for ":edit" */ #define CPO_INTMOD 'i' /* interrupt a read makes buffer modified */ #define CPO_JOINSP 'j' /* only use two spaces for join after '.' */ #define CPO_ENDOFSENT 'J' /* need two spaces to detect end of sentence */ *************** *** 152,158 **** #define CPO_STAR '*' /* ":*" means ":@" */ #define CPO_SPECI '<' /* don't recognize <> in mappings */ #define CPO_DEFAULT "aABceFs" ! #define CPO_ALL "aAbBcCdDeEfFijJkKlLmnoOprsStuwWxy$!%*<" /* characters for p_ww option: */ #define WW_ALL "bshl<>[],~" --- 153,159 ---- #define CPO_STAR '*' /* ":*" means ":@" */ #define CPO_SPECI '<' /* don't recognize <> in mappings */ #define CPO_DEFAULT "aABceFs" ! #define CPO_ALL "aAbBcCdDeEfFgijJkKlLmnoOprsStuwWxy$!%*<" /* characters for p_ww option: */ #define WW_ALL "bshl<>[],~" *** ../vim60.235/src/version.c Mon Feb 18 13:52:08 2002 --- src/version.c Mon Feb 18 14:18:33 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 236, /**/ -- 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 \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///