To: vim-dev@vim.org Subject: Patch 6.2.170 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.170 Problem: When using Sun WorkShop the current directory isn't changed to where the file is. Solution: Set the 'autochdir' option when using WorkShop. And avoid using the basename when 'autochdir' is not set. Files: src/gui_x11.c, src/ex_cmds.c *** ../vim-6.2.169/src/gui_x11.c Sun Jul 27 14:16:53 2003 --- src/gui_x11.c Wed Dec 24 14:25:10 2003 *************** *** 1223,1228 **** --- 1223,1229 ---- if (strcmp("-ws", argv[arg]) == 0) { usingSunWorkShop++; + p_acd = TRUE; gui.dofork = FALSE; /* don't fork() when starting GUI */ mch_memmove(&argv[arg], &argv[arg + 1], (--*argc - arg) * sizeof(char *)); *** ../vim-6.2.169/src/ex_cmds.c Sun Nov 9 20:23:26 2003 --- src/ex_cmds.c Wed Dec 24 14:31:16 2003 *************** *** 2615,2621 **** ffname = free_fname; other_file = otherfile(ffname); #ifdef FEAT_SUN_WORKSHOP ! if (usingSunWorkShop && (cp = vim_strrchr(sfname, '/')) != NULL) sfname = ++cp; #endif } --- 2615,2622 ---- ffname = free_fname; other_file = otherfile(ffname); #ifdef FEAT_SUN_WORKSHOP ! if (usingSunWorkShop && p_acd ! && (cp = vim_strrchr(sfname, '/')) != NULL) sfname = ++cp; #endif } *************** *** 3122,3128 **** && vim_chdirfile(curbuf->b_ffname) == OK) shorten_fnames(TRUE); ! if (gui.in_use && curbuf->b_fname != NULL) { # ifdef FEAT_SUN_WORKSHOP if (usingSunWorkShop) --- 3123,3129 ---- && vim_chdirfile(curbuf->b_ffname) == OK) shorten_fnames(TRUE); ! if (gui.in_use && curbuf->b_ffname != NULL) { # ifdef FEAT_SUN_WORKSHOP if (usingSunWorkShop) *** ../vim-6.2.169/src/version.c Mon Dec 29 21:17:44 2003 --- src/version.c Mon Dec 29 21:20:47 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 170, /**/ -- hundred-and-one symptoms of being an internet addict: 92. It takes you two hours to check all 14 of your mailboxes. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///