]> git.pld-linux.org Git - packages/vim.git/blob - 7.0.219
- updated to 0.7.3
[packages/vim.git] / 7.0.219
1 To: vim-dev@vim.org
2 Subject: patch 7.0.219
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.0.219
11 Problem:    When using the 'editexisting.vim' script and a file is being
12             edited in another tab page the window is split.  The "+123"
13             argument is not used.
14 Solution:   Make the tab page with the file the current tab page.  Set
15             v:swapcommand when starting up to the first "+123" or "-c" command
16             line argument.
17 Files:      runtime/macros/editexisting.vim, src/main.c
18
19
20 *** ../vim-7.0.218/runtime/macros/editexisting.vim      Sun Apr 30 20:33:40 2006
21 --- runtime/macros/editexisting.vim     Sat Mar 17 22:21:30 2007
22 ***************
23 *** 1,6 ****
24   " Vim Plugin: Edit the file with an existing Vim if possible
25   " Maintainer: Bram Moolenaar
26 ! " Last Change:        2006 Apr 30
27   
28   " This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
29   " $VIM/vimfiles/plugin directory.  Or make a symbolic link, so that you
30 --- 1,6 ----
31   " Vim Plugin: Edit the file with an existing Vim if possible
32   " Maintainer: Bram Moolenaar
33 ! " Last Change:        2007 Mar 17
34   
35   " This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
36   " $VIM/vimfiles/plugin directory.  Or make a symbolic link, so that you
37 ***************
38 *** 85,93 ****
39   " Function used on the server to make the file visible and possibly execute a
40   " command.
41   func! EditExisting(fname, command)
42 !   let n = bufwinnr(a:fname)
43 !   if n > 0
44 !     exe n . "wincmd w"
45     else
46       exe "split " . escape(a:fname, ' #%"|')
47     endif
48 --- 85,107 ----
49   " Function used on the server to make the file visible and possibly execute a
50   " command.
51   func! EditExisting(fname, command)
52 !   " Get the window number of the file in the current tab page.
53 !   let winnr = bufwinnr(a:fname)
54 !   if winnr <= 0
55 !     " Not found, look in other tab pages.
56 !     let bufnr = bufnr(a:fname)
57 !     for i in range(tabpagenr('$'))
58 !       if index(tabpagebuflist(i + 1), bufnr) >= 0
59 !       " Make this tab page the current one and find the window number.
60 !       exe 'tabnext ' . (i + 1)
61 !       let winnr = bufwinnr(a:fname)
62 !       break;
63 !       endif
64 !     endfor
65 !   endif
66
67 !   if winnr > 0
68 !     exe winnr . "wincmd w"
69     else
70       exe "split " . escape(a:fname, ' #%"|')
71     endif
72 *** ../vim-7.0.218/src/main.c   Tue Feb 27 16:51:07 2007
73 --- src/main.c  Sun Mar 18 21:51:48 2007
74 ***************
75 *** 798,803 ****
76 --- 798,808 ----
77       create_windows(&params);
78       TIME_MSG("opening buffers");
79   
80 + #ifdef FEAT_EVAL
81 +     /* clear v:swapcommand */
82 +     set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
83 + #endif
84
85       /* Ex starts at last line of the file */
86       if (exmode_active)
87         curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
88 ***************
89 *** 2202,2207 ****
90 --- 2207,2227 ----
91             argv_idx = 1;
92         }
93       }
94
95 + #ifdef FEAT_EVAL
96 +     /* If there is a "+123" or "-c" command, set v:swapcommand to the first
97 +      * one. */
98 +     if (parmp->n_commands > 0)
99 +     {
100 +       p = alloc((unsigned)STRLEN(parmp->commands[0]) + 3);
101 +       if (p != NULL)
102 +       {
103 +           sprintf((char *)p, ":%s\r", parmp->commands[0]);
104 +           set_vim_var_string(VV_SWAPCOMMAND, p, -1);
105 +           vim_free(p);
106 +       }
107 +     }
108 + #endif
109   }
110   
111   /*
112 *** ../vim-7.0.218/src/version.c        Thu Mar 15 22:54:51 2007
113 --- src/version.c       Sun Mar 18 21:49:11 2007
114 ***************
115 *** 668,669 ****
116 --- 668,671 ----
117   {   /* Add new patch number below this line */
118 + /**/
119 +     219,
120   /**/
121
122 -- 
123 FATHER:    You only killed the bride's father - that's all -
124 LAUNCELOT: Oh dear, I didn't really mean to...
125 FATHER:    Didn't mean to?  You put your sword right through his head!
126 LAUNCELOT: Gosh - Is he all right?
127                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
128
129  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
130 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
131 \\\        download, build and distribute -- http://www.A-A-P.org        ///
132  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.033172 seconds and 3 git commands to generate.