To: vim-dev@vim.org Subject: Patch 5.7.027 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.7.027 Problem: Starting to edit a file can cause a crash. For example when in Insert mode, using CTRL-O :help abbr to scroll the screen and then , which edits a help file. (Robert Bogomip) Solution: Check if keep_msg is NULL before copying it. Files: src/fileio.c *** ../vim-5.7.26/src/fileio.c Thu Mar 8 15:12:32 2001 --- src/fileio.c Thu Mar 29 20:35:07 2001 *************** *** 966,972 **** #endif keep_msg = msg_trunc_attr(IObuff, FALSE, 0); keep_msg_attr = 0; ! if (read_stdin || restart_edit != 0) { /* When reading from stdin, the screen will be cleared next; * keep the message to repeat it later. --- 966,972 ---- #endif keep_msg = msg_trunc_attr(IObuff, FALSE, 0); keep_msg_attr = 0; ! if ((read_stdin || restart_edit != 0) && keep_msg != NULL) { /* When reading from stdin, the screen will be cleared next; * keep the message to repeat it later. *** ../vim-5.7.26/src/version.c Fri Mar 9 15:40:58 2001 --- src/version.c Thu Mar 29 20:39:21 2001 *************** *** 439,440 **** --- 439,442 ---- { /* Add new patch number below this line */ + /**/ + 27, /**/ -- SOLDIER: Where did you get the coconuts? ARTHUR: Through ... We found them. SOLDIER: Found them? In Mercea. The coconut's tropical! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///