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

Bug: windo and exceptions

Expand Messages
  • Andy Wokula
    GVim runs into an endless loop if I do the following: clean startup ... Error detected while processing : E605: Exception not caught: foo E605: Exception not
    Message 1 of 3 , May 2, 2007
    • 0 Attachment
      GVim runs into an endless loop if I do the following:

      " clean startup
      :new " at least two windows
      :windo throw "foo"

      Error detected while processing :
      E605: Exception not caught: foo
      E605: Exception not caught: foo
      E605: Exception not caught: foo
      E605: Exception not caught: foo
      ...

      Another example:

      " clean startup
      :set modified
      :bot new
      :try
      : windo enew

      " -> go and kill GVim in the task manager

      (does not happen if :bot new is replaced by :abo new )

      --
      Regards,
      Andy

      EOM
    • Bram Moolenaar
      ... See patch below. ... Solved with the same patch. Please verify. ... *************** ... if (!win_valid(wp)) break; win_goto(wp); + if (curwin != wp) +
      Message 2 of 3 , May 2, 2007
      • 0 Attachment
        Andy Wokula wrote:

        > GVim runs into an endless loop if I do the following:
        >
        > " clean startup
        > :new " at least two windows
        > :windo throw "foo"
        >
        > Error detected while processing :
        > E605: Exception not caught: foo
        > E605: Exception not caught: foo
        > E605: Exception not caught: foo
        > E605: Exception not caught: foo
        > ...

        See patch below.

        > Another example:
        >
        > " clean startup
        > :set modified
        > :bot new
        > :try
        > : windo enew
        >
        > " -> go and kill GVim in the task manager
        >
        > (does not happen if :bot new is replaced by :abo new )

        Solved with the same patch. Please verify.


        *** ../vim-7.0.240/src/ex_cmds2.c Tue Feb 13 06:21:24 2007
        --- src/ex_cmds2.c Wed May 2 22:04:38 2007
        ***************
        *** 2287,2292 ****
        --- 2287,2294 ----
        if (!win_valid(wp))
        break;
        win_goto(wp);
        + if (curwin != wp)
        + break; /* something must be wrong */
        wp = curwin->w_next;
        }
        else if (eap->cmdidx == CMD_tabdo)


        --
        The 50-50-90 rule: Anytime you have a 50-50 chance of getting
        something right, there's a 90% probability you'll get it wrong.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
      • Andy Wokula
        ... Great, the patch works (examples tested). -- Thanks, Andy EOM
        Message 3 of 3 , May 2, 2007
        • 0 Attachment
          Bram Moolenaar schrieb:
          > Andy Wokula wrote:
          >
          >> GVim runs into an endless loop if I do the following:
          >>
          >> " clean startup
          >> :new " at least two windows
          >> :windo throw "foo"
          >>
          >> Error detected while processing :
          >> E605: Exception not caught: foo
          >> E605: Exception not caught: foo
          >> E605: Exception not caught: foo
          >> E605: Exception not caught: foo
          >> ...
          >
          > See patch below.
          >
          >> Another example:
          >>
          >> " clean startup
          >> :set modified
          >> :bot new
          >> :try
          >> : windo enew
          >>
          >> " -> go and kill GVim in the task manager
          >>
          >> (does not happen if :bot new is replaced by :abo new )
          >
          > Solved with the same patch. Please verify.
          >
          >
          > *** ../vim-7.0.240/src/ex_cmds2.c Tue Feb 13 06:21:24 2007
          > --- src/ex_cmds2.c Wed May 2 22:04:38 2007
          > ***************
          > *** 2287,2292 ****
          > --- 2287,2294 ----
          > if (!win_valid(wp))
          > break;
          > win_goto(wp);
          > + if (curwin != wp)
          > + break; /* something must be wrong */
          > wp = curwin->w_next;
          > }
          > else if (eap->cmdidx == CMD_tabdo)

          Great, the patch works (examples tested).

          --
          Thanks,
          Andy

          EOM
        Your message has been successfully submitted and would be delivered to recipients shortly.