diff options
Diffstat (limited to 'src')
28 files changed, 24 insertions, 29 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 7090e007bf..075acc6c13 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -58,8 +58,8 @@ int get_indent_str(char_u *ptr, int ts, int list) if (!list || lcs_tab1) { // count a tab for what it is worth count += ts - (count % ts); } else { - // in list mode, when tab is not set, count screen char width for Tab: - // ^I + // In list mode, when tab is not set, count screen char width + // for Tab, displays: ^I count += ptr2cells(ptr); } } else if (*ptr == ' ') { diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index a9c1fec0b4..612f475933 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -1066,10 +1066,12 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, || pat[i][j + 1] == '`') *p++ = '\\'; ++j; - } else if (!intick && vim_strchr(SHELL_SPECIAL, - pat[i][j]) != NULL) + } else if (!intick + && ((flags & EW_KEEPDOLLAR) == 0 || pat[i][j] != '$') + && vim_strchr(SHELL_SPECIAL, pat[i][j]) != NULL) /* Put a backslash before a special character, but not - * when inside ``. */ + * when inside ``. And not for $var when EW_KEEPDOLLAR is + * set. */ *p++ = '\\'; /* Copy one character. */ diff --git a/src/nvim/path.c b/src/nvim/path.c index e8d31f3f73..950cc5a83a 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1080,7 +1080,7 @@ gen_expand_wildcards ( free(p); ga_clear_strings(&ga); i = mch_expand_wildcards(num_pat, pat, num_file, file, - flags); + flags | EW_KEEPDOLLAR); recursive = FALSE; return i; } diff --git a/src/nvim/path.h b/src/nvim/path.h index 9a994f3477..628ea335ed 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -17,6 +17,7 @@ #define EW_ICASE 0x100 /* ignore case */ #define EW_NOERROR 0x200 /* no error for bad regexp */ #define EW_NOTWILD 0x400 /* add match with literal name if exists */ +#define EW_KEEPDOLLAR 0x800 /* do not escape $, $var is expanded */ /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND * is used when executing commands and EW_SILENT for interactive expanding. */ diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 6bacef9778..fce0971d89 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -94,7 +94,7 @@ $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) test1.out RM_ON_RUN := test.out X* viminfo RM_ON_START := tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok -RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in +RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in clean: -rm -rf *.out \ diff --git a/src/nvim/testdir/test100.in b/src/nvim/testdir/test100.in index 2bf931fd4f..083b4324b2 100644 --- a/src/nvim/testdir/test100.in +++ b/src/nvim/testdir/test100.in @@ -2,7 +2,7 @@ Tests for 'undolevel' setting being global-local STARTTEST :so small.vim -:set nocompatible viminfo+=nviminfo ul=5 +:set ul=5 :fu! FillBuffer() :for i in range(1,13) :put=i diff --git a/src/nvim/testdir/test12.in b/src/nvim/testdir/test12.in index 46e9c45b80..be3169a625 100644 --- a/src/nvim/testdir/test12.in +++ b/src/nvim/testdir/test12.in @@ -5,7 +5,6 @@ Tests for 'directory' option. STARTTEST :so small.vim -:set nocompatible viminfo+=nviminfo :set dir=.,~ :/start of testfile/,/end of testfile/w! Xtest1 :" do an ls of the current dir to find the swap file (should not be there) diff --git a/src/nvim/testdir/test15.in b/src/nvim/testdir/test15.in index 366529a550..60d8717278 100644 --- a/src/nvim/testdir/test15.in +++ b/src/nvim/testdir/test15.in @@ -12,7 +12,6 @@ STARTTEST :set fo+=tcroql tw=72 /xxxxxxxx$ 0gq6kk -:set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes u :map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq diff --git a/src/nvim/testdir/test24.in b/src/nvim/testdir/test24.in Binary files differindex 7dfc1afdc6..292f403048 100644 --- a/src/nvim/testdir/test24.in +++ b/src/nvim/testdir/test24.in diff --git a/src/nvim/testdir/test29.in b/src/nvim/testdir/test29.in index 83c6acdc1c..4cc2120814 100644 --- a/src/nvim/testdir/test29.in +++ b/src/nvim/testdir/test29.in @@ -5,7 +5,6 @@ Test for joining lines and marks in them STARTTEST :so small.vim -:set viminfo+=nviminfo :set nojoinspaces :set cpoptions-=j /firstline/ diff --git a/src/nvim/testdir/test3.in b/src/nvim/testdir/test3.in index a7543945c4..46e5767062 100644 --- a/src/nvim/testdir/test3.in +++ b/src/nvim/testdir/test3.in @@ -4,7 +4,7 @@ Test for 'cindent' STARTTEST :so small.vim -:set nocompatible viminfo+=nviminfo modeline +:set modeline :edit " read modeline /start of AUTO =/end of AUTO diff --git a/src/nvim/testdir/test32.in b/src/nvim/testdir/test32.in index 6b399fa6c6..02a41141ab 100644 --- a/src/nvim/testdir/test32.in +++ b/src/nvim/testdir/test32.in @@ -22,7 +22,7 @@ Test for insert expansion STARTTEST :so small.vim -:se nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& +:se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& :se cot= nO#include "Xtestfile" ru diff --git a/src/nvim/testdir/test44.in b/src/nvim/testdir/test44.in index 87de1b95a4..65b08b08b8 100644 --- a/src/nvim/testdir/test44.in +++ b/src/nvim/testdir/test44.in @@ -4,7 +4,7 @@ See test99 for exactly the same test with re=2. STARTTEST :so mbyte.vim -:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo +:set encoding=utf-8 termencoding=latin1 :set re=1 /^1 /a*b\{2}c\+/e diff --git a/src/nvim/testdir/test49.in b/src/nvim/testdir/test49.in index 5e1d6b461e..1ce57246ee 100644 --- a/src/nvim/testdir/test49.in +++ b/src/nvim/testdir/test49.in @@ -5,7 +5,7 @@ test49.failed, try to add one or more "G"s at the line ending in "test.out" STARTTEST :so small.vim -:se nocp nomore viminfo+=nviminfo +:se nomore :lang mess C :so test49.vim GGGGGGGGGGGGGG"rp:.-,$w! test.out diff --git a/src/nvim/testdir/test61.in b/src/nvim/testdir/test61.in index dc24ab9804..87bb07a209 100644 --- a/src/nvim/testdir/test61.in +++ b/src/nvim/testdir/test61.in @@ -85,7 +85,6 @@ ggO---:0put b ggO---:0put a ggO---:w >>test.out :so small.vim -:set nocp viminfo+=nviminfo :enew! oa :set ul=100 diff --git a/src/nvim/testdir/test70.in b/src/nvim/testdir/test70.in index 9fbe818b3d..24d2e4c446 100644 --- a/src/nvim/testdir/test70.in +++ b/src/nvim/testdir/test70.in @@ -2,7 +2,6 @@ Smoke test for MzScheme interface and mzeval() function STARTTEST :so mzscheme.vim -:set nocompatible viminfo+=nviminfo :function! MzRequire() :redir => l:mzversion :mz (version) diff --git a/src/nvim/testdir/test72.in b/src/nvim/testdir/test72.in index 4700d86981..20897f01a0 100644 --- a/src/nvim/testdir/test72.in +++ b/src/nvim/testdir/test72.in @@ -6,7 +6,7 @@ STARTTEST :so small.vim :" :" Test 'undofile': first a simple one-line change. -:set nocompatible viminfo+=nviminfo visualbell +:set visualbell :set ul=100 undofile nomore :set ft=unix :e! Xtestfile diff --git a/src/nvim/testdir/test73.in b/src/nvim/testdir/test73.in index 666e4d2e50..60cda2d970 100644 --- a/src/nvim/testdir/test73.in +++ b/src/nvim/testdir/test73.in @@ -7,7 +7,6 @@ STARTTEST :" :" This will cause a few errors, do it silently. :set visualbell -:set nocp viminfo+=nviminfo :" :function! DeleteDirectory(dir) : if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32") diff --git a/src/nvim/testdir/test74.in b/src/nvim/testdir/test74.in index 4fbe5e4d01..9fdbe771b3 100644 --- a/src/nvim/testdir/test74.in +++ b/src/nvim/testdir/test74.in @@ -7,7 +7,7 @@ STARTTEST :" :" This will cause a few errors, do it silently. :set visualbell -:set nocp viminfo+=!,nviminfo +:set viminfo+=! :let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000} :" store a really long list, so line wrapping will occur in viminfo file :let MY_GLOBAL_LIST=range(1,100) diff --git a/src/nvim/testdir/test78.in b/src/nvim/testdir/test78.in index 1850bd9236..cb0e51edd5 100644 --- a/src/nvim/testdir/test78.in +++ b/src/nvim/testdir/test78.in @@ -6,7 +6,7 @@ blocks. STARTTEST :so small.vim -:set nocp fileformat=unix undolevels=-1 viminfo+=nviminfo +:set fileformat=unix undolevels=-1 :e! Xtest ggdG :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" diff --git a/src/nvim/testdir/test8.in b/src/nvim/testdir/test8.in index d9d00d97ae..0f27c813ec 100644 --- a/src/nvim/testdir/test8.in +++ b/src/nvim/testdir/test8.in @@ -32,7 +32,7 @@ endfunc $put ='VimLeave done' write endfunc -:set viminfo='100,nviminfo +:set viminfo='100 :au BufUnload * call CloseAll() :au VimLeave * call WriteToOut() :e small.vim diff --git a/src/nvim/testdir/test85.in b/src/nvim/testdir/test85.in index c5ca873a49..f7112792e9 100644 --- a/src/nvim/testdir/test85.in +++ b/src/nvim/testdir/test85.in @@ -3,7 +3,6 @@ Test for Lua interface and luaeval() function STARTTEST :so small.vim :so lua.vim -:set nocompatible viminfo+=nviminfo :lua l = vim.list():add"item0":add"dictionary with list OK":add"item2" :lua h = vim.dict(); h.list = l :call garbagecollect() diff --git a/src/nvim/testdir/test89.in b/src/nvim/testdir/test89.in index 1968066198..f1f64fb41f 100644 --- a/src/nvim/testdir/test89.in +++ b/src/nvim/testdir/test89.in @@ -5,7 +5,7 @@ STARTTEST :so small.vim -:set hidden nocp nu rnu viminfo+=nviminfo +:set hidden nu rnu :redir @a | set nu? rnu? | redir END :e! xx :redir @b | set nu? rnu? | redir END diff --git a/src/nvim/testdir/test94.in b/src/nvim/testdir/test94.in index dfa91d8340..a8b46112d2 100644 --- a/src/nvim/testdir/test94.in +++ b/src/nvim/testdir/test94.in @@ -17,7 +17,6 @@ Test cases: STARTTEST :so small.vim -:set nocp viminfo+=nviminfo : :" User functions :function MoveToCap() diff --git a/src/nvim/testdir/test95.in b/src/nvim/testdir/test95.in index b2b9de772e..221b550487 100644 --- a/src/nvim/testdir/test95.in +++ b/src/nvim/testdir/test95.in @@ -7,7 +7,7 @@ actually tried. STARTTEST :so small.vim :so mbyte.vim -:set nocp encoding=utf-8 viminfo+=nviminfo nomore +:set encoding=utf-8 nomore :" tl is a List of Lists with: :" 2: test auto/old/new 0: test auto/old 1: test auto/new :" regexp pattern diff --git a/src/nvim/testdir/test99.in b/src/nvim/testdir/test99.in index 77828f4b68..32bc68cce4 100644 --- a/src/nvim/testdir/test99.in +++ b/src/nvim/testdir/test99.in @@ -4,7 +4,7 @@ See test44 for exactly the same test with re=1. STARTTEST :so mbyte.vim -:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo +:set encoding=utf-8 termencoding=latin1 :set re=2 /^1 /a*b\{2}c\+/e diff --git a/src/nvim/testdir/test_breakindent.in b/src/nvim/testdir/test_breakindent.in index 0b00c95a85..ad12d0074d 100644 --- a/src/nvim/testdir/test_breakindent.in +++ b/src/nvim/testdir/test_breakindent.in @@ -81,7 +81,7 @@ STARTTEST :" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ :only :vert 20new -:set all& nocp breakindent briopt=min:10 +:set all& breakindent briopt=min:10 :call setline(1, [" a\tb\tc\td\te", " z y x w v"]) :/^\s*a fbgjyl:let line1 = @0 diff --git a/src/nvim/version.c b/src/nvim/version.c index 3460b7c6c3..de4f6ffd87 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -306,7 +306,7 @@ static int included_patches[] = { //426 NA 425, //424 NA - //423, + 423, //422, 421, //420 NA |