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

Re: [BUG] Signs column is not displayed for diff filler lines

Expand Messages
  • Bram Moolenaar
    ... The diff filler means that this line doesn t exist in that buffer. There can t possibly be a sign there, so why do you expect the sign column to show up
    Message 1 of 7 , Jun 4, 2011
    • 0 Attachment
      ZyX wrote:

      > Consider the following script:
      > cat > missing-signcolumn.vim << EOF
      > call setline('.', ['abc', 'def', 'ghi'])
      > diffthis
      > vnew
      > call setline('.', ['abc', 'ghi'])
      > sign define xxx text=EE
      > sign place 1 line=1 name=xxx buffer=2
      > diffthis
      > EOF
      > vim -u NONE -S missing-signcolumn.vim
      > It produces the following result:
      > http://img-fotki.yandex.ru/get/5608/kp-pav.1/0_69590_4e0c4429_orig.png.
      > Here you can see that diff filler line is missing signs column line.

      The diff filler means that this line doesn't exist in that buffer.
      There can't possibly be a sign there, so why do you expect the sign
      column to show up there?

      Perhaps a bigger screenshot shows it more clearly.

      --
      Amazing but true: If all the salmon caught in Canada in one year were laid
      end to end across the Sahara Desert, the smell would be absolutely awful.

      /// 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
    • ZyX
      Reply to message «Re: [BUG] Signs column is not displayed for diff filler lines», sent 23:17:51 05 June 2011, Sunday ... Just for the same reason why I see
      Message 2 of 7 , Jun 4, 2011
      • 0 Attachment
        Reply to message «Re: [BUG] Signs column is not displayed for diff filler
        lines»,
        sent 23:17:51 05 June 2011, Sunday
        by Bram Moolenaar:

        > The diff filler means that this line doesn't exist in that buffer.
        > There can't possibly be a sign there, so why do you expect the sign
        > column to show up there?
        Just for the same reason why I see number column there (though with no numbers).
        I think my screen shot is clear enough: here is
        FFSStext
        FF------
        FFSStext
        (F is fold column, S is sign column)
        If I enabled numbers it would be more clear:
        FFSSNNN text
        FF ------
        FFSSNNN text
        which I guess is really
        FFSSNNN text
        FFnnn ------
        FFSSNNN text
        (where N is a digit and `n' is a space in place of absent digit).

        Here is screenshot with numbers enabled:
        http://img-fotki.yandex.ru/get/4705/kp-pav.1/0_695a2_66d73e36_orig.png

        Original message:
        > ZyX wrote:
        > > Consider the following script:
        > > cat > missing-signcolumn.vim << EOF
        > > call setline('.', ['abc', 'def', 'ghi'])
        > > diffthis
        > > vnew
        > > call setline('.', ['abc', 'ghi'])
        > > sign define xxx text=EE
        > > sign place 1 line=1 name=xxx buffer=2
        > > diffthis
        > > EOF
        > > vim -u NONE -S missing-signcolumn.vim
        > >
        > > It produces the following result:
        > > http://img-fotki.yandex.ru/get/5608/kp-pav.1/0_69590_4e0c4429_orig.png.
        > > Here you can see that diff filler line is missing signs column line.
        >
        > The diff filler means that this line doesn't exist in that buffer.
        > There can't possibly be a sign there, so why do you expect the sign
        > column to show up there?
        >
        > Perhaps a bigger screenshot shows it more clearly.
      • Bram Moolenaar
        ... Yeah, that doesn t look right. -- hundred-and-one symptoms of being an internet addict: 138. You develop a liking for cold coffee. /// Bram Moolenaar --
        Message 3 of 7 , Jun 5, 2011
        • 0 Attachment
          ZyX wrote:

          > > The diff filler means that this line doesn't exist in that buffer.
          > > There can't possibly be a sign there, so why do you expect the sign
          > > column to show up there?
          > Just for the same reason why I see number column there (though with no numbers).
          > I think my screen shot is clear enough: here is
          > FFSStext
          > FF------
          > FFSStext
          > (F is fold column, S is sign column)
          > If I enabled numbers it would be more clear:
          > FFSSNNN text
          > FF ------
          > FFSSNNN text
          > which I guess is really
          > FFSSNNN text
          > FFnnn ------
          > FFSSNNN text
          > (where N is a digit and `n' is a space in place of absent digit).
          >
          > Here is screenshot with numbers enabled:
          > http://img-fotki.yandex.ru/get/4705/kp-pav.1/0_695a2_66d73e36_orig.png

          Yeah, that doesn't look right.

          --
          hundred-and-one symptoms of being an internet addict:
          138. You develop a liking for cold coffee.

          /// 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
        • Christian Brabandt
          Hi Bram! ... I think, this patch fixes it: diff --git a/src/screen.c b/src/screen.c ... +++ b/src/screen.c @@ -3399,11 +3399,7 @@ draw_state = WL_SIGN; /* Show
          Message 4 of 7 , Jun 5, 2011
          • 0 Attachment
            Hi Bram!

            On So, 05 Jun 2011, Bram Moolenaar wrote:

            >
            > ZyX wrote:
            >
            > > > The diff filler means that this line doesn't exist in that buffer.
            > > > There can't possibly be a sign there, so why do you expect the sign
            > > > column to show up there?
            > > Just for the same reason why I see number column there (though with no numbers).
            > > I think my screen shot is clear enough: here is
            > > FFSStext
            > > FF------
            > > FFSStext
            > > (F is fold column, S is sign column)
            > > If I enabled numbers it would be more clear:
            > > FFSSNNN text
            > > FF ------
            > > FFSSNNN text
            > > which I guess is really
            > > FFSSNNN text
            > > FFnnn ------
            > > FFSSNNN text
            > > (where N is a digit and `n' is a space in place of absent digit).
            > >
            > > Here is screenshot with numbers enabled:
            > > http://img-fotki.yandex.ru/get/4705/kp-pav.1/0_695a2_66d73e36_orig.png
            >
            > Yeah, that doesn't look right.

            I think, this patch fixes it:

            diff --git a/src/screen.c b/src/screen.c
            --- a/src/screen.c
            +++ b/src/screen.c
            @@ -3399,11 +3399,7 @@
            draw_state = WL_SIGN;
            /* Show the sign column when there are any signs in this
            * buffer or when using Netbeans. */
            - if (draw_signcolumn(wp)
            -# ifdef FEAT_DIFF
            - && filler_todo <= 0
            -# endif
            - )
            + if (draw_signcolumn(wp))
            {
            int text_sign;
            # ifdef FEAT_SIGN_ICONS



            regards,
            Christian

            --
            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
          • ZyX
            Reply to message «Re: [BUG] Signs column is not displayed for diff filler lines», sent 16:38:11 05 June 2011, Sunday by Christian Brabandt: No, it introduces
            Message 5 of 7 , Jun 5, 2011
            • 0 Attachment
              Reply to message «Re: [BUG] Signs column is not displayed for diff filler
              lines»,
              sent 16:38:11 05 June 2011, Sunday
              by Christian Brabandt:

              No, it introduces another problem: sign now migrates to first filler line while
              it should only be shown for actually present line.
              I noticed another related problem: if difffiller is present, sign in the line
              below filler does not show at all though line itself is highlighted.

              Original message:
              > Hi Bram!
              >
              > On So, 05 Jun 2011, Bram Moolenaar wrote:
              > > ZyX wrote:
              > > > > The diff filler means that this line doesn't exist in that buffer.
              > > > > There can't possibly be a sign there, so why do you expect the sign
              > > > > column to show up there?
              > > >
              > > > Just for the same reason why I see number column there (though with no
              > > > numbers). I think my screen shot is clear enough: here is
              > > >
              > > > FFSStext
              > > > FF------
              > > > FFSStext
              > > >
              > > > (F is fold column, S is sign column)
              > > >
              > > > If I enabled numbers it would be more clear:
              > > > FFSSNNN text
              > > > FF ------
              > > > FFSSNNN text
              > > >
              > > > which I guess is really
              > > >
              > > > FFSSNNN text
              > > > FFnnn ------
              > > > FFSSNNN text
              > > >
              > > > (where N is a digit and `n' is a space in place of absent digit).
              > > >
              > > > Here is screenshot with numbers enabled:
              > > > http://img-fotki.yandex.ru/get/4705/kp-pav.1/0_695a2_66d73e36_orig.png
              > >
              > > Yeah, that doesn't look right.
              >
              > I think, this patch fixes it:
              >
              > diff --git a/src/screen.c b/src/screen.c
              > --- a/src/screen.c
              > +++ b/src/screen.c
              > @@ -3399,11 +3399,7 @@
              > draw_state = WL_SIGN;
              > /* Show the sign column when there are any signs in this
              > * buffer or when using Netbeans. */
              > - if (draw_signcolumn(wp)
              > -# ifdef FEAT_DIFF
              > - && filler_todo <= 0
              > -# endif
              > - )
              > + if (draw_signcolumn(wp))
              > {
              > int text_sign;
              > # ifdef FEAT_SIGN_ICONS
              >
              >
              >
              > regards,
              > Christian
            • Bram Moolenaar
              ... Thanks, I ll check it out later. I hope it doesn t introduce a new problem. -- I wish there was a knob on the TV to turn up the intelligence. There s a
              Message 6 of 7 , Jun 5, 2011
              • 0 Attachment
                Christian Brabandt wrote:

                > On So, 05 Jun 2011, Bram Moolenaar wrote:
                > >
                > > ZyX wrote:
                > >
                > > > > The diff filler means that this line doesn't exist in that buffer.
                > > > > There can't possibly be a sign there, so why do you expect the sign
                > > > > column to show up there?
                > > > Just for the same reason why I see number column there (though with no numbers).
                > > > I think my screen shot is clear enough: here is
                > > > FFSStext
                > > > FF------
                > > > FFSStext
                > > > (F is fold column, S is sign column)
                > > > If I enabled numbers it would be more clear:
                > > > FFSSNNN text
                > > > FF ------
                > > > FFSSNNN text
                > > > which I guess is really
                > > > FFSSNNN text
                > > > FFnnn ------
                > > > FFSSNNN text
                > > > (where N is a digit and `n' is a space in place of absent digit).
                > > >
                > > > Here is screenshot with numbers enabled:
                > > > http://img-fotki.yandex.ru/get/4705/kp-pav.1/0_695a2_66d73e36_orig.png
                > >
                > > Yeah, that doesn't look right.
                >
                > I think, this patch fixes it:

                Thanks, I'll check it out later. I hope it doesn't introduce a new
                problem.

                --
                I wish there was a knob on the TV to turn up the intelligence.
                There's a knob called "brightness", but it doesn't seem to work.

                /// 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
              Your message has been successfully submitted and would be delivered to recipients shortly.