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

Patch 7.2b.017

Expand Messages
  • Bram Moolenaar
    Patch 7.2b.017 Problem: vim -O foo foo results in only one window. (Zdenek Sekera) Solution: Handle result of ATTENTION prompt properly. (Ian Kelling)
    Message 1 of 1 , Jul 24, 2008
    View Source
    • 0 Attachment
      Patch 7.2b.017
      Problem: "vim -O foo foo" results in only one window. (Zdenek Sekera)
      Solution: Handle result of ATTENTION prompt properly. (Ian Kelling)
      Files: src/main.c


      *** ../vim-7.2b.016/src/main.c Thu Jul 24 13:50:44 2008
      --- src/main.c Thu Jul 24 10:40:56 2008
      ***************
      *** 2529,2535 ****
      int arg_idx; /* index in argument list */
      int i;
      int advance = TRUE;
      - buf_T *old_curbuf;

      # ifdef FEAT_AUTOCMD
      /*
      --- 2529,2534 ----
      ***************
      *** 2582,2602 ****
      curwin->w_arg_idx = arg_idx;
      /* Edit file from arg list, if there is one. When "Quit" selected
      * at the ATTENTION prompt close the window. */
      ! old_curbuf = curbuf;
      (void)do_ecmd(0, arg_idx < GARGCOUNT
      ? alist_name(&GARGLIST[arg_idx]) : NULL,
      NULL, NULL, ECMD_LASTL, ECMD_HIDE);
      ! if (curbuf == old_curbuf)
      {
      if (got_int || only_one_window())
      {
      ! /* abort selected or quit and only one window */
      did_emsg = FALSE; /* avoid hit-enter prompt */
      getout(1);
      }
      win_close(curwin, TRUE);
      advance = FALSE;
      }
      if (arg_idx == GARGCOUNT - 1)
      arg_had_last = TRUE;
      ++arg_idx;
      --- 2581,2606 ----
      curwin->w_arg_idx = arg_idx;
      /* Edit file from arg list, if there is one. When "Quit" selected
      * at the ATTENTION prompt close the window. */
      ! # ifdef HAS_SWAP_EXISTS_ACTION
      ! swap_exists_did_quit = FALSE;
      ! # endif
      (void)do_ecmd(0, arg_idx < GARGCOUNT
      ? alist_name(&GARGLIST[arg_idx]) : NULL,
      NULL, NULL, ECMD_LASTL, ECMD_HIDE);
      ! # ifdef HAS_SWAP_EXISTS_ACTION
      ! if (swap_exists_did_quit)
      {
      + /* abort or quit selected */
      if (got_int || only_one_window())
      {
      ! /* abort selected and only one window */
      did_emsg = FALSE; /* avoid hit-enter prompt */
      getout(1);
      }
      win_close(curwin, TRUE);
      advance = FALSE;
      }
      + # endif
      if (arg_idx == GARGCOUNT - 1)
      arg_had_last = TRUE;
      ++arg_idx;
      *** ../vim-7.2b.016/src/version.c Thu Jul 24 18:44:23 2008
      --- src/version.c Thu Jul 24 19:32:28 2008
      ***************
      *** 678,679 ****
      --- 678,681 ----
      { /* Add new patch number below this line */
      + /**/
      + 17,
      /**/

      --
      "A mouse can be just as dangerous as a bullet or a bomb."
      (US Representative Lamar Smith, R-Texas)

      /// 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 ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.