To: vim-dev@vim.org Subject: Patch 6.1.297 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.297 Problem: "make test" fails in test6 in an UTF-8 environment. (Benji Fisher) Solution: Before executing the BufReadPost autocommands save the current fileencoding, so that the file isn't marked changed. Files: src/fileio.c *** ../vim61.296/src/fileio.c Tue Jan 7 21:28:36 2003 --- src/fileio.c Tue Jan 7 21:26:47 2003 *************** *** 569,574 **** --- 569,575 ---- if (newfile) { curbuf->b_p_eol = TRUE; + curbuf->b_start_eol = TRUE; #ifdef FEAT_MBYTE curbuf->b_p_bomb = FALSE; #endif *************** *** 2013,2018 **** --- 2014,2024 ---- int m = msg_scroll; int n = msg_scrolled; + /* Save the fileformat now, otherwise the buffer will be considered + * modified if the format/encoding was automatically detected. */ + if (newfile) + save_file_ff(curbuf); + /* * The output from the autocommands should not overwrite anything and * should not be overwritten: Set msg_scroll, restore its value if no *** ../vim61.296/src/version.c Sun Jan 19 19:51:07 2003 --- src/version.c Sun Jan 19 19:52:57 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 297, /**/ -- Never enter the boss's office unless it's absolutely necessary. Every boss saves one corner of the desk for useless assignments that are doled out like Halloween candy to each visitor. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///