To: vim-dev@vim.org Subject: patch 5.4.28 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.4.28 Problem: When using a BufWritePre autocommand to change 'fileformat', the new value would not be used for writing the file. Solution: Check 'fileformat' after executing the autocommands instead of before. Files: src/fileio.c *** ../vim-5.4.27/src/fileio.c Thu Aug 12 23:37:02 1999 --- src/fileio.c Sun Aug 15 13:38:17 1999 *************** *** 1099,1105 **** linenr_t old_line_count = buf->b_ml.ml_line_count; #endif int attr; ! int fileformat = get_fileformat(buf); #ifdef CRYPTV int encrypted = FALSE; #endif --- 1099,1105 ---- linenr_t old_line_count = buf->b_ml.ml_line_count; #endif int attr; ! int fileformat; #ifdef CRYPTV int encrypted = FALSE; #endif *************** *** 1767,1772 **** --- 1767,1773 ---- } #endif + fileformat = get_fileformat(buf); if (end > buf->b_ml.ml_line_count) end = buf->b_ml.ml_line_count; *** ../vim-5.4.27/src/version.h Sun Aug 15 13:45:56 1999 --- src/version.h Sun Aug 15 13:45:38 1999 *************** *** 19,26 **** #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 27 ! #define VIM_VERSION_PATCHLEVEL_STR "27" /* * VIM_VERSION_NODOT is used for the runtime directory name. --- 19,26 ---- #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 28 ! #define VIM_VERSION_PATCHLEVEL_STR "28" /* * VIM_VERSION_NODOT is used for the runtime directory name. *************** *** 30,35 **** */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.27" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.27 (1999 Aug 13)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.27 (1999 Aug 13, compiled " --- 30,35 ---- */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.28" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.28 (1999 Aug 13)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.28 (1999 Aug 13, compiled " -- hundred-and-one symptoms of being an internet addict: 99. The hum of a cooling fan and the click of keys is comforting to you. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /