• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisión198ea7a9c633089ef2638513d05611a9d1b6e39c (tree)
Tiempo2008-01-02 23:13:10
Autorvimboss
Commitervimboss

Log Message

updated for version 7.1-182

Cambiar Resumen

Diferencia incremental

diff -r e641c7a27c47 -r 198ea7a9c633 src/ex_docmd.c
--- a/src/ex_docmd.c Wed Jan 02 12:59:21 2008 +0000
+++ b/src/ex_docmd.c Wed Jan 02 14:13:10 2008 +0000
@@ -372,7 +372,7 @@
372372 static char_u *arg_all __ARGS((void));
373373 #ifdef FEAT_SESSION
374374 static int makeopens __ARGS((FILE *fd, char_u *dirnow));
375-static int put_view __ARGS((FILE *fd, win_T *wp, int add_edit, unsigned *flagp));
375+static int put_view __ARGS((FILE *fd, win_T *wp, int add_edit, unsigned *flagp, int current_arg_idx));
376376 static void ex_loadview __ARGS((exarg_T *eap));
377377 static char_u *get_view_file __ARGS((int c));
378378 static int did_lcd; /* whether ":lcd" was produced for a session */
@@ -8762,7 +8762,8 @@
87628762 }
87638763 else
87648764 {
8765- failed |= (put_view(fd, curwin, !using_vdir, flagp) == FAIL);
8765+ failed |= (put_view(fd, curwin, !using_vdir, flagp,
8766+ -1) == FAIL);
87668767 }
87678768 if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save")
87688769 == FAIL)
@@ -9761,6 +9762,8 @@
97619762 int tabnr;
97629763 win_T *tab_firstwin;
97639764 frame_T *tab_topframe;
9765+ int cur_arg_idx = 0;
9766+ int next_arg_idx;
97649767
97659768 if (ssop_flags & SSOP_BUFFERS)
97669769 only_save_windows = FALSE; /* Save ALL buffers */
@@ -9976,11 +9979,18 @@
99769979 {
99779980 if (!ses_do_win(wp))
99789981 continue;
9979- if (put_view(fd, wp, wp != edited_win, &ssop_flags) == FAIL)
9982+ if (put_view(fd, wp, wp != edited_win, &ssop_flags,
9983+ cur_arg_idx) == FAIL)
99809984 return FAIL;
99819985 if (nr > 1 && put_line(fd, "wincmd w") == FAIL)
99829986 return FAIL;
9983- }
9987+ next_arg_idx = wp->w_arg_idx;
9988+ }
9989+
9990+ /* The argument index in the first tab page is zero, need to set it in
9991+ * each window. For further tab pages it's the window where we do
9992+ * "tabedit". */
9993+ cur_arg_idx = next_arg_idx;
99849994
99859995 /*
99869996 * Restore cursor to the current window if it's not the first one.
@@ -10190,11 +10200,13 @@
1019010200 * Caller must make sure 'scrolloff' is zero.
1019110201 */
1019210202 static int
10193-put_view(fd, wp, add_edit, flagp)
10203+put_view(fd, wp, add_edit, flagp, current_arg_idx)
1019410204 FILE *fd;
1019510205 win_T *wp;
1019610206 int add_edit; /* add ":edit" command to view */
1019710207 unsigned *flagp; /* vop_flags or ssop_flags */
10208+ int current_arg_idx; /* current argument index of the window, use
10209+ * -1 if unknown */
1019810210 {
1019910211 win_T *save_curwin;
1020010212 int f;
@@ -10224,10 +10236,10 @@
1022410236
1022510237 /* Only when part of a session: restore the argument index. Some
1022610238 * arguments may have been deleted, check if the index is valid. */
10227- if (wp->w_arg_idx != 0 && wp->w_arg_idx <= WARGCOUNT(wp)
10239+ if (wp->w_arg_idx != current_arg_idx && wp->w_arg_idx <= WARGCOUNT(wp)
1022810240 && flagp == &ssop_flags)
1022910241 {
10230- if (fprintf(fd, "%ldnext", (long)wp->w_arg_idx) < 0
10242+ if (fprintf(fd, "%ldargu", (long)wp->w_arg_idx + 1) < 0
1023110243 || put_eol(fd) == FAIL)
1023210244 return FAIL;
1023310245 did_next = TRUE;
diff -r e641c7a27c47 -r 198ea7a9c633 src/version.c
--- a/src/version.c Wed Jan 02 12:59:21 2008 +0000
+++ b/src/version.c Wed Jan 02 14:13:10 2008 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 182,
671+/**/
670672 181,
671673 /**/
672674 180,
Show on old repository browser