To: vim-dev@vim.org Subject: Patch 6.3b.013 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3b.013 Problem: Loading a session file results in editing the wrong file in the first window when this is not the file at the current position in the argument list. (Robert Webb) Solution: Check w_arg_idx_invalid to decide whether to edit a file. Files: src/ex_docmd.c *** ../vim-6.3b.012/src/ex_docmd.c Fri May 28 21:41:20 2004 --- src/ex_docmd.c Sun May 30 20:23:31 2004 *************** *** 8678,8684 **** if (fputs("edit ", fd) < 0 || ses_fname(fd, wp->w_buffer, &ssop_flags) == FAIL) return FAIL; ! edited_win = wp; break; } } --- 8678,8685 ---- if (fputs("edit ", fd) < 0 || ses_fname(fd, wp->w_buffer, &ssop_flags) == FAIL) return FAIL; ! if (!wp->w_arg_idx_invalid) ! edited_win = wp; break; } } *************** *** 8959,8965 **** return FAIL; } ! if (add_edit) { /* * Load the file. --- 8960,8968 ---- return FAIL; } ! /* Edit the file. Skip this when ":next" already did it. */ ! if (add_edit && (wp->w_arg_idx == 0 || flagp != &ssop_flags ! || wp->w_arg_idx_invalid)) { /* * Load the file. *** ../vim-6.3b.012/src/version.c Sun May 30 20:05:11 2004 --- src/version.c Sun May 30 20:19:32 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 13, /**/ -- hundred-and-one symptoms of being an internet addict: 3. Your bookmark takes 15 minutes to scroll from top to bottom. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///