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

Re: Minor ':make' output bug [patch]

Expand Messages
  • Bram Moolenaar
    ... I see the problem. It s an off-by-one error. It would also be wrong when uhex is used in display . This patch should fix both: ... ***************
    Message 1 of 2 , Mar 1 8:12 AM
    • 0 Attachment
      Neil Bird wrote:

      > [6.0v]
      >
      > If the error message from a line out of :make is such that it *exactly*
      > fills the statusbar upon :cc, it still adds the '...' abbreviation - but
      > because it /is/ the right length, repeated ':cc's never give the whole
      > text, IYSWIM.
      >
      > E.g.,
      >
      > :cc
      > (7 of 21): too few argument...o function `clip_own_selection'
      > 398,6-13 15%
      >
      > ^^^ == "s t"
      >
      > Normally, a second :cc after an abbreviated line such as this would
      > given the long text. But the long text is the same length, & so again gets
      > abbreviated.

      I see the problem. It's an off-by-one error. It would also be wrong when
      "uhex" is used in 'display'. This patch should fix both:

      *** ../dist/vim60w/src/message.c Sat Feb 24 15:28:36 2001
      --- message.c Thu Mar 1 16:00:14 2001
      ***************
      *** 216,225 ****
      else
      #endif
      {
      ! for (i = STRLEN(s) - 1; len < room; --i)
      ! len += ptr2cells(s + i);
      ! if (len > room)
      ! ++i;
      }
      STRCAT(buf, s + i);
      }
      --- 219,227 ----
      else
      #endif
      {
      ! for (i = STRLEN(s); len + (n = ptr2cells(s + i - 1)) <= room;
      ! --i)
      ! len += n;
      }
      STRCAT(buf, s + i);
      }
      --
      hundred-and-one symptoms of being an internet addict:
      35. Your husband tells you he's had the beard for 2 months.

      /// 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.