mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
updated for version 7.0-219
This commit is contained in:
parent
49104e4038
commit
867a4b7630
@ -1,6 +1,6 @@
|
|||||||
" Vim Plugin: Edit the file with an existing Vim if possible
|
" Vim Plugin: Edit the file with an existing Vim if possible
|
||||||
" Maintainer: Bram Moolenaar
|
" Maintainer: Bram Moolenaar
|
||||||
" Last Change: 2006 Apr 30
|
" Last Change: 2007 Mar 17
|
||||||
|
|
||||||
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
|
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
|
||||||
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
|
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
|
||||||
@ -85,9 +85,23 @@ endtry
|
|||||||
" Function used on the server to make the file visible and possibly execute a
|
" Function used on the server to make the file visible and possibly execute a
|
||||||
" command.
|
" command.
|
||||||
func! EditExisting(fname, command)
|
func! EditExisting(fname, command)
|
||||||
let n = bufwinnr(a:fname)
|
" Get the window number of the file in the current tab page.
|
||||||
if n > 0
|
let winnr = bufwinnr(a:fname)
|
||||||
exe n . "wincmd w"
|
if winnr <= 0
|
||||||
|
" Not found, look in other tab pages.
|
||||||
|
let bufnr = bufnr(a:fname)
|
||||||
|
for i in range(tabpagenr('$'))
|
||||||
|
if index(tabpagebuflist(i + 1), bufnr) >= 0
|
||||||
|
" Make this tab page the current one and find the window number.
|
||||||
|
exe 'tabnext ' . (i + 1)
|
||||||
|
let winnr = bufwinnr(a:fname)
|
||||||
|
break;
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
|
|
||||||
|
if winnr > 0
|
||||||
|
exe winnr . "wincmd w"
|
||||||
else
|
else
|
||||||
exe "split " . escape(a:fname, ' #%"|')
|
exe "split " . escape(a:fname, ' #%"|')
|
||||||
endif
|
endif
|
||||||
|
20
src/main.c
20
src/main.c
@ -798,6 +798,11 @@ main
|
|||||||
create_windows(¶ms);
|
create_windows(¶ms);
|
||||||
TIME_MSG("opening buffers");
|
TIME_MSG("opening buffers");
|
||||||
|
|
||||||
|
#ifdef FEAT_EVAL
|
||||||
|
/* clear v:swapcommand */
|
||||||
|
set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Ex starts at last line of the file */
|
/* Ex starts at last line of the file */
|
||||||
if (exmode_active)
|
if (exmode_active)
|
||||||
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
|
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
|
||||||
@ -2202,6 +2207,21 @@ scripterror:
|
|||||||
argv_idx = 1;
|
argv_idx = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FEAT_EVAL
|
||||||
|
/* If there is a "+123" or "-c" command, set v:swapcommand to the first
|
||||||
|
* one. */
|
||||||
|
if (parmp->n_commands > 0)
|
||||||
|
{
|
||||||
|
p = alloc((unsigned)STRLEN(parmp->commands[0]) + 3);
|
||||||
|
if (p != NULL)
|
||||||
|
{
|
||||||
|
sprintf((char *)p, ":%s\r", parmp->commands[0]);
|
||||||
|
set_vim_var_string(VV_SWAPCOMMAND, p, -1);
|
||||||
|
vim_free(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
219,
|
||||||
/**/
|
/**/
|
||||||
218,
|
218,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user