To: vim-dev@vim.org Subject: Patch 6.0aw.007 Fcc: outbox From: Bram Moolenaar ------------ Patch 6.0aw.007 Problem: When 'foldlevelstart' is set in a vimrc file, it was not used for the first file in the argument list. (Gary Johnson) Solution: Set 'foldlevel' to 'foldlevelstart' when opening the first buffer. Files: src/main.c *** ../vim-6.0aw/src/main.c Sun Sep 16 22:21:05 2001 --- src/main.c Tue Sep 18 16:18:43 2001 *************** *** 1604,1609 **** --- 1604,1614 ---- curbuf = curwin->w_buffer; if (curbuf->b_ml.ml_mfp == NULL) { + #ifdef FEAT_FOLDING + /* Set 'foldlevel' to 'foldlevelstart' if it's not negative. */ + if (p_fdls >= 0) + curwin->w_p_fdl = p_fdls; + #endif #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) /* When getting the ATTENTION prompt here, use a dialog */ swap_exists_action = SEA_DIALOG; -- GALAHAD turns back. We see from his POV the lovely ZOOT standing by him smiling enchantingly and a number of equally delectable GIRLIES draped around in the seductively poulticed room. They look at him smilingly and wave. "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 ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///