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

Re: Patch 7.3.859

Expand Messages
  • Bram Moolenaar
    ... The intro message disappearing because Vim is doing something is not all that bad. The intro message should not get in the say of anything. For me it
    Message 1 of 14 , Mar 20, 2013
    • 0 Attachment
      Gary Johnson wrote:

      > On 2013-03-16, Bram Moolenaar wrote:
      > > Hayaki Saito wrote:
      > >
      > > > Hi, Bram
      > > > I wrote a quick fix patch for this.
      > > > I guess this patch does not fix the fundamental problem.
      > > > In $TERM=ansi environment, the incomplete sequence "ESC [" seems to be > > registered at termcode map.
      > >
      > > Thanks for the fix, I'll include it.
      > >
      > > Hopefully you can think of a way to make this more robust.
      >
      > I discovered another problem with patch 7.3.859: when the
      > CursorHold event is triggered shortly after startup, the intro
      > message disappears.
      >
      > To demonstrate this, start vim like this:
      >
      > vim -N -u NONE --cmd 'autocmd CursorHold * if 0 | endif'
      >
      > In four seconds ('updatetime') the intro message will disappear.
      >
      > The "if 0 | endif" is just a command I chose that would have no
      > effect on the intro message by itself.
      >
      > I noticed this behavior when I updated one of my vim installations
      > from 7.3.646 to the latest, 7.3.874, to test Christian Brabandt's
      > cedit patch. Shortly after starting the new version, the intro
      > message disappeared. I tracked the problem down to the CursorHold
      > autocommand in one of my plugins, but I've been using that plugin
      > for years without this behavior. I then used the hg bisect command
      > to determine the patch that introduced the behavior.
      >
      > $ hg bisect -g
      > The first bad revision is:
      > changeset: 4215:ecf21be84def
      > tag: v7-3-859
      > user: Bram Moolenaar <bram@...>
      > date: Wed Mar 13 19:29:28 2013 +0100
      > summary: updated for version 7.3.859
      >
      > I looked briefly at the changeset (hg diff -c 4215) but nothing
      > jumped out at me as being the cause.

      The intro message disappearing because Vim is doing something is not all
      that bad. The intro message should not get in the say of anything.
      For me it often isn't there because of the termresponse changing the
      number of colors, which triggers a redraw.

      Anyway, if you do find a way to keep the intro message, that's nice.

      --
      hundred-and-one symptoms of being an internet addict:
      87. Everyone you know asks why your phone line is always busy ...and
      you tell them to send an e-mail.

      /// 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.
    • Christian Brabandt
      Hi Hayaki! ... I also saw this problem. But it isn t really reproducable (at least not when running under gdb or valgrind or under tmux.) I just noticed, that
      Message 2 of 14 , Mar 20, 2013
      • 0 Attachment
        Hi Hayaki!

        On Mi, 20 Mär 2013, Hayaki Saito wrote:

        > > To demonstrate this, start vim like this:
        > >
        > > vim -N -u NONE --cmd 'autocmd CursorHold * if 0 | endif'
        > >
        > > In four seconds ('updatetime') the intro message will disappear.
        >
        > Thanks for your report.
        > I also reproduced this problem.

        I also saw this problem. But it isn't really reproducable (at least not
        when running under gdb or valgrind or under tmux.) I just noticed, that
        resetting must_redraw didn't work for any reason, it seems to stay at a
        value of CLEAR so after the cursorhold autocommand fires, this triggers
        a redraw.

        > This patch may fix it.

        Unless I am missing something, this prevents the cursorhold command to
        be triggered after startup. I am not sure, this is right.

        Mit freundlichen Grüßen
        Christian
        --
        Alle Menschen haben die Anlage, schöpferisch tätig zu sein. Nur merken
        es die meisten nie.
        -- Truman Capote

        --
        --
        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.
      • Christian Brabandt
        Hi Bram! ... There is another problem with this patch: term.c: In function check_termcode : term.c:4137:13: warning: declaration of p shadows a previous
        Message 3 of 14 , Mar 20, 2013
        • 0 Attachment
          Hi Bram!

          On Mi, 13 Mär 2013, Bram Moolenaar wrote:

          >
          > Patch 7.3.859
          > Problem: 'ambiwidth' must be set by the user.
          > Solution: Detects East Asian ambiguous width (UAX #11) state of the terminal
          > at the start-up time and 'ambiwidth' accordingly. (Hayaki Saito)
          > Files: src/main.c, src/option.c, src/term.c, src/term.h,
          > src/proto/term.pro

          There is another problem with this patch:

          term.c: In function 'check_termcode':
          term.c:4137:13: warning: declaration of 'p' shadows a previous local [-Wshadow]
          term.c:3875:13: warning: shadowed declaration is here [-Wshadow]


          diff --git a/src/term.c b/src/term.c
          --- a/src/term.c
          +++ b/src/term.c
          @@ -4134,15 +4134,15 @@
          /* eat it when it has 2 arguments and ends in 'R' */
          if (j == 1 && tp[i] == 'R')
          {
          - char *p = NULL;
          + char *q = NULL;

          u7_status = U7_GOT;
          if (extra == 2)
          - p = "single";
          + q = "single";
          else if (extra == 3)
          - p = "double";
          - if (p != NULL)
          - set_option_value((char_u *)"ambw", 0L, (char_u *)p, 0);
          + q = "double";
          + if (q != NULL)
          + set_option_value((char_u *)"ambw", 0L, (char_u *)q, 0);
          key_name[0] = (int)KS_EXTRA;
          key_name[1] = (int)KE_IGNORE;
          slen = i + 1;


          Mit freundlichen Grüßen
          Christian
          --
          Ißt der Bauer Stoppelrüben, kommt die Blähung dann in Schüben.

          --
          --
          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! Somehow my compiler didn t complain. -- ... /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net /// sponsor Vim,
          Message 4 of 14 , Mar 20, 2013
          • 0 Attachment
            Christian Brabandt wrote:

            > Hi Bram!
            >
            > On Mi, 13 Mär 2013, Bram Moolenaar wrote:
            >
            > >
            > > Patch 7.3.859
            > > Problem: 'ambiwidth' must be set by the user.
            > > Solution: Detects East Asian ambiguous width (UAX #11) state of the terminal
            > > at the start-up time and 'ambiwidth' accordingly. (Hayaki Saito)
            > > Files: src/main.c, src/option.c, src/term.c, src/term.h,
            > > src/proto/term.pro
            >
            > There is another problem with this patch:
            >
            > term.c: In function 'check_termcode':
            > term.c:4137:13: warning: declaration of 'p' shadows a previous local [-Wshadow]
            > term.c:3875:13: warning: shadowed declaration is here [-Wshadow]

            Thanks! Somehow my compiler didn't complain.

            --
            From "know your smileys":
            :~) A man with a tape recorder up his nose

            /// 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.
          • Tony Mechelynck
            On 20/03/13 21:23, Bram Moolenaar wrote: [...] ... I m attaching a small global plugin which I wrote in 2009 for just that purpose. Its name intentionally
            Message 5 of 14 , Mar 21, 2013
            • 0 Attachment
              On 20/03/13 21:23, Bram Moolenaar wrote:
              [...]
              > Anyway, if you do find a way to keep the intro message, that's nice.
              >

              I'm attaching a small global plugin which I wrote in 2009 for just that
              purpose. Its name intentionally starts with zz in the hope that it will
              run last; for that same reason it should be dropped in your user's
              after-plugin directory: ~/.vim/after/plugin/ on *x, or
              ~/vimfiles/after/plugin/ on M$W.

              I've tried to make that plugin as general as I could, and compatible
              even with obsolete or feature-poor versions of Vim (e.g., if used in a
              version so old that the :intro command wasn't even defined, it should
              just do nothing.) I don't guarantee that it is perfect. If you can make
              it better, go ahead.


              Best regards,
              Tony.
              --
              A remarkable race are the Persians;
              They have such peculiar diversions.
              They make love the whole day
              In the usual way
              And save up the nights for perversions.

              --
              --
              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.
            • Hayaki Saito
              Hi, Bram ... I guess it is necessary to do so. In my environment, did_cursorhold was FALSE when setting crv_status to CRV_GOT. Regards, Hayaki Saito ... -- --
              Message 6 of 14 , Mar 24, 2013
              • 0 Attachment
                Hi, Bram

                > Do we also need this when setting crv_status to CRV_GOT?

                I guess it is necessary to do so.
                In my environment, did_cursorhold was FALSE when setting crv_status to CRV_GOT.

                Regards,
                Hayaki Saito

                On 2013/03/21, at 5:23, Bram Moolenaar wrote:

                >
                > Hayaki Saito wrote:
                >
                >>> To demonstrate this, start vim like this:
                >>>
                >>> vim -N -u NONE --cmd 'autocmd CursorHold * if 0 | endif'
                >>>
                >>> In four seconds ('updatetime') the intro message will disappear.
                >>
                >> Thanks for your report.
                >> I also reproduced this problem. This patch may fix it.
                >
                > Thanks.
                >
                > Do we also need this when setting crv_status to CRV_GOT?
                >
                >
                > --
                >> From "know your smileys":
                > :^[/ mean-smiley-with-cigarette
                >
                > /// 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.
                >

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