Loading ...
Sorry, an error occurred while loading the content.

Re: Folding bug. (6.0w, win2k) [patch]

Expand Messages
  • Bram Moolenaar
    ... I see it on Unix too. This patch should fix it: ... *************** *** 2041,2047 **** break; first = FALSE; #ifdef FEAT_FOLDING !
    Message 1 of 5 , Mar 1, 2001
    • 0 Attachment
      Mark Brophy wrote:

      > I've noticed a bug using gvim 6.0w under windows.
      > You can reproduce it the following way.
      >
      > start gvim with an empty window.
      >
      > insert a few lines of text, select it
      > and hit zf to fold it. Then click with the mouse,
      > just below the fold (and off the text, in the ~'s area).
      >
      > You should get lots of errors/Hit Return prompts.

      I see it on Unix too. This patch should fix it:

      *** ui.c.orig Fri Feb 23 22:50:24 2001
      --- ui.c Thu Mar 1 16:25:04 2001
      ***************
      *** 2041,2047 ****
      break;
      first = FALSE;
      #ifdef FEAT_FOLDING
      ! hasFolding(curwin->w_topline, NULL, &curwin->w_topline);
      #endif
      }
      redraw_later(VALID);
      --- 2041,2049 ----
      break;
      first = FALSE;
      #ifdef FEAT_FOLDING
      ! if (hasFolding(curwin->w_topline, NULL, &curwin->w_topline)
      ! && curwin->w_topline == curbuf->b_ml.ml_line_count)
      ! break;
      #endif
      }
      redraw_later(VALID);
      ***************
      *** 2163,2177 ****
      col += curwin->w_skipcol;
      break;
      }
      if (lnum == curbuf->b_ml.ml_line_count)
      {
      retval = TRUE;
      break; /* past end of file */
      }
      row -= count;
      - #ifdef FEAT_FOLDING
      - (void)hasFolding(lnum, NULL, &lnum);
      - #endif
      ++lnum;
      }
      }
      --- 2165,2179 ----
      col += curwin->w_skipcol;
      break;
      }
      + #ifdef FEAT_FOLDING
      + (void)hasFolding(lnum, NULL, &lnum);
      + #endif
      if (lnum == curbuf->b_ml.ml_line_count)
      {
      retval = TRUE;
      break; /* past end of file */
      }
      row -= count;
      ++lnum;
      }
      }

      --
      hundred-and-one symptoms of being an internet addict:
      37. You start looking for hot HTML addresses in public restrooms.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.