mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -1995,6 +1995,11 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
|
||||
break;
|
||||
|
||||
case OP_FUNCTION:
|
||||
#ifdef FEAT_LINEBREAK
|
||||
/* Restore linebreak, so that when the user edits it looks as
|
||||
* before. */
|
||||
curwin->w_p_lbr = lbr_saved;
|
||||
#endif
|
||||
op_function(oap); /* call 'operatorfunc' */
|
||||
break;
|
||||
|
||||
|
||||
@@ -5907,6 +5907,7 @@ set_string_option(
|
||||
return r;
|
||||
}
|
||||
|
||||
#if defined(FEAT_KEYMAP) || defined(FEAT_AUTOCMD) || defined(FEAT_SYN_HL)
|
||||
/*
|
||||
* Return TRUE if "val" is a valid 'filetype' name.
|
||||
* Also used for 'syntax' and 'keymap'.
|
||||
@@ -5921,6 +5922,7 @@ valid_filetype(char_u *val)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handle string options that need some action to perform when changed.
|
||||
|
||||
@@ -35,8 +35,20 @@ func! CountSpaces(type, ...)
|
||||
let @@ = reg_save
|
||||
endfunc
|
||||
|
||||
func! IsWindows()
|
||||
return has("win32") || has("win64") || has("win95")
|
||||
func! OpfuncDummy(type, ...)
|
||||
" for testing operatorfunc
|
||||
let g:opt=&linebreak
|
||||
|
||||
if a:0 " Invoked from Visual mode, use gv command.
|
||||
silent exe "normal! gvy"
|
||||
elseif a:type == 'line'
|
||||
silent exe "normal! '[V']y"
|
||||
else
|
||||
silent exe "normal! `[v`]y"
|
||||
endif
|
||||
" Create a new dummy window
|
||||
new
|
||||
let g:bufnr=bufnr('%')
|
||||
endfunc
|
||||
|
||||
fun! Test_normal00_optrans()
|
||||
@@ -147,7 +159,7 @@ endfunc
|
||||
func! Test_normal04_filter()
|
||||
" basic filter test
|
||||
" only test on non windows platform
|
||||
if IsWindows()
|
||||
if has('win32')
|
||||
return
|
||||
endif
|
||||
call Setup_NewWindow()
|
||||
@@ -210,7 +222,7 @@ endfunc
|
||||
func! Test_normal06_formatprg()
|
||||
" basic test for formatprg
|
||||
" only test on non windows platform
|
||||
if IsWindows()
|
||||
if has('win32')
|
||||
return
|
||||
else
|
||||
" uses sed to number non-empty lines
|
||||
@@ -328,9 +340,36 @@ func! Test_normal09_operatorfunc()
|
||||
" clean up
|
||||
unmap <buffer> ,,
|
||||
set opfunc=
|
||||
unlet! g:a
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func! Test_normal09a_operatorfunc()
|
||||
" Test operatorfunc
|
||||
call Setup_NewWindow()
|
||||
" Add some spaces for counting
|
||||
50,60s/$/ /
|
||||
unlet! g:opt
|
||||
set linebreak
|
||||
nmap <buffer><silent> ,, :set opfunc=OpfuncDummy<CR>g@
|
||||
50
|
||||
norm ,,j
|
||||
exe "bd!" g:bufnr
|
||||
call assert_true(&linebreak)
|
||||
call assert_equal(g:opt, &linebreak)
|
||||
set nolinebreak
|
||||
norm ,,j
|
||||
exe "bd!" g:bufnr
|
||||
call assert_false(&linebreak)
|
||||
call assert_equal(g:opt, &linebreak)
|
||||
|
||||
" clean up
|
||||
unmap <buffer> ,,
|
||||
set opfunc=
|
||||
bw!
|
||||
unlet! g:opt
|
||||
endfunc
|
||||
|
||||
func! Test_normal10_expand()
|
||||
" Test for expand()
|
||||
10new
|
||||
@@ -1248,10 +1287,12 @@ func! Test_normal23_K()
|
||||
norm! K
|
||||
call assert_equal('aa%bb', fnamemodify(bufname('%'), ':t'))
|
||||
bwipe!
|
||||
4
|
||||
norm! K
|
||||
call assert_equal('cc|dd', fnamemodify(bufname('%'), ':t'))
|
||||
bwipe!
|
||||
if !has('win32')
|
||||
4
|
||||
norm! K
|
||||
call assert_equal('cc|dd', fnamemodify(bufname('%'), ':t'))
|
||||
bwipe!
|
||||
endif
|
||||
set iskeyword-=%
|
||||
set iskeyword-=\|
|
||||
|
||||
|
||||
@@ -779,6 +779,12 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
66,
|
||||
/**/
|
||||
65,
|
||||
/**/
|
||||
64,
|
||||
/**/
|
||||
63,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user