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

68418Re: Patch 7.3.826

Expand Messages
  • Nazri Ramliy
    Feb 22, 2013
    • 0 Attachment
      On Fri, Feb 22, 2013 at 10:00 PM, Roland Eggner
      <edvx1@...> wrote:
      > On 2013-02-20 Wednesday at 16:48 +0100 Bram Moolenaar wrote:
      > On wide terminals the feature list in :version message is interrupted by empty
      > lines, observed with e.g. COLUMNS=320. Bugfix attached.

      Maybe it's better if we limit the feature list to 80 column width?
      It's easier to scan
      vertically compared to horizontally when inspecting the features available.

      So something like this:

      % hg diff version.c



      23:12:48
      diff -r 8b86b69546a9 src/version.c
      --- a/src/version.c Wed Feb 20 21:26:00 2013 +0100
      +++ b/src/version.c Fri Feb 22 23:12:51 2013 +0800
      @@ -2461,6 +2461,7 @@
      int nrow;
      int nfeat = 0;
      int width = 0;
      + int columns = Columns > 80 ? 80 : Columns;

      /* Find the length of the longest feature name, use that + 1 as the column
      * width */
      @@ -2474,7 +2475,7 @@
      }
      width += 1;

      - if (Columns < width)
      + if (columns < width)
      {
      /* Not enough screen columns - show one per line */
      for (i = 0; features[i] != NULL; ++i)
      @@ -2486,10 +2487,10 @@
      return;
      }

      - ncol = (int) Columns / width;
      + ncol = (int) columns / width;
      /* The rightmost column doesn't need a separator.
      * Sacrifice it to fit in one more column if possible. */
      - if (Columns % width == width - 1)
      + if (columns % width == width - 1)
      ncol++;

      nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0);



      Nazri

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 6 messages in this topic