To: vim-dev@vim.org Subject: Patch 6.1b.034 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1b.034 Problem: After sourcing mswin.vim, when using after auto-indenting and then , get warning for allocating rediculous amount of memory. (Dave Delgreco) Solution: Adjust the start of the Visual area when deleting the auto-indent. Files: src/edit.c *** ../vim61b.033/src/edit.c Fri Mar 15 21:46:59 2002 --- src/edit.c Fri Mar 22 19:54:38 2002 *************** *** 4311,4316 **** --- 4311,4332 ---- (void)del_char(TRUE); if (cc != NUL) ++curwin->w_cursor.col; /* put cursor back on the NUL */ + + #ifdef FEAT_VISUAL + /* may start Visual mode, adjust the position for deleted + * characters. */ + if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) + { + cc = STRLEN(ml_get_curline()); + if (VIsual.col > cc) + { + VIsual.col = cc; + # ifdef FEAT_VIRTUALEDIT + VIsual.coladd = 0; + # endif + } + } + #endif } did_ai = FALSE; #ifdef FEAT_SMARTINDENT *** ../vim61b.033/src/version.c Fri Mar 22 19:34:44 2002 --- src/version.c Fri Mar 22 19:52:09 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 34, /**/ -- CART DRIVER: Bring out your dead! LARGE MAN: Here's one! CART DRIVER: Ninepence. BODY: I'm not dead! "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 ///