To: vim_dev@googlegroups.com Subject: Patch 7.4.1619 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1619 Problem: When 'fileformats' is set in the vimrc it applies to new buffers but not the initial buffer. Solution: Set 'fileformat' when starting up. (Mike Williams) Files: src/option.c *** ../vim-7.4.1618/src/option.c 2016-03-19 22:11:47.428674921 +0100 --- src/option.c 2016-03-20 17:53:15.129582209 +0100 *************** *** 4017,4022 **** --- 4017,4031 ---- } #endif + if (bufempty()) + { + int idx_ffs = findoption((char_u *)"ffs"); + + /* Apply the first entry of 'fileformats' to the initial buffer. */ + if (idx_ffs >= 0 && (options[idx_ffs].flags & P_WAS_SET)) + set_fileformat(default_fileformat(), OPT_LOCAL); + } + #ifdef FEAT_TITLE set_title_defaults(); #endif *** ../vim-7.4.1618/src/version.c 2016-03-20 17:28:31.444893176 +0100 --- src/version.c 2016-03-20 17:50:12.595464359 +0100 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1619, /**/ -- From "know your smileys": <<<:-{ Worf (Never smiles anyways, so he's a bad smiley) /// 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 ///