diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index dc50455312..583d89ccf7 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 8.0. Last change: 2018 Feb 19 +*editing.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -424,6 +424,15 @@ On Unix and a few other systems you can also use backticks for the file name argument, for example: > :next `find . -name ver\\*.c -print` :view `ls -t *.patch \| head -n1` +Vim will run the command in backticks using the 'shell' and use the standard +output as argument for the given Vim command (error messages from the shell +command will be discarded). +To see what shell command Vim is running, set the 'verbose' option to 4. When +the shell command returns a non-zero exit code, an error message will be +displayed and the Vim command will be aborted. To avoid this make the shell +always return zero like so: > + :next `find . -name ver\\*.c -print \|\| true` + The backslashes before the star are required to prevent the shell from expanding "ver*.c" prior to execution of the find program. The backslash before the shell pipe symbol "|" prevents Vim from parsing it as command @@ -650,8 +659,7 @@ list of the current window. There is no check for duplicates, it is possible to add a file to the argument list twice. The currently edited file is not changed. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Note: you can also use this method: > :args ## x < This will add the "x" item and sort the new list. @@ -665,8 +673,7 @@ list of the current window. when it's deleted from the argument list. Example: > :argdel *.obj -< {not in Vi} {not available when compiled without the - |+listcmds| feature} +< {not in Vi} :[range]argd[elete] Delete the {range} files from the argument list. Example: > @@ -681,8 +688,7 @@ list of the current window. < Removes all the files from the arglist. When the last number in the range is too high, up to the last argument is deleted. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} *:argu* *:argument* :[count]argu[ment] [count] [++opt] [+cmd] @@ -691,16 +697,14 @@ list of the current window. when changes have been made and Vim does not want to |abandon| the current buffer. Also see |++opt| and |+cmd|. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} :[count]argu[ment]! [count] [++opt] [+cmd] Edit file [count] in the argument list, discard any changes to the current buffer. When [count] is omitted the current entry is used. Also see |++opt| and |+cmd|. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} :[count]n[ext] [++opt] [+cmd] *:n* *:ne* *:next* *E165* *E163* Edit [count] next file. This fails when changes have @@ -823,7 +827,6 @@ fourth file in the argument list. This happens when you do ":e file". LOCAL ARGUMENT LIST {not in Vi} -{not available when compiled without the |+windows| or |+listcmds| features} *:arglocal* :argl[ocal] Make a local copy of the global argument list. @@ -875,8 +878,7 @@ USING THE ARGUMENT LIST autocommand event is disabled by adding it to 'eventignore'. This considerably speeds up editing each file. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo| diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 506a7b8c6e..59b73f6cc2 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2018 Mar 20 +*eval.txt* For Vim version 8.0. Last change: 2018 Mar 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4469,6 +4469,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* specifies what for. The following completion types are supported: + arglist file names in argument list augroup autocmd groups buffer buffer names behave :behave suboptions @@ -8669,12 +8670,12 @@ trim({text}[, {mask}]) *trim()* This code deals with multibyte characters properly. Examples: > - echo trim(" \r\t\t\r RESERVE \t \t\n\x0B\x0B")."_TAIL" + echo trim(" some text ") +< returns "some text" > + echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL" < returns "RESERVE_TAIL" > - echo trim("needrmvRESERVEnnneeedddrrmmmmvv", "ednmrv") -< returns "RESERVE" > - echo trim("rmrrmm", "rm") -< returns "any_chas" + echo trim("rmX>rrm", "rm<>") +< returns "Xrm<>X" (characters in the middle are not removed) trunc({expr}) *trunc()* Return the largest integral value with magnitude less than or diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 2efeb3bc61..18763f439f 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1272,6 +1272,7 @@ By default, the arguments of user defined commands do not undergo completion. However, by specifying one or the other of the following attributes, argument completion can be enabled: + -complete=arglist file names in argument list -complete=augroup autocmd groups -complete=buffer buffer names -complete=behave :behave suboptions diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index bb71896b48..e627686bfc 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.0. Last change: 2018 Mar 04 +*quickfix.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -419,8 +419,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: autocommand event is disabled by adding it to 'eventignore'. This considerably speeds up editing each buffer. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, |:ldo|, |:cfdo| and |:lfdo|. @@ -433,8 +432,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: :{cmd} etc. < Otherwise it works the same as `:cdo`. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} *:ldo* :ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list @@ -447,8 +445,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: etc. < Only valid entries in the location list are used. Otherwise it works the same as `:cdo`. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} *:lfdo* :lfdo[!] {cmd} Execute {cmd} in each file in the location list for @@ -460,8 +457,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: :{cmd} etc. < Otherwise it works the same as `:ldo`. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} ============================================================================= 2. The error window *quickfix-window* diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 529a0f714a..0ecce32203 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -1,4 +1,4 @@ -*quotes.txt* For Vim version 8.0. Last change: 2010 Nov 03 +*quotes.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -18,7 +18,7 @@ Coming with a very GUI mindset from Windows, I always thought of people using Vi as some kind of outer space alien in human clothes. Once I tried I really got addicted by its power and now I found myself typing Vim keypresses in the oddest places! That's why I would like to see Vim embedded in every -application which deals with text editing. (José Fonseca) +application which deals with text editing. (José Fonseca) I was a 12-year emacs user who switched to Vim about a year ago after finally giving up on the multiple incompatible versions, flaky contributed packages, diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index aacfe53312..cac65aeb7e 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 8.0. Last change: 2017 Oct 26 +*spell.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -907,9 +907,9 @@ when using "cp1250" on Unix. *spell-LOW* *spell-UPP* Three lines in the affix file are needed. Simplistic example: - FOL áëñ ~ - LOW áëñ ~ - UPP ÁËÑ ~ + FOL áëñ ~ + LOW áëñ ~ + UPP ÃËÑ ~ All three lines must have exactly the same number of characters. @@ -924,9 +924,9 @@ The "UPP" line specifies the characters with upper-case. That is, a character is upper-case where it's different from the character at the same position in "FOL". -An exception is made for the German sharp s ß. The upper-case version is +An exception is made for the German sharp s ß. The upper-case version is "SS". In the FOL/LOW/UPP lines it should be included, so that it's recognized -as a word character, but use the ß character in all three. +as a word character, but use the ß character in all three. ASCII characters should be omitted, Vim always handles these in the same way. When the encoding is UTF-8 no word characters need to be specified. @@ -1397,7 +1397,7 @@ suggestions would spend most time trying all kind of weird compound words. *spell-SYLLABLE* The SYLLABLE item defines characters or character sequences that are used to count the number of syllables in a word. Example: - SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~ + SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~ Before the first slash is the set of characters that are counted for one syllable, also when repeated and mixed, until the next character that is not @@ -1478,8 +1478,8 @@ alike. This is mostly used for a letter with different accents. This is used to prefer suggestions with these letters substituted. Example: MAP 2 ~ - MAP eéëêè ~ - MAP uüùúû ~ + MAP eéëêè ~ + MAP uüùúû ~ The first line specifies the number of MAP lines following. Vim ignores the number, but the line must be there. diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index e72388cbf7..56d58ebaad 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 8.0. Last change: 2016 Oct 20 +*tabpage.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -286,8 +286,7 @@ LOOPING OVER TAB PAGES: current tab page. {cmd} can contain '|' to concatenate several commands. {cmd} must not open or close tab pages or reorder them. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo| diff --git a/runtime/doc/tags b/runtime/doc/tags index 9a33672212..fc472f152d 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -9051,7 +9051,10 @@ termdebug-variables terminal.txt /*termdebug-variables* termdebug_popup terminal.txt /*termdebug_popup* termdebug_wide terminal.txt /*termdebug_wide* terminal terminal.txt /*terminal* +terminal-api terminal.txt /*terminal-api* +terminal-client-server terminal.txt /*terminal-client-server* terminal-colors os_unix.txt /*terminal-colors* +terminal-communication terminal.txt /*terminal-communication* terminal-cursor-style terminal.txt /*terminal-cursor-style* terminal-debug terminal.txt /*terminal-debug* terminal-diff terminal.txt /*terminal-diff* @@ -9069,6 +9072,7 @@ terminal-session terminal.txt /*terminal-session* terminal-size-color terminal.txt /*terminal-size-color* terminal-special-keys terminal.txt /*terminal-special-keys* terminal-testing terminal.txt /*terminal-testing* +terminal-to-job terminal.txt /*terminal-to-job* terminal-typing terminal.txt /*terminal-typing* terminal-unix terminal.txt /*terminal-unix* terminal-use terminal.txt /*terminal-use* @@ -9140,6 +9144,7 @@ tolower() eval.txt /*tolower()* toolbar-icon gui.txt /*toolbar-icon* toupper() eval.txt /*toupper()* tr() eval.txt /*tr()* +trim() eval.txt /*trim()* trojan-horse starting.txt /*trojan-horse* true-variable eval.txt /*true-variable* trunc() eval.txt /*trunc()* diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index 53dd946b1e..54c7e1f044 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.0. Last change: 2018 Mar 25 +*terminal.txt* For Vim version 8.0. Last change: 2018 Mar 26 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index dc07b631a3..e6622af96a 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2018 Mar 16 +*todo.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -36,18 +36,40 @@ entered there will not be repeated below, unless there is extra information. -------------------- Known bugs and current work ----------------------- Terminal emulator window: +- dump diff sometimes creates a different way of repeating. + Example: https://api.travis-ci.org/v3/job/359102504/log.txt + unclear why this can happen. - Still some stuff to implement and bugs to fix, see src/terminal.c -- Crash when using popup menu while balloon is visible? -- Test_terminal_qall_kill_func if flaky -- Drop options argument of term_dumpdiff() / termp_dumpload() ? Mode message isn't updated on vertical split. (Alexei Averchenko, 2018 Feb 2, #2611) +Patch to fix vimgrep adding to wrong quickfix list. (Yegappan, 2018 Mar 25) + +Problem with sudo. #2758 + +Code refactoring, macro for message, #2729 + +Patch to enforce c89 compliance. (James McCoy, #2735) +With fix for Mac from Kazunobu. + Errors found with random data: heap-buffer-overflow in alist_add (#2472) -Implement option_save() and option_restore(). +Patch to avoid bad highlighting caused by #if. (ichizok, #2731) + +Implement option_save() and option_restore()? Or remove the help. + +Looks like an error for inserting register makes ":file other" not work. +(Tom M, 2018 Mar 28) + +Patch to fix mouse pointer after :tselect. (Hirohito Higashi, #2709) +How to reproduce the problem? + +Patch to avoid job killed when I/O is disconnected. (ichizok, #2734) + +When opening foo/x.txt and bar/x.txt get swap file warning. Should check the +file name. (Juergen Weigert) Compiler warnings (geeknik, 2017 Oct 26): - signed integer overflow in do_sub() (#2249) @@ -55,8 +77,14 @@ Compiler warnings (geeknik, 2017 Oct 26): - signed integer overflow in getdecchrs() (#2254) - undefined left shift in get_string_tv() (#2250) +Tests failing for "make testgui" with GTK: +- Test_setbufvar_options() +- Test_exit_callback_interval() + Mouse pointer sticks to stop shape. Only on Windows GUI? #2709 +Patch to make log_tr() use variable arguments. (Ichizok, 2018 Mar 20, #2730) + balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec 20, #2481) Also see #2352, want better control over balloon, perhaps set the position. @@ -71,10 +99,18 @@ mode. Also used for switching Terminal mode. Cursor in status line after search. (#2530) +Patch to fix that an empty buffer remains when using :argedit. (Christian, +#2713) Updated patch. + +Patch to fix interaction between 'virtualedit' and i_CTRL-G_j. (Christian +Brabandt, #2743) + Cursor in wrong position when line wraps. (#2540) Alternative manpager.vim. (Enno, 2018 Jan 5, #2529) +Patch to add more flags to :ls. (Marcin Szamotulski, #2751) + Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539) @@ -84,8 +120,12 @@ with packages under "start". (xtal8, #1994) Column number is wrong when using 'linebreak' and 'wrap'. (Keith Smiley, 2018 Jan 15, #2555) +":bufdo e" disabled syntax HL in windows other than the current. (BPJ) + Check argument of systemlist(). (Pavlov) +Patch to add reg_executing() and reg_recording(). (Hirohito Higashi, #2745) + No maintainer for Vietnamese translations. No maintainer for Simplified Chinese translations. @@ -126,6 +166,9 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed. Using 'wildignore' also applies to literally entered file name. Also with :drop (remote commands). +Patch to use the xdiff library instead of external diff. (Christian Brabandt, +2018 Mar 20, #2732) + "gvim --remote" from a directory with non-word characters changes the current directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266) Also see #1689. @@ -150,6 +193,8 @@ No profile information for function that executes ":quit". (Daniel Hahler, Get a "No Name" buffer when 'hidden' is set and opening a new window from the quickfix list. (bfrg, 2018 Jan 22, #2574) +CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746) + A function on a dictionary is not profiled. (ZyX, 2010 Dec 25) Patch to fix E806. (Dominique, 2017 Nov 22, #2368) @@ -161,10 +206,23 @@ Patch to fix GUI find/replace dialog. (kiloliter, 2017 Dec 11, report in Invalid range error when using BufWinLeave for closing terminal. (Gabriel Barta, 2017 Nov 15, #2339) +Using an external diff is inefficient. Not all systems have a good diff +program available (esp. MS-Windows). Would be nice to have in internal diff +implementation. Can then also use this for displaying changes within a line. +Olaf Dabrunz is working on this. (10 Jan 2016) +9 Instead invoking an external diff program, use builtin code. One can be + found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c + It's complicated and badly documented. +Alternative: use the xdiff library. Patch from Christian Brabandt, 2018 Mar +2018, #2732) + ml_get errors with buggy script. (Dominique, 2017 Apr 30) Error in emsg with buggy script. (Dominique, 2017 Apr 30) +Using CTRL-G j in insert mode in combination with 'virtualedit' doesn't work +as expected. (Rich, 2018 March 23, #2743) + Patch to fix encoding in print document name (Yasuhiro Matsumoto, 2017 Dec 20, #2478) @@ -222,6 +280,10 @@ Start with filetype detection: testdir/test_filetype.vim Window not closed when deleting buffer. (Harm te Hennepe, 2017 Aug 27, #2029) +Duplication of completion suggestions for ":!hom". Issue #539. +Patch by Christian, 2016 Jan 29 +Another patch in #2733. +> Add options_default() / options_restore() to set several options to Vim defaults for a plugin. Comments from Zyx, 2017 May 10. Perhaps use a vimcontext / endvimcontext command block. @@ -237,6 +299,9 @@ line breaks. (Ken Takata, 2017 Aug 22) The ":move" command does not honor closed folds. (Ryan Lue, #2351) +Patch to fix increment/decrement not working properly when 'virtualedit' is +set. (Hirohito Higashi, 2016 Aug 1, #923) + Memory leaks in test_channel? (or is it because of fork()) Using uninitialized value in test_crypt. Memory leaks in test_escaped_glob @@ -547,14 +612,6 @@ Patch to be able to separately map CTRL-H and BS on Windows. When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017 Apr 23, #1653) -Using an external diff is inefficient. Not all systems have a good diff -program available (esp. MS-Windows). Would be nice to have in internal diff -implementation. Can then also use this for displaying changes within a line. -Olaf Dabrunz is working on this. (10 Jan 2016) -9 Instead invoking an external diff program, use builtin code. One can be - found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c - It's complicated and badly documented. - Window resizing with 'winfixheight': With a vertical split the height changes anyway. (Tommy allen, 2017 Feb 21, #1502) @@ -570,8 +627,6 @@ Patch to make it possible to extend a list with itself. Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24) -Patch to add trim() function. (Bukn, 2016 Nov 25, #1280) - Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275) Patch to change argument of :marks. (LemonBoy, 2017 Jan 29, #1426) @@ -774,9 +829,6 @@ emoji_width table has only one entry. It's possible to add ",," to 'wildignore', an empty entry. Causes problems. Reject the value? #710. -Patch to fix increment/decrement not working properly when 'virtualedit' is -set. (Hirohito Higashi, 2016 Aug 1, #923) - When doing "vi buf.md" a BufNew autocommand for *.md is not triggered. Because of using the initial buffer? (Dun Peal, 2016 May 12) @@ -806,9 +858,6 @@ Appveyor build with self-installing executable, includes getting most interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build result: https://ci.appveyor.com/project/k-takata/vim/history -Duplication of completion suggestions for ":!hom". Issue 539. -Patch by Christian, 2016 Jan 29 -> Problem that a previous silent ":throw" causes a following try/catch not to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24) @@ -4313,6 +4362,8 @@ Perl interface: Shared libraries: +8 libcall() can keep the library around instead of always calling dlclose(). + (Jason Felice, 2018 Mar 20) 6 Add support for loading shared libraries, and calling functions in it. :libload internal-name libname :libunload internal-name diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 9392e4146a..2337bcebf4 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 8.0. Last change: 2018 Mar 10 +*various.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -385,7 +385,7 @@ B *+langmap* |'langmap'| N *+libcall* |libcall()| N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'| N *+lispindent* |'lisp'| -N *+listcmds* Vim commands for the list of buffers |buffer-hidden| +T *+listcmds* Vim commands for the list of buffers |buffer-hidden| and argument list |:argdelete| N *+localmap* Support for mappings local to a buffer |:map-local| m *+lua* |Lua| interface diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 1c25392ccd..c5021cd48c 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.0. Last change: 2017 Sep 25 +*windows.txt* For Vim version 8.0. Last change: 2018 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -731,8 +731,7 @@ can also get to them with the buffer list commands, like ":bnext". the current window. {cmd} can contain '|' to concatenate several commands. {cmd} must not open or close windows or reorder them. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo| @@ -760,8 +759,7 @@ can also get to them with the buffer list commands, like ":bnext". autocommand event is disabled by adding it to 'eventignore'. This considerably speeds up editing each buffer. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo| @@ -974,7 +972,6 @@ is no word under the cursor, and a few other things: > A hidden buffer is not displayed in a window, but is still loaded into memory. This makes it possible to jump from file to file, without the need to read or write the file every time you get another buffer in a window. -{not available when compiled without the |+listcmds| feature} *:buffer-!* If the option 'hidden' ('hid') is set, abandoned buffers are kept for all @@ -1049,6 +1046,9 @@ list of buffers. |unlisted-buffer| x buffers with a read error % current buffer # alternate buffer + R terminal buffers with a running job + F terminal buffers with a finished job + ? terminal buffers without a job: `:terminal NONE` Combining flags means they are "and"ed together, e.g.: h+ hidden buffers which are modified a+ active buffers which are modified diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index eb00ea949b..ba043e968a 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2018 Mar 12 +" Last Change: 2018 Mar 28 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -216,7 +216,8 @@ endfunc "}}} " Add known tag pairs. " Self-closing tags and tags that are sometimes {{{ " self-closing (e.g.,

) are not here (when encountering

we can find -" the matching

, but not the other way around). +" the matching

, but not the other way around). Known self-closing tags: +" 'p', 'img', 'source'. " Old HTML tags: call s:AddITags(s:indent_tags, [ \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', @@ -234,7 +235,7 @@ call s:AddITags(s:indent_tags, [ \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas', \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption', \ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter', - \ 'nav', 'output', 'progress', 'rp', 'rt', 'ruby', 'section', 'source', + \ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', \ 'summary', 'svg', 'time', 'track', 'video', 'wbr']) " Tags added for web components: diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 65765bb31b..086a8f1ecf 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -116,7 +116,7 @@ func s:StartDebug(cmd) if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi ' let response = term_getline(s:gdbbuf, lnum + 1) if response =~ 'Undefined command' - echoerr 'Your gdb does not support the Machine Interface feature' + echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' exe 'bwipe! ' . s:ptybuf exe 'bwipe! ' . s:commbuf return @@ -143,6 +143,10 @@ func s:StartDebug(cmd) " running. call s:SendCommand('-gdb-set mi-async on') + " Disable pagination, it causes everything to stop at the gdb + " "Type to continue" prompt. + call s:SendCommand('-gdb-set pagination off') + " Sign used to highlight the line where the program has stopped. " There can be only one. sign define debugPC linehl=debugPC diff --git a/src/buffer.c b/src/buffer.c index 4a3427792c..21b39adcaa 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -27,13 +27,9 @@ #include "vim.h" -#if defined(FEAT_CMDL_COMPL) || defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) static char_u *buflist_match(regmatch_T *rmp, buf_T *buf, int ignore_case); -# define HAVE_BUFLIST_MATCH static char_u *fname_match(regmatch_T *rmp, char_u *name, int ignore_case); -#endif static void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options); -static wininfo_T *find_wininfo(buf_T *buf, int skip_diff_buffer); #ifdef UNIX static buf_T *buflist_findname_stat(char_u *ffname, stat_T *st); static int otherfile_buf(buf_T *buf, char_u *ffname, stat_T *stp); @@ -952,7 +948,6 @@ clear_wininfo(buf_T *buf) } } -#if defined(FEAT_LISTCMDS) || defined(FEAT_TERMINAL) || defined(PROTO) /* * Go to another buffer. Handles the result of the ATTENTION dialog. */ @@ -963,42 +958,41 @@ goto_buffer( int dir, int count) { -# if defined(HAS_SWAP_EXISTS_ACTION) +#if defined(HAS_SWAP_EXISTS_ACTION) bufref_T old_curbuf; set_bufref(&old_curbuf, curbuf); swap_exists_action = SEA_DIALOG; -# endif +#endif (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO, start, dir, count, eap->forceit); -# if defined(HAS_SWAP_EXISTS_ACTION) +#if defined(HAS_SWAP_EXISTS_ACTION) if (swap_exists_action == SEA_QUIT && *eap->cmd == 's') { -# if defined(FEAT_EVAL) +# if defined(FEAT_EVAL) cleanup_T cs; /* Reset the error/interrupt/exception state here so that * aborting() returns FALSE when closing a window. */ enter_cleanup(&cs); -# endif +# endif /* Quitting means closing the split window, nothing else. */ win_close(curwin, TRUE); swap_exists_action = SEA_NONE; swap_exists_did_quit = TRUE; -# if defined(FEAT_EVAL) +# if defined(FEAT_EVAL) /* Restore the error/interrupt/exception state if not discarded by a * new aborting error, interrupt, or uncaught exception. */ leave_cleanup(&cs); -# endif +# endif } else handle_swap_exists(&old_curbuf); -# endif -} #endif +} #if defined(HAS_SWAP_EXISTS_ACTION) || defined(PROTO) /* @@ -1076,7 +1070,6 @@ handle_swap_exists(bufref_T *old_curbuf) } #endif -#if defined(FEAT_LISTCMDS) || defined(PROTO) /* * do_bufdel() - delete or unload buffer(s) * @@ -1203,10 +1196,6 @@ do_bufdel( return errormsg; } -#endif /* FEAT_LISTCMDS */ - -#if defined(FEAT_LISTCMDS) || defined(FEAT_PYTHON) \ - || defined(FEAT_PYTHON3) || defined(PROTO) static int empty_curbuf(int close_others, int forceit, int action); @@ -1363,7 +1352,6 @@ do_buffer( need_mouse_correct = TRUE; #endif -#ifdef FEAT_LISTCMDS /* * delete buffer buf from memory and/or the list */ @@ -1381,7 +1369,7 @@ do_buffer( if (!forceit && bufIsChanged(buf)) { -# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) +#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) if ((p_confirm || cmdmod.confirm) && p_write) { dialog_changed(buf, FALSE); @@ -1395,7 +1383,7 @@ do_buffer( return FAIL; } else -# endif +#endif { EMSGN(_("E89: No write since last change for buffer %ld (add ! to override)"), buf->b_fnum); @@ -1561,7 +1549,6 @@ do_buffer( if (win_split(0, 0) == FAIL) return FAIL; } -#endif /* go to current buffer - nothing to do */ if (buf == curbuf) @@ -1594,12 +1581,10 @@ do_buffer( /* Go to the other buffer. */ set_curbuf(buf, action); -#if defined(FEAT_LISTCMDS) if (action == DOBUF_SPLIT) { RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */ } -#endif #if defined(FEAT_EVAL) if (aborting()) /* autocmds may abort script processing */ @@ -1608,7 +1593,6 @@ do_buffer( return OK; } -#endif /* * Set current buffer to "buf". Executes autocommands and closes current @@ -2415,8 +2399,6 @@ buflist_findname_stat( return NULL; } -#if defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) \ - || defined(PROTO) /* * Find file in buffer list by a regexp pattern. * Return fnum of the found buffer. @@ -2538,7 +2520,6 @@ buflist_findpat( EMSG2(_("E94: No matching buffer for %s"), pattern); return match; } -#endif #if defined(FEAT_CMDL_COMPL) || defined(PROTO) @@ -2648,7 +2629,6 @@ ExpandBufnames( #endif /* FEAT_CMDL_COMPL */ -#ifdef HAVE_BUFLIST_MATCH /* * Check for a match on the file name for buffer "buf" with regprog "prog". */ @@ -2699,7 +2679,6 @@ fname_match( return match; } -#endif /* * Find a file in the buffer list by buffer number. @@ -2944,7 +2923,6 @@ buflist_findlnum(buf_T *buf) return buflist_findfpos(buf)->lnum; } -#if defined(FEAT_LISTCMDS) || defined(PROTO) /* * List all known file names (for :files and :buffers command). */ @@ -2956,18 +2934,34 @@ buflist_list(exarg_T *eap) int i; int ro_char; int changed_char; +#ifdef FEAT_TERMINAL + int job_running; + int job_none_open; +#endif for (buf = firstbuf; buf != NULL && !got_int; buf = buf->b_next) { +#ifdef FEAT_TERMINAL + job_running = term_job_running(buf->b_term); + job_none_open = job_running && term_none_open(buf->b_term); +#endif /* skip unlisted buffers, unless ! was used */ if ((!buf->b_p_bl && !eap->forceit && !vim_strchr(eap->arg, 'u')) || (vim_strchr(eap->arg, 'u') && buf->b_p_bl) || (vim_strchr(eap->arg, '+') && ((buf->b_flags & BF_READERR) || !bufIsChanged(buf))) || (vim_strchr(eap->arg, 'a') - && (buf->b_ml.ml_mfp == NULL || buf->b_nwindows == 0)) + && (buf->b_ml.ml_mfp == NULL || buf->b_nwindows == 0)) || (vim_strchr(eap->arg, 'h') - && (buf->b_ml.ml_mfp == NULL || buf->b_nwindows != 0)) + && (buf->b_ml.ml_mfp == NULL || buf->b_nwindows != 0)) +#ifdef FEAT_TERMINAL + || (vim_strchr(eap->arg, 'R') + && (!job_running || (job_running && job_none_open))) + || (vim_strchr(eap->arg, '?') + && (!job_running || (job_running && !job_none_open))) + || (vim_strchr(eap->arg, 'F') + && (job_running || buf->b_term == NULL)) +#endif || (vim_strchr(eap->arg, '-') && buf->b_p_ma) || (vim_strchr(eap->arg, '=') && !buf->b_p_ro) || (vim_strchr(eap->arg, 'x') && !(buf->b_flags & BF_READERR)) @@ -3028,7 +3022,6 @@ buflist_list(exarg_T *eap) ui_breakcheck(); } } -#endif /* * Get file name and line number for file 'fnum'. @@ -5105,7 +5098,6 @@ do_arg_all( vim_free(opened); } -# if defined(FEAT_LISTCMDS) || defined(PROTO) /* * Open a window for a number of buffers. */ @@ -5310,7 +5302,6 @@ ex_buffer_all(exarg_T *eap) } } } -# endif /* FEAT_LISTCMDS */ static int chk_modeline(linenr_T, int); diff --git a/src/charset.c b/src/charset.c index 003949f0a7..7da18bb2e4 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1787,7 +1787,6 @@ skiptowhite(char_u *p) return p; } -#if defined(FEAT_LISTCMDS) || defined(FEAT_SIGNS) || defined(PROTO) /* * skiptowhite_esc: Like skiptowhite(), but also skip escaped chars */ @@ -1802,7 +1801,6 @@ skiptowhite_esc(char_u *p) } return p; } -#endif /* * Getdigits: Get a number from a string and skip over it. diff --git a/src/dehqx.py b/src/dehqx.py index 34d9ae4b0b..00e8f9f340 100644 --- a/src/dehqx.py +++ b/src/dehqx.py @@ -1,7 +1,7 @@ # Python script to get both the data and resource fork from a BinHex encoded # file. # Author: MURAOKA Taro -# Last Change: 2012 Jun 29 +# Last Change: 2018 Mar 27 # # Copyright (C) 2003,12 MURAOKA Taro # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. @@ -15,11 +15,13 @@ info = conv.FInfo out = conv.FName out_data = out out_rsrc = out + '.rsrcfork' -#print 'out_rsrc=' + out_rsrc -print 'In file: ' + input + +# This uses the print statement on Python 2, print function on Python 3. +#print('out_rsrc=' + out_rsrc) +print('In file: ' + input) outfile = open(out_data, 'wb') -print ' Out data fork: ' + out_data +print(' Out data fork: ' + out_data) while 1: d = conv.read(128000) if not d: break @@ -29,7 +31,7 @@ conv.close_data() d = conv.read_rsrc(128000) if d: - print ' Out rsrc fork: ' + out_rsrc + print(' Out rsrc fork: ' + out_rsrc) outfile = open(out_rsrc, 'wb') outfile.write(d) while 1: diff --git a/src/evalfunc.c b/src/evalfunc.c index 3d01cc22a0..f080918f22 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -5993,9 +5993,7 @@ f_has(typval_T *argvars, typval_T *rettv) #ifdef FEAT_LISP "lispindent", #endif -#ifdef FEAT_LISTCMDS "listcmds", -#endif #ifdef FEAT_LOCALMAP "localmap", #endif diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 6845be57d8..e13d34cc0f 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3745,10 +3745,8 @@ do_ecmd( fname_case(sfname, 0); /* set correct case for sfname */ #endif -#ifdef FEAT_LISTCMDS if ((flags & ECMD_ADDBUF) && (ffname == NULL || *ffname == NUL)) goto theend; -#endif if (ffname == NULL) other_file = TRUE; @@ -3830,9 +3828,7 @@ do_ecmd( */ if (other_file) { -#ifdef FEAT_LISTCMDS if (!(flags & ECMD_ADDBUF)) -#endif { if (!cmdmod.keepalt) curwin->w_alt_fnum = curbuf->b_fnum; @@ -3844,7 +3840,6 @@ do_ecmd( buf = buflist_findnr(fnum); else { -#ifdef FEAT_LISTCMDS if (flags & ECMD_ADDBUF) { linenr_T tlnum = 1L; @@ -3858,7 +3853,6 @@ do_ecmd( (void)buflist_new(ffname, sfname, tlnum, BLN_LISTED); goto theend; } -#endif buf = buflist_new(ffname, sfname, 0L, BLN_CURBUF | ((flags & ECMD_SET_HELP) ? 0 : BLN_LISTED)); @@ -4016,11 +4010,7 @@ do_ecmd( } else /* !other_file */ { - if ( -#ifdef FEAT_LISTCMDS - (flags & ECMD_ADDBUF) || -#endif - check_fname() == FAIL) + if ((flags & ECMD_ADDBUF) || check_fname() == FAIL) goto theend; oldbuf = (flags & ECMD_OLDBUF); diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 85fff549e9..b337fa8024 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2513,9 +2513,7 @@ static char_u *do_one_arg(char_u *str); static int do_arglist(char_u *str, int what, int after); static void alist_check_arg_idx(void); static int editing_arg_idx(win_T *win); -#ifdef FEAT_LISTCMDS static int alist_add_list(int count, char_u **files, int after); -#endif #define AL_SET 1 #define AL_ADD 2 #define AL_DEL 3 @@ -2640,10 +2638,8 @@ do_arglist( int exp_count; char_u **exp_files; int i; -#ifdef FEAT_LISTCMDS char_u *p; int match; -#endif int arg_escaped = TRUE; /* @@ -2663,7 +2659,6 @@ do_arglist( if (get_arglist(&new_ga, str, arg_escaped) == FAIL) return FAIL; -#ifdef FEAT_LISTCMDS if (what == AL_DEL) { regmatch_T regmatch; @@ -2710,7 +2705,6 @@ do_arglist( ga_clear(&new_ga); } else -#endif { i = expand_wildcards(new_ga.ga_len, (char_u **)new_ga.ga_data, &exp_count, &exp_files, EW_DIR|EW_FILE|EW_ADDSLASH|EW_NOTFOUND); @@ -2721,14 +2715,12 @@ do_arglist( return FAIL; } -#ifdef FEAT_LISTCMDS if (what == AL_ADD) { (void)alist_add_list(exp_count, exp_files, after); vim_free(exp_files); } else /* what == AL_SET */ -#endif alist_set(ALIST(curwin), exp_count, exp_files, FALSE, NULL, 0); } @@ -2810,16 +2802,11 @@ ex_args(exarg_T *eap) if (eap->cmdidx != CMD_args) { -#if defined(FEAT_LISTCMDS) alist_unlink(ALIST(curwin)); if (eap->cmdidx == CMD_argglobal) ALIST(curwin) = &global_alist; else /* eap->cmdidx == CMD_arglocal */ alist_new(); -#else - ex_ni(eap); - return; -#endif } if (!ends_excmd(*eap->arg)) @@ -2830,10 +2817,7 @@ ex_args(exarg_T *eap) */ ex_next(eap); } - else -#if defined(FEAT_LISTCMDS) - if (eap->cmdidx == CMD_args) -#endif + else if (eap->cmdidx == CMD_args) { /* * ":args": list arguments. @@ -2854,7 +2838,6 @@ ex_args(exarg_T *eap) } } } -#if defined(FEAT_LISTCMDS) else if (eap->cmdidx == CMD_arglocal) { garray_T *gap = &curwin->w_alist->al_ga; @@ -2873,7 +2856,6 @@ ex_args(exarg_T *eap) ++gap->ga_len; } } -#endif } /* @@ -3024,7 +3006,6 @@ ex_next(exarg_T *eap) } } -#if defined(FEAT_LISTCMDS) || defined(PROTO) /* * ":argedit" */ @@ -3385,7 +3366,21 @@ alist_add_list( return -1; } -#endif /* FEAT_LISTCMDS */ +#if defined(FEAT_CMDL_COMPL) || defined(PROTO) +/* + * Function given to ExpandGeneric() to obtain the possible arguments of the + * argedit and argdelete commands. + */ + char_u * +get_arglist_name(expand_T *xp UNUSED, int idx) +{ + if (idx >= ARGCOUNT) + return NULL; + + return alist_name(&ARGLIST[idx]); +} +#endif + #ifdef FEAT_EVAL /* @@ -5252,7 +5247,6 @@ source_finished( } #endif -#if defined(FEAT_LISTCMDS) || defined(PROTO) /* * ":checktime [buffer]" */ @@ -5273,7 +5267,6 @@ ex_checktime(exarg_T *eap) } no_check_timestamps = save_no_check_timestamps; } -#endif #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ && (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG)) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index c6fe2aa4ce..a74b628937 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -83,7 +83,6 @@ static void ex_abclear(exarg_T *eap); #endif static void ex_autocmd(exarg_T *eap); static void ex_doautocmd(exarg_T *eap); -#ifdef FEAT_LISTCMDS static void ex_bunload(exarg_T *eap); static void ex_buffer(exarg_T *eap); static void ex_bmodified(exarg_T *eap); @@ -91,20 +90,6 @@ static void ex_bnext(exarg_T *eap); static void ex_bprevious(exarg_T *eap); static void ex_brewind(exarg_T *eap); static void ex_blast(exarg_T *eap); -#else -# define ex_bunload ex_ni -# define ex_buffer ex_ni -# define ex_bmodified ex_ni -# define ex_bnext ex_ni -# define ex_bprevious ex_ni -# define ex_brewind ex_ni -# define ex_blast ex_ni -# define buflist_list ex_ni -# define ex_checktime ex_ni -#endif -#if !defined(FEAT_LISTCMDS) -# define ex_buffer_all ex_ni -#endif static char_u *getargcmd(char_u **); static char_u *skip_cmd_arg(char_u *p, int rembs); static int getargopt(exarg_T *eap); @@ -184,12 +169,6 @@ static void ex_goto(exarg_T *eap); static void ex_shell(exarg_T *eap); static void ex_preserve(exarg_T *eap); static void ex_recover(exarg_T *eap); -#ifndef FEAT_LISTCMDS -# define ex_argedit ex_ni -# define ex_argadd ex_ni -# define ex_argdelete ex_ni -# define ex_listdo ex_ni -#endif static void ex_mode(exarg_T *eap); static void ex_wrongmodifier(exarg_T *eap); static void ex_find(exarg_T *eap); @@ -2845,7 +2824,6 @@ do_one_cmd( goto doend; } -#ifdef FEAT_LISTCMDS /* * Accept buffer name. Cannot be used at the same time with a buffer * number. Don't do this for a user command. @@ -2874,7 +2852,6 @@ do_one_cmd( ea.addr_count = 1; ea.arg = skipwhite(p); } -#endif /* The :try command saves the emsg_silent flag, reset it here when * ":silent! try" was used, it should only apply to :try itself. */ @@ -4115,7 +4092,6 @@ set_one_cmd_context( set_context_in_sign_cmd(xp, arg); break; #endif -#ifdef FEAT_LISTCMDS case CMD_bdelete: case CMD_bwipeout: case CMD_bunload: @@ -4128,7 +4104,6 @@ set_one_cmd_context( xp->xp_context = EXPAND_BUFFERS; xp->xp_pattern = arg; break; -#endif #ifdef FEAT_USR_CMDS case CMD_USER: case CMD_USER_BUF: @@ -4303,6 +4278,12 @@ set_one_cmd_context( break; #endif + case CMD_argdelete: + while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL) + arg = xp->xp_pattern + 1; + xp->xp_context = EXPAND_ARGLIST; + xp->xp_pattern = arg; + break; #ifdef FEAT_GUI_MACVIM case CMD_macaction: xp->xp_context = EXPAND_MACACTION; @@ -5538,7 +5519,6 @@ ex_doautocmd(exarg_T *eap) do_modelines(0); } -#ifdef FEAT_LISTCMDS /* * :[N]bunload[!] [N] [bufname] unload buffer * :[N]bdelete[!] [N] [bufname] delete buffer from buffer list @@ -5637,7 +5617,6 @@ ex_blast(exarg_T *eap) if (eap->do_ecmd_cmd != NULL) do_cmdline_cmd(eap->do_ecmd_cmd); } -#endif int ends_excmd(int c) @@ -5896,6 +5875,7 @@ static struct char *name; } command_complete[] = { + {EXPAND_ARGLIST, "arglist"}, {EXPAND_AUGROUP, "augroup"}, {EXPAND_BEHAVE, "behave"}, {EXPAND_BUFFERS, "buffer"}, @@ -7998,7 +7978,6 @@ alist_unlink(alist_T *al) } } -#if defined(FEAT_LISTCMDS) || defined(HAVE_DROP_FILE) || defined(PROTO) /* * Create a new argument list and use it for the current window. */ @@ -8018,7 +7997,6 @@ alist_new(void) alist_init(curwin->w_alist); } } -#endif #if !defined(UNIX) || defined(PROTO) /* @@ -8690,9 +8668,7 @@ do_exedit( + (eap->forceit ? ECMD_FORCEIT : 0) /* after a split we can use an existing buffer */ + (old_curwin != NULL ? ECMD_OLDBUF : 0) -#ifdef FEAT_LISTCMDS + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 ) -#endif , old_curwin == NULL ? curwin : NULL) == FAIL) { /* Editing the file failed. If the window was split, close it. */ diff --git a/src/ex_getln.c b/src/ex_getln.c index 43f6465a02..c519a083a9 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5000,6 +5000,7 @@ ExpandFromContext( #endif {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE}, {EXPAND_USER, get_users, TRUE, FALSE}, + {EXPAND_ARGLIST, get_arglist_name, TRUE, FALSE}, #ifdef FEAT_GUI_MACVIM {EXPAND_MACACTION, get_macaction_name, FALSE, FALSE}, #endif diff --git a/src/feature.h b/src/feature.h index bf8fd534d8..a19378af89 100644 --- a/src/feature.h +++ b/src/feature.h @@ -100,15 +100,6 @@ * +vertsplit Vertically split windows. */ -/* - * +listcmds Vim commands for the buffer list and the argument - * list. Without this there is no ":buffer" ":bnext", - * ":bdel", ":argdelete", etc. - */ -#ifdef FEAT_NORMAL -# define FEAT_LISTCMDS -#endif - /* * +cmdhist Command line history. */ @@ -1266,10 +1257,9 @@ #endif /* - * The Netbeans feature requires +listcmds and +eval. + * The Netbeans feature requires +eval. */ -#if (!defined(FEAT_LISTCMDS) || !defined(FEAT_EVAL)) \ - && defined(FEAT_NETBEANS_INTG) +#if !defined(FEAT_EVAL) && defined(FEAT_NETBEANS_INTG) # undef FEAT_NETBEANS_INTG #endif diff --git a/src/if_python.c b/src/if_python.c index caa9e14645..1740dc07a1 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -672,7 +672,8 @@ end_dynamic_python(void) python_runtime_link_init(char *libname, int verbose) { int i; - void *ucs_as_encoded_string; + PYTHON_PROC *ucs_as_encoded_string = + (PYTHON_PROC*)&py_PyUnicode_AsEncodedString; #if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3) /* Can't have Python and Python3 loaded at the same time. @@ -711,14 +712,12 @@ python_runtime_link_init(char *libname, int verbose) /* Load unicode functions separately as only the ucs2 or the ucs4 functions * will be present in the library. */ - ucs_as_encoded_string = symbol_from_dll(hinstPython, + *ucs_as_encoded_string = symbol_from_dll(hinstPython, "PyUnicodeUCS2_AsEncodedString"); - if (ucs_as_encoded_string == NULL) - ucs_as_encoded_string = symbol_from_dll(hinstPython, + if (*ucs_as_encoded_string == NULL) + *ucs_as_encoded_string = symbol_from_dll(hinstPython, "PyUnicodeUCS4_AsEncodedString"); - if (ucs_as_encoded_string != NULL) - py_PyUnicode_AsEncodedString = ucs_as_encoded_string; - else + if (*ucs_as_encoded_string == NULL) { close_dll(hinstPython); hinstPython = 0; diff --git a/src/if_python3.c b/src/if_python3.c index 59c115dd8d..b885deb049 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -600,7 +600,10 @@ end_dynamic_python3(void) py3_runtime_link_init(char *libname, int verbose) { int i; - void *ucs_from_string, *ucs_decode, *ucs_as_encoded_string; + PYTHON_PROC *ucs_from_string = (PYTHON_PROC *)&py3_PyUnicode_FromString; + PYTHON_PROC *ucs_decode = (PYTHON_PROC *)&py3_PyUnicode_Decode; + PYTHON_PROC *ucs_as_encoded_string = + (PYTHON_PROC *)&py3_PyUnicode_AsEncodedString; # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) /* Can't have Python and Python3 loaded at the same time. @@ -641,33 +644,29 @@ py3_runtime_link_init(char *libname, int verbose) /* Load unicode functions separately as only the ucs2 or the ucs4 functions * will be present in the library. */ # if PY_VERSION_HEX >= 0x030300f0 - ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicode_FromString"); - ucs_decode = symbol_from_dll(hinstPy3, "PyUnicode_Decode"); - ucs_as_encoded_string = symbol_from_dll(hinstPy3, + *ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicode_FromString"); + *ucs_decode = symbol_from_dll(hinstPy3, "PyUnicode_Decode"); + *ucs_as_encoded_string = symbol_from_dll(hinstPy3, "PyUnicode_AsEncodedString"); # else - ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); - ucs_decode = symbol_from_dll(hinstPy3, + *ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); + *ucs_decode = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_Decode"); - ucs_as_encoded_string = symbol_from_dll(hinstPy3, + *ucs_as_encoded_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_AsEncodedString"); - if (!ucs_from_string || !ucs_decode || !ucs_as_encoded_string) + if (*ucs_from_string == NULL || *ucs_decode == NULL + || *ucs_as_encoded_string == NULL) { - ucs_from_string = symbol_from_dll(hinstPy3, + *ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS4_FromString"); - ucs_decode = symbol_from_dll(hinstPy3, + *ucs_decode = symbol_from_dll(hinstPy3, "PyUnicodeUCS4_Decode"); - ucs_as_encoded_string = symbol_from_dll(hinstPy3, + *ucs_as_encoded_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS4_AsEncodedString"); } # endif - if (ucs_from_string && ucs_decode && ucs_as_encoded_string) - { - py3_PyUnicode_FromString = ucs_from_string; - py3_PyUnicode_Decode = ucs_decode; - py3_PyUnicode_AsEncodedString = ucs_as_encoded_string; - } - else + if (*ucs_from_string == NULL || *ucs_decode == NULL + || *ucs_as_encoded_string == NULL) { close_dll(hinstPy3); hinstPy3 = 0; diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro index 63d377d64b..a7d19d768f 100644 --- a/src/proto/ex_cmds2.pro +++ b/src/proto/ex_cmds2.pro @@ -67,6 +67,7 @@ void ex_argedit(exarg_T *eap); void ex_argadd(exarg_T *eap); void ex_argdelete(exarg_T *eap); void ex_listdo(exarg_T *eap); +char_u *get_arglist_name(expand_T *xp, int idx); void ex_compiler(exarg_T *eap); void ex_runtime(exarg_T *eap); int do_in_path(char_u *path, char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie); diff --git a/src/terminal.c b/src/terminal.c index 0c04b73226..af0d77eafa 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -3578,7 +3578,7 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED) for (i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell.chars[i] != NUL; ++i) { - len = utf_char2bytes(cell.chars[0], charbuf); + len = utf_char2bytes(cell.chars[i], charbuf); fwrite(charbuf, len, 1, fd); } } diff --git a/src/testdir/dumps/Test_popup_command_01.dump b/src/testdir/dumps/Test_popup_command_01.dump index 2657f0297c..8d0cd9cf57 100644 --- a/src/testdir/dumps/Test_popup_command_01.dump +++ b/src/testdir/dumps/Test_popup_command_01.dump @@ -1,5 +1,5 @@ |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51 -|a|n|d| |o|n|e| |t|w|o| |X|t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 +|a|n|d| |o|n|e| |t|w|o| >X|t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 |o|n|e| |m|o|r|e| |t|w| +0#0000001#ffd7ff255|U|n|d|o| @12| +0#0000000#ffffff0@45 |~+0#4040ff13&| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 |~| @9| +0#0000001#ffd7ff255|P|a|s|t|e| @11| +0#4040ff13#ffffff0@45 @@ -17,4 +17,4 @@ |~| @73 |~| @73 |~| @73 -|:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @34|:| @8> @17 +|:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @62 diff --git a/src/testdir/dumps/Test_popup_command_02.dump b/src/testdir/dumps/Test_popup_command_02.dump index 87ec419468..e33ea4df51 100644 --- a/src/testdir/dumps/Test_popup_command_02.dump +++ b/src/testdir/dumps/Test_popup_command_02.dump @@ -17,4 +17,4 @@ |~| @73 |~| @73 |~| @73 -|:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @34|:| @8| @17 +|:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @62 diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim index 87a5823cc2..d4fae07425 100644 --- a/src/testdir/screendump.vim +++ b/src/testdir/screendump.vim @@ -59,6 +59,9 @@ func RunVimInTerminal(arguments, options) let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols}) call assert_equal([rows, cols], term_getsize(buf)) + " Wait for the ruler (in the status line) to be shown. + call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1}) + return buf endfunc diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index a8142ef55c..e5f14bad56 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -1315,6 +1315,8 @@ func Test_Changed_FirstTime() call writefile([''], 'Xchanged.txt') let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3}) call assert_equal('running', term_getstatus(buf)) + " Wait for the ruler (in the status line) to be shown. + call WaitFor({-> term_getline(buf, 3) =~# '\ call writefile(['No'], 'Xchanged.txt')\") call term_sendkeys(buf, "\\:qa!\") diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 832413e813..8755fbf1aa 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -137,6 +137,11 @@ func Test_getcompletion() let l = getcompletion('v:notexists', 'var') call assert_equal([], l) + args a.c b.c + let l = getcompletion('', 'arglist') + call assert_equal(['a.c', 'b.c'], l) + %argdelete + let l = getcompletion('', 'augroup') call assert_true(index(l, 'END') >= 0) let l = getcompletion('blahblah', 'augroup') diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 3411d5abe9..f3f9ed48f7 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -45,11 +45,17 @@ func Test_terminal_basic() call assert_equal('t', mode()) call assert_equal('yes', b:done) call assert_match('%aR[^\n]*running]', execute('ls')) + call assert_match('%aR[^\n]*running]', execute('ls R')) + call assert_notmatch('%[^\n]*running]', execute('ls F')) + call assert_notmatch('%[^\n]*running]', execute('ls ?')) call Stop_shell_in_terminal(buf) call term_wait(buf) call assert_equal('n', mode()) call assert_match('%aF[^\n]*finished]', execute('ls')) + call assert_match('%aF[^\n]*finished]', execute('ls F')) + call assert_notmatch('%[^\n]*finished]', execute('ls R')) + call assert_notmatch('%[^\n]*finished]', execute('ls ?')) " closing window wipes out the terminal buffer a with finished job close @@ -979,7 +985,29 @@ endfunction func Check_dump01(off) call assert_equal('one two three four five', trim(getline(a:off + 1))) call assert_equal('~ Select Word', trim(getline(a:off + 7))) - call assert_equal(':popup PopUp :', trim(getline(a:off + 20))) + call assert_equal(':popup PopUp', trim(getline(a:off + 20))) +endfunc + +func Test_terminal_dumpwrite_composing() + if !CanRunVimInTerminal() + return + endif + let save_enc = &encoding + set encoding=utf-8 + call assert_equal(1, winnr('$')) + + let text = " a\u0300 e\u0302 o\u0308" + call writefile([text], 'Xcomposing') + let buf = RunVimInTerminal('Xcomposing', {}) + call WaitFor({-> term_getline(buf, 1) =~ text}) + call term_dumpwrite(buf, 'Xdump') + let dumpline = readfile('Xdump')[0] + call assert_match('|à| |ê| |ö', dumpline) + + call StopVimInTerminal(buf) + call delete('Xcomposing') + call delete('Xdump') + let &encoding = save_enc endfunc " just testing basic functionality. diff --git a/src/version.c b/src/version.c index 5532bd1f1a..71247648b4 100644 --- a/src/version.c +++ b/src/version.c @@ -337,11 +337,7 @@ static char *(features[]) = #else "-lispindent", #endif -#ifdef FEAT_LISTCMDS "+listcmds", -#else - "-listcmds", -#endif #ifdef FEAT_LOCALMAP "+localmap", #else @@ -781,6 +777,22 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1655, +/**/ + 1654, +/**/ + 1653, +/**/ + 1652, +/**/ + 1651, +/**/ + 1650, +/**/ + 1649, +/**/ + 1648, /**/ 1647, /**/ diff --git a/src/vim.h b/src/vim.h index e58ea0919d..a730b88ebe 100644 --- a/src/vim.h +++ b/src/vim.h @@ -782,7 +782,8 @@ extern int (*dyn_libintl_putenv)(const char *envstring); #define EXPAND_PACKADD 45 #define EXPAND_MESSAGES 46 #define EXPAND_MAPCLEAR 47 -#define EXPAND_MACACTION 48 +#define EXPAND_ARGLIST 48 +#define EXPAND_MACACTION 49 /* Values for exmode_active (0 is no exmode) */ #define EXMODE_NORMAL 1