To: vim-dev@vim.org Subject: Patch 6.0.108 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.108 Problem: When using folding could try displaying line zero, resulting in an error for a NULL pointer. Solution: Stop decrementing w_topline when the first line of a window is in a closed fold. Files: src/window.c *** ../vim60.107/src/window.c Mon Nov 5 09:52:01 2001 --- src/window.c Sun Dec 30 22:23:22 2001 *************** *** 4072,4077 **** --- 4072,4084 ---- { #ifdef FEAT_FOLDING hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL); + if (lnum == 1) + { + /* first line in buffer is folded */ + line_size = 1; + --sline; + break; + } #endif --lnum; #ifdef FEAT_DIFF *** ../vim60.107/src/version.c Sun Dec 30 22:28:38 2001 --- src/version.c Sun Dec 30 22:31:03 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 108, /**/ -- GOD: That is your purpose Arthur ... the Quest for the Holy Grail ... "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 ///