- Patchlevel 162

This commit is contained in:
Karsten Hopp 2006-11-10 14:09:54 +00:00
parent 34e46858c7
commit c4ab21852f
3 changed files with 217 additions and 1 deletions

200
7.0.162 Normal file
View File

@ -0,0 +1,200 @@
To: vim-dev@vim.org
Subject: Patch 7.0.162
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 7.0.162
Problem: "vim -o a b" when file "a" triggers the ATTENTION dialog,
selecting "Quit" exits Vim instead of editing "b" only.
When file "b" triggers the ATTENTION dialog selecting "Quit" or
"Abort" results in editing file "a" in that window.
Solution: When selecting "Abort" exit Vim. When selecting "Quit" close the
window. Also avoid hit-enter prompt when selecting Abort.
Files: src/buffer.c, src/main.c
*** ../vim-7.0.161/src/buffer.c Fri Oct 20 20:15:05 2006
--- src/buffer.c Tue Nov 7 21:08:02 2006
***************
*** 4220,4226 ****
/* Use the name from the associated buffer if it exists. */
bp = buflist_findnr(aep->ae_fnum);
! if (bp == NULL)
return aep->ae_fname;
return bp->b_fname;
}
--- 4222,4228 ----
/* Use the name from the associated buffer if it exists. */
bp = buflist_findnr(aep->ae_fnum);
! if (bp == NULL || bp->b_fname == NULL)
return aep->ae_fname;
return bp->b_fname;
}
*** ../vim-7.0.161/src/main.c Tue Sep 5 12:57:14 2006
--- src/main.c Tue Nov 7 22:35:49 2006
***************
*** 2392,2398 ****
(void)open_buffer(FALSE, NULL); /* create memfile, read file */
#if defined(HAS_SWAP_EXISTS_ACTION)
! check_swap_exists_action();
#endif
#ifdef FEAT_AUTOCMD
dorewind = TRUE; /* start again */
--- 2392,2414 ----
(void)open_buffer(FALSE, NULL); /* create memfile, read file */
#if defined(HAS_SWAP_EXISTS_ACTION)
! if (swap_exists_action == SEA_QUIT)
! {
! if (got_int || only_one_window())
! {
! /* abort selected or quit and only one window */
! did_emsg = FALSE; /* avoid hit-enter prompt */
! getout(1);
! }
! /* We can't close the window, it would disturb what
! * happens next. Clear the file name and set the arg
! * index to -1 to delete it later. */
! setfname(curbuf, NULL, NULL, FALSE);
! curwin->w_arg_idx = -1;
! swap_exists_action = SEA_NONE;
! }
! else
! handle_swap_exists(NULL);
#endif
#ifdef FEAT_AUTOCMD
dorewind = TRUE; /* start again */
***************
*** 2432,2437 ****
--- 2448,2455 ----
{
int arg_idx; /* index in argument list */
int i;
+ int advance = TRUE;
+ buf_T *old_curbuf;
# ifdef FEAT_AUTOCMD
/*
***************
*** 2440,2470 ****
++autocmd_no_enter;
++autocmd_no_leave;
# endif
arg_idx = 1;
for (i = 1; i < parmp->window_count; ++i)
{
! if (parmp->window_layout == WIN_TABS)
{
! if (curtab->tp_next == NULL) /* just checking */
! break;
! goto_tabpage(0);
}
! else
{
! if (curwin->w_next == NULL) /* just checking */
! break;
! win_enter(curwin->w_next, FALSE);
}
/* Only open the file if there is no file in this window yet (that can
! * happen when .vimrc contains ":sall") */
if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL)
{
curwin->w_arg_idx = arg_idx;
! /* edit file from arg list, if there is one */
(void)do_ecmd(0, arg_idx < GARGCOUNT
? alist_name(&GARGLIST[arg_idx]) : NULL,
NULL, NULL, ECMD_LASTL, ECMD_HIDE);
if (arg_idx == GARGCOUNT - 1)
arg_had_last = TRUE;
++arg_idx;
--- 2458,2522 ----
++autocmd_no_enter;
++autocmd_no_leave;
# endif
+
+ /* When w_arg_idx is -1 remove the window (see create_windows()). */
+ if (curwin->w_arg_idx == -1)
+ {
+ win_close(curwin, TRUE);
+ advance = FALSE;
+ }
+
arg_idx = 1;
for (i = 1; i < parmp->window_count; ++i)
{
! /* When w_arg_idx is -1 remove the window (see create_windows()). */
! if (curwin->w_arg_idx == -1)
{
! ++arg_idx;
! win_close(curwin, TRUE);
! advance = FALSE;
! continue;
}
!
! if (advance)
{
! if (parmp->window_layout == WIN_TABS)
! {
! if (curtab->tp_next == NULL) /* just checking */
! break;
! goto_tabpage(0);
! }
! else
! {
! if (curwin->w_next == NULL) /* just checking */
! break;
! win_enter(curwin->w_next, FALSE);
! }
}
+ advance = TRUE;
/* Only open the file if there is no file in this window yet (that can
! * happen when .vimrc contains ":sall"). */
if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL)
{
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;
*** ../vim-7.0.161/src/version.c Tue Nov 7 19:05:36 2006
--- src/version.c Tue Nov 7 21:21:28 2006
***************
*** 668,669 ****
--- 668,671 ----
{ /* Add new patch number below this line */
+ /**/
+ 162,
/**/
--
The CIA drives around in cars with the "Intel inside" logo.
/// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///

View File

@ -188,3 +188,7 @@ Individual patches for Vim 7.0:
21499 7.0.156 (extra) Vim doesn't compile on Amiga OS4
3594 7.0.157 profiling info was bogus for a recursively called function
1485 7.0.158 cursor in closed fold after adding new line
2455 7.0.159 not enough information for an I/O error in the swap file
9446 7.0.160 ":@a" echoes the command
6639 7.0.161 (extra) Win32: window and tabline menu may use wrong encoding
5819 7.0.162 doesn't exit with "vim -o a b" and abort at ATTENTION prompt

View File

@ -16,7 +16,7 @@
#used for pre-releases:
%define beta %{nil}
%define vimdir vim70%{?beta}
%define patchlevel 158
%define patchlevel 162
Summary: The VIM editor.
Name: vim
@ -209,6 +209,10 @@ Patch155: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.155
Patch156: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.156
Patch157: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.157
Patch158: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.158
Patch159: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.159
Patch160: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.160
Patch161: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.161
Patch162: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.162
Patch3000: vim-7.0-syntax.patch
@ -530,6 +534,11 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
#patch156 -p0
%patch157 -p0
%patch158 -p0
%patch159 -p0
%patch160 -p0
# Win32:
#patch161 -p0
%patch162 -p0
# install spell files
%if %{withvimspell}
@ -918,6 +927,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/*/apps/*
%changelog
* Fri Nov 10 2006 Karsten Hopp <karsten@redhat.com> 7.0.162-1
- patchlevel 162
* Mon Nov 06 2006 Karsten Hopp <karsten@redhat.com> 7.0.158-1
- patchlevel 158