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

Re: netbeans getLength function returns an incorrect length

Expand Messages
  • Bram Moolenaar
    ... Thanks, I ll put it near the top of the todo list. -- hundred-and-one symptoms of being an internet addict: 185. You order fast food over the Internet ///
    Message 1 of 2 , Sep 3 1:19 PM
    • 0 Attachment
      Xavier de Gaye wrote:

      > Problem: Netbeans getLength function returns an incorrect length.
      > Solution: The function get_buf_size() in netbeans.c wrongly assumes
      > that bufp is a pointer to curbuf, use ml_get_buf() instead.
      > Files: src/netbeans.c
      >
      > Patch on Vim version 7.2.245:
      >
      > Index: netbeans.c
      > ===================================================================
      > --- netbeans.c (revision 1586)
      > +++ netbeans.c (working copy)
      > @@ -3514,7 +3514,7 @@
      > eol_size = 1;
      > for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum)
      > {
      > - char_count += (long)STRLEN(ml_get(lnum)) + eol_size;
      > + char_count += (long)STRLEN(ml_get_buf(bufp, lnum, FALSE))
      > + eol_size;
      > /* Check for a CTRL-C every 100000 characters */
      > if (char_count > last_check)
      > {

      Thanks, I'll put it near the top of the todo list.

      --
      hundred-and-one symptoms of being an internet addict:
      185. You order fast food over the Internet

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.