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

[patch] E315 error

Expand Messages
  • Lech Lorens
    Attached is a patch fixing E315 error caused by delete ex command not resetting visual selection. Test included. Note that this is related to pressing Escape
    Message 1 of 8 , Oct 26, 2013
    • 0 Attachment
      Attached is a patch fixing E315 error caused by delete ex command not
      resetting visual selection.

      Test included.

      Note that this is related to pressing Escape when in visual mode
      triggering a yank to the clipboard. This means that the problem might
      (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
      that the test file should source unix.vim. Or perhaps check for Vim
      having been compiled with X11 support.

      --
      Lech Lorens

      --
      --
      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. I ll look into it later. -- An indication you must be a manager: You give constructive feedback to your dog. /// Bram Moolenaar --
      Message 2 of 8 , Oct 26, 2013
      • 0 Attachment
        Lech Lorens wrote:

        > Attached is a patch fixing E315 error caused by delete ex command not
        > resetting visual selection.
        >
        > Test included.
        >
        > Note that this is related to pressing Escape when in visual mode
        > triggering a yank to the clipboard. This means that the problem might
        > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
        > that the test file should source unix.vim. Or perhaps check for Vim
        > having been compiled with X11 support.

        Thanks. I'll look into it later.

        --
        An indication you must be a manager:
        You give constructive feedback to your dog.

        /// 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.
      • Bram Moolenaar
        ... I can t seem to reproduce the E315 error. I do see strange errors for normal gv trying to select lines that don t exist. ... Calling end_visual_mode()
        Message 3 of 8 , Nov 7, 2013
        • 0 Attachment
          Lech Lorens wrote:

          > Attached is a patch fixing E315 error caused by delete ex command not
          > resetting visual selection.
          >
          > Test included.
          >
          > Note that this is related to pressing Escape when in visual mode
          > triggering a yank to the clipboard. This means that the problem might
          > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
          > that the test file should source unix.vim. Or perhaps check for Vim
          > having been compiled with X11 support.

          I can't seem to reproduce the E315 error. I do see strange errors for
          "normal gv" trying to select lines that don't exist.

          > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
          > index 24f80fb..1f6fd9b 100644
          > --- a/src/ex_docmd.c
          > +++ b/src/ex_docmd.c
          > @@ -8556,6 +8556,7 @@ ex_operators(eap)
          > beginline(BL_SOL | BL_FIX);
          > }
          >
          > + end_visual_mode();
          > switch (eap->cmdidx)
          > {
          > case CMD_delete:

          Calling end_visual_mode() without Visual mode being active is not right.
          And this should be inside an #ifdef.

          Can you have another look at this Lech?

          --
          (letter from Mark to Mike, about the film's probable certificate)
          For an 'A' we would have to: Lose as many shits as possible; Take Jesus
          Christ out, if possible; Loose "I fart in your general direction"; Lose
          "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
          testicles"
          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

          /// 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.
        • Lech Lorens
          ... What about the attached test? Doesn t it fail for you without the patch and start working after the patch has been applied? ... Yes, now it doesn t look
          Message 4 of 8 , Nov 8, 2013
          • 0 Attachment
            On 08-Nov-2013 Bram Moolenaar <Bram@...> wrote:
            >
            > Lech Lorens wrote:
            >
            > > Attached is a patch fixing E315 error caused by delete ex command not
            > > resetting visual selection.
            > >
            > > Test included.
            > >
            > > Note that this is related to pressing Escape when in visual mode
            > > triggering a yank to the clipboard. This means that the problem might
            > > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
            > > that the test file should source unix.vim. Or perhaps check for Vim
            > > having been compiled with X11 support.
            >
            > I can't seem to reproduce the E315 error. I do see strange errors for
            > "normal gv" trying to select lines that don't exist.

            What about the attached test? Doesn't it fail for you without the patch
            and start working after the patch has been applied?

            > > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
            > > index 24f80fb..1f6fd9b 100644
            > > --- a/src/ex_docmd.c
            > > +++ b/src/ex_docmd.c
            > > @@ -8556,6 +8556,7 @@ ex_operators(eap)
            > > beginline(BL_SOL | BL_FIX);
            > > }
            > >
            > > + end_visual_mode();
            > > switch (eap->cmdidx)
            > > {
            > > case CMD_delete:
            >
            > Calling end_visual_mode() without Visual mode being active is not right.

            Yes, now it doesn't look right any more.

            > And this should be inside an #ifdef.
            >
            > Can you have another look at this Lech?

            Sure. But do you mean anything other than not ending visual mode when
            we're not in visual mode?

            --
            Lech Lorens

            --
            --
            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.
          • Nikolay Pavlov
            ... mean ... Vim may be compiled without visual mode support. You need AFAIR #ifdef FEAT_VISUAL. ... vim_dev group. ... email to
            Message 5 of 8 , Nov 8, 2013
            • 0 Attachment


              On Nov 8, 2013 1:38 PM, "Lech Lorens" <lech.lorens@...> wrote:
              >
              > On 08-Nov-2013 Bram Moolenaar <Bram@...> wrote:
              > >
              > > Lech Lorens wrote:
              > >
              > > > Attached is a patch fixing E315 error caused by delete ex command not
              > > > resetting visual selection.
              > > >
              > > > Test included.
              > > >
              > > > Note that this is related to pressing Escape when in visual mode
              > > > triggering a yank to the clipboard. This means that the problem might
              > > > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
              > > > that the test file should source unix.vim. Or perhaps check for Vim
              > > > having been compiled with X11 support.
              > >
              > > I can't seem to reproduce the E315 error.  I do see strange errors for
              > > "normal gv" trying to select lines that don't exist.
              >
              > What about the attached test? Doesn't it fail for you without the patch
              > and start working after the patch has been applied?
              >
              > > > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
              > > > index 24f80fb..1f6fd9b 100644
              > > > --- a/src/ex_docmd.c
              > > > +++ b/src/ex_docmd.c
              > > > @@ -8556,6 +8556,7 @@ ex_operators(eap)
              > > >     beginline(BL_SOL | BL_FIX);
              > > >      }
              > > >
              > > > +    end_visual_mode();
              > > >      switch (eap->cmdidx)
              > > >      {
              > > >     case CMD_delete:
              > >
              > > Calling end_visual_mode() without Visual mode being active is not right.
              >
              > Yes, now it doesn't look right any more.
              >
              > > And this should be inside an #ifdef.
              > >
              > > Can you have another look at this Lech?
              >
              > Sure. But do you mean anything other than not ending visual mode when
              > we're not in visual mode?

              Vim may be compiled without visual mode support. You need AFAIR #ifdef FEAT_VISUAL.

              > --
              > Lech Lorens
              >
              > --
              > --
              > 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.
            • Bram Moolenaar
              ... I do not get an E315 error but something else. When I select lines in the middle of the buffer there is no error. When I select lines further down I get
              Message 6 of 8 , Nov 8, 2013
              • 0 Attachment
                Lech Lorens wrote:

                > > > Attached is a patch fixing E315 error caused by delete ex command not
                > > > resetting visual selection.
                > > >
                > > > Test included.
                > > >
                > > > Note that this is related to pressing Escape when in visual mode
                > > > triggering a yank to the clipboard. This means that the problem might
                > > > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
                > > > that the test file should source unix.vim. Or perhaps check for Vim
                > > > having been compiled with X11 support.
                > >
                > > I can't seem to reproduce the E315 error. I do see strange errors for
                > > "normal gv" trying to select lines that don't exist.
                >
                > What about the attached test? Doesn't it fail for you without the patch
                > and start working after the patch has been applied?

                I do not get an E315 error but something else. When I select lines in
                the middle of the buffer there is no error. When I select lines further
                down I get "E16: Invalid range: <09>normal gv".
                This indicates the line count is used at the current cursor position,
                which would be understandable. Still wrong but a different error than
                the E315.

                When I comment-out the "'<,'>del" command the Visual selection remains,
                but not with the same end.


                > > > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
                > > > index 24f80fb..1f6fd9b 100644
                > > > --- a/src/ex_docmd.c
                > > > +++ b/src/ex_docmd.c
                > > > @@ -8556,6 +8556,7 @@ ex_operators(eap)
                > > > beginline(BL_SOL | BL_FIX);
                > > > }
                > > >
                > > > + end_visual_mode();
                > > > switch (eap->cmdidx)
                > > > {
                > > > case CMD_delete:
                > >
                > > Calling end_visual_mode() without Visual mode being active is not right.
                >
                > Yes, now it doesn't look right any more.
                >
                > > And this should be inside an #ifdef.
                > >
                > > Can you have another look at this Lech?
                >
                > Sure. But do you mean anything other than not ending visual mode when
                > we're not in visual mode?

                --
                A fool must search for a greater fool to find admiration.

                /// 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.
              • Lech Lorens
                ... Took my time to update the patch. Wonder how it s possible that you are seeing other errors than me. -- Lech Lorens -- -- You received this message from
                Message 7 of 8 , Nov 16, 2013
                • 0 Attachment
                  On 08-Nov-2013 Lech Lorens <lech.lorens@...> wrote:
                  > On 08-Nov-2013 Bram Moolenaar <Bram@...> wrote:
                  > >
                  > > Lech Lorens wrote:
                  > >
                  > > > Attached is a patch fixing E315 error caused by delete ex command not
                  > > > resetting visual selection.
                  > > >
                  > > > Test included.
                  > > >
                  > > > Note that this is related to pressing Escape when in visual mode
                  > > > triggering a yank to the clipboard. This means that the problem might
                  > > > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
                  > > > that the test file should source unix.vim. Or perhaps check for Vim
                  > > > having been compiled with X11 support.
                  > >
                  > > I can't seem to reproduce the E315 error. I do see strange errors for
                  > > "normal gv" trying to select lines that don't exist.
                  >
                  > What about the attached test? Doesn't it fail for you without the patch
                  > and start working after the patch has been applied?
                  >
                  > > > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
                  > > > index 24f80fb..1f6fd9b 100644
                  > > > --- a/src/ex_docmd.c
                  > > > +++ b/src/ex_docmd.c
                  > > > @@ -8556,6 +8556,7 @@ ex_operators(eap)
                  > > > beginline(BL_SOL | BL_FIX);
                  > > > }
                  > > >
                  > > > + end_visual_mode();
                  > > > switch (eap->cmdidx)
                  > > > {
                  > > > case CMD_delete:
                  > >
                  > > Calling end_visual_mode() without Visual mode being active is not right.
                  >
                  > Yes, now it doesn't look right any more.
                  >
                  > > And this should be inside an #ifdef.
                  > >
                  > > Can you have another look at this Lech?
                  >
                  > Sure. But do you mean anything other than not ending visual mode when
                  > we're not in visual mode?

                  Took my time to update the patch.
                  Wonder how it's possible that you are seeing other errors than me.

                  --
                  Lech Lorens

                  --
                  --
                  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. ... I don t know. When I run the test without the patch in ex_docmd.c I do get errors, but not E315. -- ... Ceci n est pas une pipe. /// Bram
                  Message 8 of 8 , Nov 17, 2013
                  • 0 Attachment
                    Lech Lorens wrote:

                    > On 08-Nov-2013 Lech Lorens <lech.lorens@...> wrote:
                    > > On 08-Nov-2013 Bram Moolenaar <Bram@...> wrote:
                    > > >
                    > > > Lech Lorens wrote:
                    > > >
                    > > > > Attached is a patch fixing E315 error caused by delete ex command not
                    > > > > resetting visual selection.
                    > > > >
                    > > > > Test included.
                    > > > >
                    > > > > Note that this is related to pressing Escape when in visual mode
                    > > > > triggering a yank to the clipboard. This means that the problem might
                    > > > > (but I'm not sure) be limited to X11 (so *nix, Cygwin). This might mean
                    > > > > that the test file should source unix.vim. Or perhaps check for Vim
                    > > > > having been compiled with X11 support.
                    > > >
                    > > > I can't seem to reproduce the E315 error. I do see strange errors for
                    > > > "normal gv" trying to select lines that don't exist.
                    > >
                    > > What about the attached test? Doesn't it fail for you without the patch
                    > > and start working after the patch has been applied?
                    > >
                    > > > > diff --git a/src/ex_docmd.c b/src/ex_docmd.c
                    > > > > index 24f80fb..1f6fd9b 100644
                    > > > > --- a/src/ex_docmd.c
                    > > > > +++ b/src/ex_docmd.c
                    > > > > @@ -8556,6 +8556,7 @@ ex_operators(eap)
                    > > > > beginline(BL_SOL | BL_FIX);
                    > > > > }
                    > > > >
                    > > > > + end_visual_mode();
                    > > > > switch (eap->cmdidx)
                    > > > > {
                    > > > > case CMD_delete:
                    > > >
                    > > > Calling end_visual_mode() without Visual mode being active is not right.
                    > >
                    > > Yes, now it doesn't look right any more.
                    > >
                    > > > And this should be inside an #ifdef.
                    > > >
                    > > > Can you have another look at this Lech?
                    > >
                    > > Sure. But do you mean anything other than not ending visual mode when
                    > > we're not in visual mode?
                    >
                    > Took my time to update the patch.

                    Thanks.

                    > Wonder how it's possible that you are seeing other errors than me.

                    I don't know. When I run the test without the patch in ex_docmd.c I do
                    get errors, but not E315.


                    --
                    |

                    Ceci n'est pas une pipe.

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