To: vim_dev@googlegroups.com Subject: Patch 8.0.0503 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0503 Problem: Endless loop in updating folds with 32 bit ints. Solution: Subtract from LHS instead of add to the RHS. (Matthew Malcomson) Files: src/fold.c *** ../vim-8.0.0502/src/fold.c 2017-03-16 22:06:51.824726916 +0100 --- src/fold.c 2017-03-23 21:19:13.084212797 +0100 *************** *** 2755,2761 **** /* End of fold found, update the length when it got shorter. */ if (fp->fd_len != flp->lnum - fp->fd_top) { ! if (fp->fd_top + fp->fd_len > bot + 1) { /* fold continued below bot */ if (getlevel == foldlevelMarker --- 2755,2761 ---- /* End of fold found, update the length when it got shorter. */ if (fp->fd_len != flp->lnum - fp->fd_top) { ! if (fp->fd_top + fp->fd_len - 1 > bot) { /* fold continued below bot */ if (getlevel == foldlevelMarker *** ../vim-8.0.0502/src/version.c 2017-03-21 21:57:51.338404174 +0100 --- src/version.c 2017-03-23 21:20:47.115523702 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 503, /**/ -- Press any key to continue, press any other key to quit. /// 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 ///