forked from aniani/vim
Fix that :mksession may generate "2argu" even though there is no such
argument. (Peter Odding)
This commit is contained in:
@@ -10430,7 +10430,7 @@ put_view(fd, wp, add_edit, flagp, current_arg_idx)
|
||||
|
||||
/* Only when part of a session: restore the argument index. Some
|
||||
* arguments may have been deleted, check if the index is valid. */
|
||||
if (wp->w_arg_idx != current_arg_idx && wp->w_arg_idx <= WARGCOUNT(wp)
|
||||
if (wp->w_arg_idx != current_arg_idx && wp->w_arg_idx < WARGCOUNT(wp)
|
||||
&& flagp == &ssop_flags)
|
||||
{
|
||||
if (fprintf(fd, "%ldargu", (long)wp->w_arg_idx + 1) < 0
|
||||
|
Reference in New Issue
Block a user