To: vim_dev@googlegroups.com Subject: Patch 7.4.2362 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2362 Problem: Illegal memory access with ":1@". (Dominique Pelle) Solution: Correct cursor column after setting the line number. Also avoid calling end_visual_mode() when not in Visual mode. Files: src/ex_docmd.c, src/buffer.c *** ../vim-7.4.2361/src/ex_docmd.c 2016-09-04 19:50:50.520985732 +0200 --- src/ex_docmd.c 2016-09-11 14:36:00.751311436 +0200 *************** *** 9388,9393 **** --- 9388,9394 ---- int prev_len = typebuf.tb_len; curwin->w_cursor.lnum = eap->line2; + check_cursor_col(); #ifdef USE_ON_FLY_SCROLL dont_scroll = TRUE; /* disallow scrolling here */ *** ../vim-7.4.2361/src/buffer.c 2016-09-09 12:57:05.665313092 +0200 --- src/buffer.c 2016-09-11 14:36:14.627120529 +0200 *************** *** 580,586 **** /* When closing the current buffer stop Visual mode before freeing * anything. */ ! if (buf == curbuf #if defined(EXITFREE) && !entered_free_all_mem #endif --- 580,586 ---- /* When closing the current buffer stop Visual mode before freeing * anything. */ ! if (buf == curbuf && VIsual_active #if defined(EXITFREE) && !entered_free_all_mem #endif *************** *** 1389,1395 **** } /* When closing the current buffer stop Visual mode. */ ! if (buf == curbuf) end_visual_mode(); /* --- 1389,1395 ---- } /* When closing the current buffer stop Visual mode. */ ! if (buf == curbuf && VIsual_active) end_visual_mode(); /* *** ../vim-7.4.2361/src/version.c 2016-09-10 19:17:37.703773521 +0200 --- src/version.c 2016-09-11 14:39:29.000446795 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2362, /**/ -- hundred-and-one symptoms of being an internet addict: 233. You start dreaming about web pages...in html. /// 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 ///