To: vim-dev@vim.org Subject: Patch 6.1.039 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.039 Problem: When folds are defined and the file is changed outside of Vim, reloading the file doesn't update the folds. (Anders Schack-Nielsen) Solution: Recompute the folds after reloading the file. Files: src/fileio.c *** ../vim61.038/src/fileio.c Tue Apr 23 22:11:59 2002 --- src/fileio.c Tue Apr 23 20:49:02 2002 *************** *** 5270,5275 **** --- 5270,5286 ---- #ifdef FEAT_AUTOCMD keep_filetype = FALSE; #endif + #ifdef FEAT_FOLDING + { + win_T *wp; + + /* Update folds unless they are defined manually. */ + FOR_ALL_WINDOWS(wp) + if (wp->w_buffer == curwin->w_buffer + && !foldmethodIsManual(wp)) + foldUpdateAll(wp); + } + #endif /* If the mode didn't change and 'readonly' was set, keep the old * value; the user probably used the ":view" command. But don't * reset it, might have had a read error. */ *** ../vim61.038/src/version.c Sun Apr 28 22:20:43 2002 --- src/version.c Mon Apr 29 21:52:19 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 39, /**/ -- There can't be a crisis today, my schedule is already full. /// 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 ///