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

RE: patch 6.2.489

Expand Messages
  • Robert Webb
    ... Understood. ... Thanks for the patch. It works for me. Can it become official? ... I see what you mean in the code. It s not too hard to fix though, so
    Message 1 of 4 , May 2, 2004
    • 0 Attachment
      Bram wrote:

      > > > Patch 6.2.489
      > > > Problem: When accidentally opening a session in Vim which has
      > > > already been opened in another Vim there is a long row of
      > > > ATTENTION prompts. Need to quit each of them to get out.
      > > > Solution: Add the "Abort" alternative to the dialog.
      > >
      > > Patch 6.2.489 doesn't do what I expected. I thought it would exit the
      > > program entirely...
      >
      > A session file is nothing more than a generated Vim script. The "abort"
      > happens somewhere halfway the script, where files are loaded into the
      > windows that have been created. You are left with whatever the script
      > did until that point.
      >
      > You can also ":source" a session, you probably don't want Vim to exit
      > then. It's also possible that most files load just fine, but you abort
      > loading one of the last. You probably also don't want Vim to exit then.

      Understood.

      > A partial solution may be to generate the session file in a slightly
      > different way. I guess the main problem is when all the files are
      > already open somewhere else. Trying to load the first file before
      > creating all the windows and quitting when that first file can't be
      > loaded, something like that.
      >
      > I had a look at the code in makeopens(), but it's not that simple...
      > I made an attempt, see the patch below. I'm not sure this is without
      > problems, changing the sequence of commands in a session script is
      > tricky.

      Thanks for the patch. It works for me. Can it become official?

      > > Finally, a minor point. The order of buttons is:
      > > Open Read-Only, Edit anyway, Recover, Quit, Abort, Delete it
      > >
      > > I think it would make more sense to put them in this order:
      > > Open Read-Only, Edit anyway, Recover, Delete it, Quit, Abort
      >
      > Well, the "Delete it" alternative is optional. Moving it means the
      > returned number depends on the "Delete it" being present or not, makes
      > the code more complicated. I don't think it's worth changing.

      I see what you mean in the code. It's not too hard to fix though, so
      I've attached a patch to do it. I can't test the case where the
      "Delete it" button doesn't appear, which happens inside:
      # if defined(UNIX) || defined(__EMX__) || defined(VMS)
      But it should work. I searched the docs and couldn't find reference to
      these button labels, so presumably no patch required there :-)

      Probably my first patch in more than five years! :-)

      Thanks,
      Rob.

      --

      Robert Webb <RobertW@...>,
      Want to make polyhedra?
      <http://www.software3d.com/Stella.html>
    • Bram Moolenaar
      ... Now that you tested it, yes. ... Looks OK, but it changes a translated string. I ll keep it for later, I find it more important to have the translations
      Message 2 of 4 , May 3, 2004
      • 0 Attachment
        Robert Webb wrote:

        > > A partial solution may be to generate the session file in a slightly
        > > different way. I guess the main problem is when all the files are
        > > already open somewhere else. Trying to load the first file before
        > > creating all the windows and quitting when that first file can't be
        > > loaded, something like that.
        > >
        > > I had a look at the code in makeopens(), but it's not that simple...
        > > I made an attempt, see the patch below. I'm not sure this is without
        > > problems, changing the sequence of commands in a session script is
        > > tricky.
        >
        > Thanks for the patch. It works for me. Can it become official?

        Now that you tested it, yes.

        > > > Finally, a minor point. The order of buttons is:
        > > > Open Read-Only, Edit anyway, Recover, Quit, Abort, Delete it
        > > >
        > > > I think it would make more sense to put them in this order:
        > > > Open Read-Only, Edit anyway, Recover, Delete it, Quit, Abort
        > >
        > > Well, the "Delete it" alternative is optional. Moving it means the
        > > returned number depends on the "Delete it" being present or not, makes
        > > the code more complicated. I don't think it's worth changing.
        >
        > I see what you mean in the code. It's not too hard to fix though, so
        > I've attached a patch to do it. I can't test the case where the
        > "Delete it" button doesn't appear, which happens inside:
        > # if defined(UNIX) || defined(__EMX__) || defined(VMS)
        > But it should work. I searched the docs and couldn't find reference to
        > these button labels, so presumably no patch required there :-)

        Looks OK, but it changes a translated string. I'll keep it for later, I
        find it more important to have the translations than the ordering for
        now.

        > Probably my first patch in more than five years! :-)

        Welcome back! :-)

        --
        From "know your smileys":
        :-& Eating spaghetti

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
      Your message has been successfully submitted and would be delivered to recipients shortly.