To: vim-dev@vim.org Subject: Patch 6.1.108 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.108 Problem: When interrupting a filter command such as "!!sleep 20" the file becomes read-only. (Mark Brader) Solution: Only set the read-only flag when opening a buffer is interrupted. When the shell command was interrupted, read the output that was produced so far. Files: src/ex_cmds.c, src/fileio.c *** ../vim61.107/src/ex_cmds.c Mon May 20 21:53:16 2002 --- src/ex_cmds.c Sat Jun 15 12:12:51 2002 *************** *** 842,847 **** --- 842,853 ---- did_check_timestamps = FALSE; need_check_timestamps = TRUE; + /* When interrupting the shell command, it may still have produced some + * useful output. Reset got_int here, so that readfile() won't cancel + * reading. */ + ui_breakcheck(); + got_int = FALSE; + if (do_out) { if (u_save((linenr_T)(line2), (linenr_T)(line2 + 1)) == FAIL) *** ../vim61.107/src/fileio.c Fri May 17 10:21:40 2002 --- src/fileio.c Fri Jun 14 22:34:24 2002 *************** *** 1734,1740 **** if (!(flags & READ_DUMMY)) { filemess(curbuf, sfname, (char_u *)_(e_interr), 0); ! curbuf->b_p_ro = TRUE; /* must use "w!" now */ } msg_scroll = msg_save; #ifdef FEAT_VIMINFO --- 1734,1741 ---- if (!(flags & READ_DUMMY)) { filemess(curbuf, sfname, (char_u *)_(e_interr), 0); ! if (newfile) ! curbuf->b_p_ro = TRUE; /* must use "w!" now */ } msg_scroll = msg_save; #ifdef FEAT_VIMINFO *** ../vim61.107/src/version.c Sun Jun 23 14:43:12 2002 --- src/version.c Sun Jun 23 14:59:23 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 108, /**/ -- DINGO: You must spank her well and after you have spanked her you may deal with her as you like and then ... spank me. AMAZING: And spank me! STUNNER: And me. LOVELY: And me. "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 ///