To: vim-dev@vim.org Subject: Patch 6.1b.033 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1b.033 Problem: When using a count after a ":s" command may get ml_get errors. (Dietmar Lang) Solution: Check that the resulting range does not go past the end of the buffer. Files: src/ex_cmds.c *** ../vim61b.032/src/ex_cmds.c Wed Feb 27 20:21:31 2002 --- src/ex_cmds.c Fri Mar 22 19:29:46 2002 *************** *** 3511,3516 **** --- 3511,3518 ---- } eap->line1 = eap->line2; eap->line2 += i - 1; + if (eap->line2 > curbuf->b_ml.ml_line_count) + eap->line2 = curbuf->b_ml.ml_line_count; } /* *** ../vim61b.032/src/version.c Thu Mar 21 22:42:47 2002 --- src/version.c Fri Mar 22 19:31:37 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 33, /**/ -- CART DRIVER: Bring out your dead! We follow the cart through a wretched, impoverished plague-ridden village. A few starved mongrels run about in the mud scavenging. In the open doorway of one house perhaps we jug glimpse a pair of legs dangling from the ceiling. In another doorway an OLD WOMAN is beating a cat against a wall rather like one does with a mat. The cart passes round a dead donkey or cow in the mud. And a MAN tied to a cart is being hammered to death by four NUNS with huge mallets. "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 ///