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

Re: Patch 7.3.826

Expand Messages
  • Roland Eggner
    ... On wide terminals the feature list in :version message is interrupted by empty lines, observed with e.g. COLUMNS=320. Bugfix attached. -- Regards Roland
    Message 1 of 6 , Feb 22, 2013
    • 0 Attachment
      On 2013-02-20 Wednesday at 16:48 +0100 Bram Moolenaar wrote:
      >
      > Patch 7.3.826
      > Problem: List of features in :version output is hard to read.
      > Solution: Make columns. (Nazri Ramliy)
      > Files: src/version.c

      On wide terminals the feature list in :version message is interrupted by empty
      lines, observed with e.g. COLUMNS=320. Bugfix attached.

      --
      Regards
      Roland Eggner

      src/version.c | 26 ++++++++++++++++++--------
      1 files changed, 18 insertions(+), 8 deletions(-)
    • Nazri Ramliy
      On Fri, Feb 22, 2013 at 10:00 PM, Roland Eggner ... Maybe it s better if we limit the feature list to 80 column width? It s easier to scan vertically compared
      Message 2 of 6 , 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.
      • Nazri Ramliy
        On Fri, Feb 22, 2013 at 10:00 PM, Roland Eggner ... A shorter patch, but the fixes the same problem: diff -r 8b86b69546a9 src/version.c ... +++ b/src/version.c
        Message 3 of 6 , 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:
          >>
          >> Patch 7.3.826
          >> Problem: List of features in :version output is hard to read.
          >> Solution: Make columns. (Nazri Ramliy)
          >> Files: src/version.c
          >
          > On wide terminals the feature list in :version message is interrupted by empty
          > lines, observed with e.g. COLUMNS=320. Bugfix attached.

          A shorter patch, but the fixes the same problem:

          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:20:08 2013 +0800
          @@ -2515,7 +2515,8 @@
          }
          }
          else
          - msg_putchar('\n');
          + if (msg_col > 0)
          + msg_putchar('\n');
          }
          }
          void

          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.
        • Bram Moolenaar
          ... Thanks for the fix. The logic is a bit clumsy, there should be a simpler way. -- Back off man, I m a scientist. -- Peter, Ghostbusters /// Bram Moolenaar
          Message 4 of 6 , Feb 22, 2013
          • 0 Attachment
            Roland Eggner wrote:

            > On 2013-02-20 Wednesday at 16:48 +0100 Bram Moolenaar wrote:
            > >
            > > Patch 7.3.826
            > > Problem: List of features in :version output is hard to read.
            > > Solution: Make columns. (Nazri Ramliy)
            > > Files: src/version.c
            >
            > On wide terminals the feature list in :version message is interrupted
            > by empty lines, observed with e.g. COLUMNS20. Bugfix attached.

            Thanks for the fix. The logic is a bit clumsy, there should be a
            simpler way.


            --
            Back off man, I'm a scientist.
            -- Peter, Ghostbusters

            /// Bram Moolenaar -- Bram@... -- 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 ///

            --
            --
            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.
          • Roland Eggner
            ... Problem fixing confirmed. That much shorter is really nice. Combined it with another code shortening and added a comment, new patch attached. -- Regards
            Message 5 of 6 , Feb 22, 2013
            • 0 Attachment
              On 2013-02-22 Friday at 23:21 +0800 Nazri Ramliy wrote:
              > 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:
              > >>
              > >> Patch 7.3.826
              > >> Problem: List of features in :version output is hard to read.
              > >> Solution: Make columns. (Nazri Ramliy)
              > >> Files: src/version.c
              > >
              > > On wide terminals the feature list in :version message is interrupted by empty
              > > lines, observed with e.g. COLUMNS=320. Bugfix attached.
              >
              > A shorter patch, but the fixes the same problem:

              Problem fixing confirmed. That much shorter is really nice. Combined it with
              another code shortening and added a comment, new patch attached.

              --
              Regards
              Roland Eggner

              src/version.c | 13 ++++++-------
              1 files changed, 6 insertions(+), 7 deletions(-)
            Your message has been successfully submitted and would be delivered to recipients shortly.