From b4d6c3ea4a59c6d8d4e0e52120596866f0edd510 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 27 May 2017 16:45:17 +0200 Subject: [PATCH 01/26] Update runtime files. --- runtime/doc/eval.txt | 8 +- runtime/doc/options.txt | 10 +- runtime/doc/todo.txt | 133 ++++++++++++++++-- runtime/doc/usr_44.txt | 4 +- runtime/doc/version8.txt | 32 ++--- runtime/filetype.vim | 9 +- runtime/ftplugin/sbt.vim | 15 ++ runtime/indent/sh.vim | 19 +-- runtime/indent/tex.vim | 119 ++++++++-------- runtime/pack/dist/opt/matchit/doc/matchit.txt | 7 +- runtime/syntax/c.vim | 58 +++----- runtime/syntax/sbt.vim | 32 +++++ 12 files changed, 298 insertions(+), 148 deletions(-) create mode 100644 runtime/ftplugin/sbt.vim create mode 100644 runtime/syntax/sbt.vim diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 141f586bb3..6a0013ab94 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 Apr 29 +*eval.txt* For Vim version 8.0. Last change: 2017 May 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -10692,12 +10692,6 @@ When the |+eval| feature is available the command is skipped because of the "while 0". Without the |+eval| feature the "while 0" is an error, which is silently ignored, and the command is executed. -The "" here is a real CR character, type CTRL-V Enter to get it. - -When the |+eval| feature is available the ":" is remapped to add a double -quote, which has the effect of commenting-out the command. Without the -|+eval| feature the nnoremap command is skipped and the command is executed. - ============================================================================== 11. The sandbox *eval-sandbox* *sandbox* *E48* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 927931c070..c6fc424284 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.0. Last change: 2017 Mar 22 +*options.txt* For Vim version 8.0. Last change: 2017 May 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -862,6 +862,12 @@ A jump table for the options with a short description can be found at |Q_op|. < Vim will guess the value. In the GUI this should work correctly, in other cases Vim might not be able to guess the right value. + When the t_BG option is set, Vim will use it to request the background + color from the terminal. If the returned RGB value is dark/light and + 'background' is not dark/light, 'background' will be set and the + screen is redrawn. This may have side effects, make t_BG empty in + your .vimrc if you suspect this problem. + When starting the GUI, the default value for 'background' will be "light". When the value is not set in the .gvimrc, and Vim detects that the background is actually quite dark, 'background' is set to @@ -2700,7 +2706,7 @@ A jump table for the options with a short description can be found at |Q_op|. Makes the 'g' and 'c' flags of the ":substitute" command to be toggled each time the flag is given. See |complex-change|. See also 'gdefault' option. - Switching this option on is discouraged! + Switching this option on may break plugins! *'emoji'* *'emo'* *'noemoji'* *'noemo'* 'emoji' 'emo' boolean (default: on) diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 0736ada58e..eda32c563c 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2017 Apr 28 +*todo.txt* For Vim version 8.0. Last change: 2017 May 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,13 +35,9 @@ entered there will not be repeated below, unless there is extra information. *known-bugs* -------------------- Known bugs and current work ----------------------- -Remove the Farsi code? - +channel: -- job_stop() should not always close the channel, e.g. for "int". - (Martin Gammelsæter, 2017 Apr 11, #1632) - Only assume killed on "kill". - Check job->jv_status not to be JOB_ENDED. +- When redrawing for the channel buffer, command line completion is cleared. + (Ramel Eshed, 2017 May 4) - Try out background make plugin: https://github.com/AndrewVos/vim-make-background - Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026) @@ -110,13 +106,102 @@ Regexp problems: had_endbrace[] is set but not initialized or used. - Difference between two engines: ".*\zs\/\@>\/" on text "///" (Chris Paul, 2016 Nov 13) New engine not greedy enough? + Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*') + (2017 May 15, #1252) With foldmethod=syntax and nofoldenable comment highlighting isn't removed. (Marcin Szewczyk, 2017 Apr 26) +Patch for Murphy filetype detection. (Matthew Fernandez, 2017 May 17) + +ZoomWin plugin ratings went down a lot. Bot problem? (Charles Campbell, 2017 +May 18) + +ml_get errors with buggy script. (Dominique, 2017 Apr 30) + +Error in emsg with buggy script. (Dominique, 2017 Apr 30) + +Patch to update 'runtimepath' earlier. (Ingo Karkat, 2017 May 5, #1680) + +Patch to make float2nr() more accurate. (Hirohito Higashi, 2017 May 7, #1688) + +Patch to make :hardcopy handle spaces correctly. (Christian Brabandt, 2017 May +7, #1682) + +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. + +Patch to recognize 'bg' detection. (Lemonboy, 2017 May 18, #1710) + +Patch to recognize 1.0 as a whole as a float. (Yasuhiro Matsumoto, 2017 May +11) + +Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696) + +When checking if a bufref is valid, also check the buffer number, to catch the +case of :bwipe followed by :new. + +Files for Latvian language. (Vitolins, 2017 May 3, #1675) + +Adding a filetype in a "start" package is not picked up as expected. +(comment by Ingo Karkat, #1679) +Patch for a fix, Ingo Karkat, #1693. + +Patch to fix character class detection in NFA engine. +(James McCoy, 2017 May 12, update May 24, #1703) + +Setting 'clipboard' to "unnamed" makes a global command very slow (Daniel +Drucker, 2017 May 8). +This was supposed to be fixed, did it break again somehow? +Christian cannot reproduce it. + +Better TeX indent file. (Christian Brabandt, 2017 May 3) + +Openhab syntax file (mueller, #1678) + +Followup patch for 8.0.0590 for "context" in locations. (Yegappan, 2017 May 4) + +Use gvimext.dll from the nightly build? (Issue #249) + +Patch to remove HAVE_GTK_MULTIHEAD-relevant code. (Kazunobu Kuriyama, 2017 May +5) Update May 11 + +Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May +8, #1690) + +'equalalways' only works for one column. (Glacambre, 2017 May 15, #1707) + +Include solarized color scheme? + +Updates to GTK help. (Kazunobu Kuriyama, 2017 May 4) + Running test_gui and test_gui_init with Motif sometimes kills the window manager. Problem with Motif? +Bogus characters inserted when triggering indent while changing text. +(Vitor Antunes, 2016 Nov 22, #1269) + +Patch to have ":stag" respect 'switchbuf'. (Ingo Karkat, 2017 May 5, #1681) + +Wrong selection of quoted text (Guraga, #1687) +Patch to fix selection of quoted text. (Christian Brabandt, 2017 May 7, #1687) + +Patch to use separate error message for regex range. (Itchyny, Ken Hamada, +2017 May 16) + +Segmentation fault with complete(). (Lifepillar, 2017 Apr 29, #1668) +Check for "pat" to be NULL in search_for_exact_line()? +How did it get NULL? Comment by Christian, Apr 30. + +Is it possible to keep the complete menu open when calling complete()? +(Prabir Shrestha, 2017 May 19, #1713) + +Calling may_req_ambiguous_char_width() and may_req_bg_color() only after +executing command line commands may not work properly. +Set "starting" to 0 earlier, and move the may_req calls above exe_commands()? +(Rastislav Barlink, 2017 May 18) + Memory leak in test97? The string is actually freed. Weird. Patch for shellescape(). (Christian Brabandt, 2017 Apr 20, #1590) @@ -127,6 +212,26 @@ New value "uselast" for 'switchbuf'. (Lemonboy, 2017 Apr 23, #1652) Add a toolbar in the terminal. Can be global, above all windows, or specific for one window. + +Make maparg() also return the raw rhs, so that it doesn't depend on 'cpo'. +(Brett Stahlman, 2017 May 23) +Even better: add a way to disable a mapping temporarily and re-enable it +later. This is for a sub-mode that is active for a short while (one buffer). +Still need maplist() to find the mappings. What can we use to identify a +mapping? Something unique would be better than the LHS. + +Patch to support chinese wordcount in utf-8. (Rain, 2017 May 24, #1722) +Or not? + +"gn" selects one character instead of the searched text. (keyboardfire, #1683) +Patch by Christian, 2017 May 7. + +Wrong memory access using p_fdm, found in patch to add tests for diff mode +(#1658) (Dominique Pelle, 2017 May 6) + +Patch to improve test coverage for diff mode. (Dominique Pelle, 2017 May 11, +#1685) + Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}]) tb_highlight(winid, 'ToolBar') tb_get(winid) @@ -194,6 +299,10 @@ writefile() does not abort as soon as an error is found. (Nikolai Pavlov, Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017 Feb 14). +Change the Farsi code to work with UTF-8. Possibly combined with the Arabic +support, or similar. +Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2) + Add a command to take a range of lines, filter them and put the output somewhere else. :{range}copy {dest} !cmd @@ -369,15 +478,9 @@ Autocommands blocked in do_arg_all(). Supposed to happen later? 'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9) -Patch to add context information to quickfix/location list. (Yegappan -Lakshmanan, 2016 Aug 25, #1012) - MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c? Otherwise task flickers in taskbar. -Bogus characters inserted when triggering indent while changing test. -(Vitor Antunes, 2016 Nov 22, #1269) - Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26) Also for ":@.". @@ -444,6 +547,8 @@ No test, needs some work to include. Patch to improve indenting for C++ constructor with initializer list. (Hirohito Higashi, 2016 Mar 31) +Zero-out krypt key information when no longer in use. (Ben Fritz, 2017 May 15) + Add stronger encryption. Could use libsodium (NaCl). https://github.com/jedisct1/libsodium/ Possibly include the needed code so that it can be build everywhere. @@ -1519,8 +1624,6 @@ When a:base in 'completefunc' starts with a number it's passed as a number, not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a string value. -Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2) - For running gvim on a USB stick: avoid the OLE registration. Use a command line argument -noregister. diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index 658c72f893..09de5774bb 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -1,4 +1,4 @@ -*usr_44.txt* For Vim version 8.0. Last change: 2008 Dec 28 +*usr_44.txt* For Vim version 8.0. Last change: 2017 May 06 VIM USER MANUAL - by Bram Moolenaar @@ -686,7 +686,7 @@ that included files do this too, you might have to reset "b:current_syntax" if you include two files. If you want your syntax file to work with Vim 5.x, add a check for v:version. -See yacc.vim for an example. +Find an syntax file in the Vim 7.2 distribution for an example. Do not include anything that is a user preference. Don't set 'tabstop', 'expandtab', etc. These belong in a filetype plugin. diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt index 09285c61af..e0e8f0e26e 100644 --- a/runtime/doc/version8.txt +++ b/runtime/doc/version8.txt @@ -15117,7 +15117,7 @@ Files: src/option.c Patch 8.0.0101 Problem: Some options are not strictly checked. -Solution: Add flags for strickter checks. +Solution: Add flags for stricter checks. Files: src/option.c Patch 8.0.0102 (after 8.0.0101) @@ -15766,7 +15766,7 @@ Solution: Change #ifdef around ins_char_bytes. Files: src/misc1.c Patch 8.0.0212 -Problem: The buffer used to store a key name theoreticaly could be too +Problem: The buffer used to store a key name theoretically could be too small. (Coverity) Solution: Count all possible modifier characters. Add a check for the length just in case. @@ -15834,7 +15834,7 @@ Files: src/ops.c, src/testdir/test_put.vim, src/Makefile, Patch 8.0.0223 Problem: Coverity gets confused by the flags passed to find_tags() and - warnts for an uninitialized variable. + warns about uninitialized variable. Solution: Disallow using cscope and help tags at the same time. Files: src/tag.c @@ -15955,7 +15955,7 @@ Files: src/testdir/test_usercommands.vim Patch 8.0.0243 Problem: When making a character lower case with tolower() changes the byte - cound, it is not made lower case. + count, it is not made lower case. Solution: Add strlow_save(). (Dominique Pelle, closes #1406) Files: src/evalfunc.c, src/misc2.c, src/proto/misc2.pro, src/testdir/test_functions.vim @@ -16032,9 +16032,9 @@ Files: src/Makefile, src/charset.c, src/kword_test.c, src/mbyte.c, src/proto/mbyte.pro Patch 8.0.0253 -Problem: When creating a session when winminheight is 2 or larger and +Problem: When creating a session when 'winminheight' is 2 or larger and loading that session gives an error. -Solution: Also set winminheight before setting winheight to 1. (Rafael +Solution: Also set 'winminheight' before setting 'winheight' to 1. (Rafael Bodill, neovim #5717) Files: src/ex_docmd.c, src/testdir/test_mksession.vim @@ -16541,7 +16541,7 @@ Solution: For quoted text objects bail out if the Visual area spans more Files: src/search.c, src/testdir/test_visual.vim Patch 8.0.0340 -Problem: Not checking return valud of dict_add(). (Coverity) +Problem: Not checking return value of dict_add(). (Coverity) Solution: Handle a failure. Files: src/buffer.c @@ -16612,12 +16612,12 @@ Files: src/testdir/test_expr.vim Patch 8.0.0352 Problem: The condition for when a typval needs to be cleared is too complicated. -Solution: Init the type to VAR_UNKNOWN and clear it always. +Solution: Init the type to VAR_UNKNOWN and always clear it. Files: src/eval.c Patch 8.0.0353 Problem: If [RO] in the status line is translated to a longer string, it is - trunctted to 4 bytes. + truncated to 4 bytes. Solution: Skip over the resulting string. (Jente Hidskes, closes #1499) Files: src/screen.c @@ -17294,7 +17294,7 @@ Files: src/misc2.c Patch 8.0.0461 (after 8.0.0457) Problem: Test 45 hangs on MS-Windows. -Solution: Reset 'shiftwidth'. Also remove redundent function. +Solution: Reset 'shiftwidth'. Also remove redundant function. Files: src/fold.c, src/testdir/test45.in Patch 8.0.0462 @@ -17597,7 +17597,7 @@ Solution: Remove duplicate https:. Files: README.md Patch 8.0.0511 -Problem: Menuage for skipping client-server tests is unclear. +Problem: Message for skipping client-server tests is unclear. Solution: Be more specific about what's missing (Hirohito Higashi, Kazunobu Kuriyama) Files: src/testdir/test_quotestar.vim, src/testdir/test_clientserver.vim @@ -17688,7 +17688,7 @@ Solution: Include the whole character. Files: src/search.c, src/testdir/test_normal.vim Patch 8.0.0524 (after 8.0.0518) -Problem: Folds are messed up when 'encodin' is "utf-8". +Problem: Folds are messed up when 'encoding' is "utf-8". Solution: Also set the fold character when it's not multi-byte. Files: src/screen.c, src/testdir/test_display.vim @@ -17882,7 +17882,7 @@ Solution: Add a test. (Dominique Pelle, closes #1622) Files: src/testdir/test_syntax.vim Patch 8.0.0559 -Problem: Setting ttytype to xxx does not always fail as expected. (Marvin +Problem: Setting 'ttytype' to xxx does not always fail as expected. (Marvin Schmidt) Solution: Catch both possible errors. (closes #1601) Files: src/testdir/test_options.vim @@ -17919,7 +17919,7 @@ Solution: Set qf_last to NULL. Files: src/quickfix.c Patch 8.0.0566 -Problem: Setting nocompatible for the tiny version moves the cursor. +Problem: Setting 'nocompatible' for the tiny version moves the cursor. Solution: Use another trick to skip commands when the +eval feature is present. (Christian Brabandt, closes #1630) Files: runtime/defaults.vim @@ -17938,7 +17938,7 @@ Files: src/testdir/test_goto.vim, src/normal.c Patch 8.0.0569 Problem: Bracketed paste is still enabled when executing a shell command. (Michael Smith) -Solution: Disable brackted paste when going into cooked mode. (closes #1638) +Solution: Disable bracketed paste when going into cooked mode. (closes #1638) Files: src/term.c Patch 8.0.0570 @@ -17978,7 +17978,7 @@ Solution: Make a copy of 'indentexpr'. Files: src/misc1.c, src/testdir/test_options.vim Patch 8.0.0576 (after 8.0.0570 and 8.0.0573) -Problem: Can't build when configure choses "install-sh". (Daniel Hahler) +Problem: Can't build when configure chooses "install-sh". (Daniel Hahler) Solution: Always use install-sh. Fix remaining use of mkinstalldirs. (closes #1647) Files: src/installman.sh, src/installml.sh, src/config.mk.in, diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 3871165730..8758dd2f75 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2017 Apr 20 +" Last Change: 2017 May 27 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -981,7 +981,7 @@ au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng " Innovation Data Processing au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat -au BufRead,BufNewFile upstream.log\c,upstream.*.log\c,*.upstream.log\c setf upstreamlog +au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog @@ -1419,7 +1419,7 @@ if has("fname_case") else au BufNewFile,BufRead *.pl call s:FTpl() endif -au BufNewFile,BufRead *.plx,*.al setf perl +au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6 func! s:FTpl() @@ -1807,6 +1807,9 @@ au BufNewFile,BufRead *.sa setf sather " Scala au BufNewFile,BufRead *.scala setf scala +" SBT - Scala Build Tool +au BufNewFile,BufRead *.sbt setf sbt + " Scilab au BufNewFile,BufRead *.sci,*.sce setf scilab diff --git a/runtime/ftplugin/sbt.vim b/runtime/ftplugin/sbt.vim new file mode 100644 index 0000000000..309d30e503 --- /dev/null +++ b/runtime/ftplugin/sbt.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin file +" Language: sbt +" Maintainer: Steven Dobay +" License: Same as Vim +" Last Change: 2017.04.30 +" ---------------------------------------------------------------------------- + +if exists('b:did_ftplugin') || &cp + finish +endif + +let b:did_ftplugin = 1 + +runtime! ftplugin/scala.vim + diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index aca110f504..ae4f4b53c4 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -3,10 +3,12 @@ " Maintainer: Christian Brabandt " Previous Maintainer: Peter Aronoff " Original Author: Nikolai Weibull -" Latest Revision: 2016-06-27 +" Latest Revision: 2017-05-02 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: +" 20170502: - get rid of buffer-shiftwidth function +" 20160912: - preserve indentation of here-doc blocks " 20160627: - detect heredocs correctly " 20160213: - detect function definition correctly " 20160202: - use shiftwidth() function @@ -33,15 +35,11 @@ endif let s:cpo_save = &cpo set cpo&vim -function s:buffer_shiftwidth() - return shiftwidth() -endfunction - let s:sh_indent_defaults = { - \ 'default': function('s:buffer_shiftwidth'), - \ 'continuation-line': function('s:buffer_shiftwidth'), - \ 'case-labels': function('s:buffer_shiftwidth'), - \ 'case-statements': function('s:buffer_shiftwidth'), + \ 'default': function('shiftwidth'), + \ 'continuation-line': function('shiftwidth'), + \ 'case-labels': function('shiftwidth'), + \ 'case-statements': function('shiftwidth'), \ 'case-breaks': 0 } function! s:indent_value(option) @@ -110,6 +108,9 @@ function! GetShIndent() let ind -= s:indent_value('case-breaks') elseif s:is_here_doc(line) let ind = 0 + " statements, executed within a here document. Keep the current indent + elseif match(map(synstack(v:lnum, 1), 'synIDattr(v:val, "name")'), '\c\mheredoc') > -1 + return indent(v:lnum) endif return ind diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim index 0150bb9623..fc6cc0a638 100644 --- a/runtime/indent/tex.vim +++ b/runtime/indent/tex.vim @@ -1,8 +1,8 @@ " Vim indent file " Language: LaTeX -" Maintainer: YiChao Zhou +" Maintainer: Yichao Zhou " Created: Sat, 16 Feb 2002 16:50:19 +0100 -" Version: 0.9.2 +" Version: 0.9.4 " Please email me if you found something I can do. Comments, bug report and " feature request are welcome. @@ -15,49 +15,53 @@ " 2005/06/15, Moshe Kaminsky " (*) New variables: " g:tex_items, g:tex_itemize_env, g:tex_noindent_env -" 2011/3/6, by Zhou YiChao +" 2011/3/6, by Yichao Zhou " (*) Don't change indentation of lines starting with '%' " I don't see any code with '%' and it doesn't work properly " so I add some code. " (*) New features: Add smartindent-like indent for "{}" and "[]". " (*) New variables: g:tex_indent_brace -" 2011/9/25, by Zhou Yichao +" 2011/9/25, by Yichao Zhou " (*) Bug fix: smartindent-like indent for "[]" " (*) New features: Align with "&". " (*) New variable: g:tex_indent_and. -" 2011/10/23 by Zhou Yichao +" 2011/10/23 by Yichao Zhou " (*) Bug fix: improve the smartindent-like indent for "{}" and " "[]". -" 2012/02/27 by Zhou Yichao +" 2012/02/27 by Yichao Zhou " (*) Bug fix: support default folding marker. " (*) Indent with "&" is not very handy. Make it not enable by " default. -" 2012/03/06 by Zhou Yichao +" 2012/03/06 by Yichao Zhou " (*) Modify "&" behavior and make it default again. Now "&" " won't align when there are more then one "&" in the previous " line. " (*) Add indent "\left(" and "\right)" " (*) Trust user when in "verbatim" and "lstlisting" -" 2012/03/11 by Zhou Yichao +" 2012/03/11 by Yichao Zhou " (*) Modify "&" so that only indent when current line start with " "&". -" 2012/03/12 by Zhou Yichao +" 2012/03/12 by Yichao Zhou " (*) Modify indentkeys. -" 2012/03/18 by Zhou Yichao +" 2012/03/18 by Yichao Zhou " (*) Add &cpo -" 2013/05/02 by Zhou Yichao +" 2013/05/02 by Yichao Zhou " (*) Fix problem about GetTeXIndent checker. Thank Albert Netymk " for reporting this. -" 2014/06/23 by Zhou Yichao +" 2014/06/23 by Yichao Zhou " (*) Remove the feature g:tex_indent_and because it is buggy. " (*) If there is not any obvious indentation hints, we do not " alert our user's current indentation. " (*) g:tex_indent_brace now only works if the open brace is the " last character of that line. -" 2014/08/03 by Zhou Yichao +" 2014/08/03 by Yichao Zhou " (*) Indent current line if last line has larger indentation -" 2014/08/09 by Zhou Yichao -" (*) Add missing return value for s:GetEndIndentation(...) +" 2016/11/08 by Yichao Zhou +" (*) Fix problems for \[ and \]. Thanks Bruno for reporting. +" 2017/04/30 by Yichao Zhou +" (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items +" Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs +" style) is supported. Thanks Miles Wheeler for reporting. " " }}} @@ -81,44 +85,44 @@ " % Example 2 " \tikzexternalize[ " prefix=tikz] -" +" " * g:tex_indent_items " " If this variable is set, item-environments are indented like Emacs does " it, i.e., continuation lines are indented with a shiftwidth. -" +" " NOTE: I've already set the variable below; delete the corresponding line " if you don't like this behaviour. " " Per default, it is unset. -" +" " set unset " ---------------------------------------------------------------- -" \begin{itemize} \begin{itemize} +" \begin{itemize} \begin{itemize} " \item blablabla \item blablabla -" bla bla bla bla bla bla +" bla bla bla bla bla bla " \item blablabla \item blablabla -" bla bla bla bla bla bla -" \end{itemize} \end{itemize} +" bla bla bla bla bla bla +" \end{itemize} \end{itemize} " " " * g:tex_items " -" A list of tokens to be considered as commands for the beginning of an item -" command. The tokens should be separated with '\|'. The initial '\' should +" A list of tokens to be considered as commands for the beginning of an item +" command. The tokens should be separated with '\|'. The initial '\' should " be escaped. The default is '\\bibitem\|\\item'. " " * g:tex_itemize_env -" -" A list of environment names, separated with '\|', where the items (item -" commands matching g:tex_items) may appear. The default is +" +" A list of environment names, separated with '\|', where the items (item +" commands matching g:tex_items) may appear. The default is " 'itemize\|description\|enumerate\|thebibliography'. " " * g:tex_noindent_env " -" A list of environment names. separated with '\|', where no indentation is +" A list of environment names. separated with '\|', where no indentation is " required. The default is 'document\|verbatim'. -" }}} +" }}} " Only define the function once if exists("b:did_indent") @@ -146,7 +150,7 @@ if g:tex_indent_items let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography' endif if !exists('g:tex_items') - let g:tex_items = '\\bibitem\|\\item' + let g:tex_items = '\\bibitem\|\\item' endif else let g:tex_items = '' @@ -177,7 +181,7 @@ function! GetTeXIndent() " {{{ " At the start of the file use zero indent. if lnum == 0 - return 0 + return 0 endif let line = substitute(getline(lnum), '\s*%.*', '','g') " last line @@ -191,9 +195,9 @@ function! GetTeXIndent() " {{{ return indent(v:lnum) end endif - + if lnum == 0 - return 0 + return 0 endif let ind = indent(lnum) @@ -206,12 +210,14 @@ function! GetTeXIndent() " {{{ " Add a 'shiftwidth' after beginning of environments. " Don't add it for \begin{document} and \begin{verbatim} - ""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' + " if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' " LH modification : \begin does not always start a line " ZYC modification : \end after \begin won't cause wrong indent anymore - if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env - let ind = ind + &sw - let stay = 0 + if line =~ '\\begin{.*}' + if line !~ g:tex_noindent_env + let ind = ind + &sw + let stay = 0 + endif if g:tex_indent_items " Add another sw for item-environments @@ -245,29 +251,27 @@ function! GetTeXIndent() " {{{ endif if g:tex_indent_brace - let char = line[strlen(line)-1] - if char == '[' || char == '{' + if line =~ '[[{]$' let ind += &sw let stay = 0 endif - let cind = indent(v:lnum) - let char = cline[cind] - if (char == ']' || char == '}') && - \ s:CheckPairedIsLastCharacter(v:lnum, cind) + if cline =~ '^\s*\\\?[\]}]' && s:CheckPairedIsLastCharacter(v:lnum, indent(v:lnum)) let ind -= &sw let stay = 0 endif - for i in range(indent(lnum)+1, strlen(line)-1) - let char = line[i] - if char == ']' || char == '}' - if s:CheckPairedIsLastCharacter(lnum, i) - let ind -= &sw - let stay = 0 + if line !~ '^\s*\\\?[\]}]' + for i in range(indent(lnum)+1, strlen(line)-1) + let char = line[i] + if char == ']' || char == '}' + if s:CheckPairedIsLastCharacter(lnum, i) + let ind -= &sw + let stay = 0 + endif endif - endif - endfor + endfor + endif endif " Special treatment for 'item' @@ -309,12 +313,12 @@ function! s:GetLastBeginIndentation(lnum) " {{{ let matchend -= 1 endif if matchend == 0 - if line =~ g:tex_itemize_env - return indent(lnum) + 2 * &sw - endif if line =~ g:tex_noindent_env return indent(lnum) endif + if line =~ g:tex_itemize_env + return indent(lnum) + 2 * &sw + endif return indent(lnum) + &sw endif endfor @@ -348,12 +352,15 @@ endfunction " Most of the code is from matchparen.vim function! s:CheckPairedIsLastCharacter(lnum, col) "{{{ - " Get the character under the cursor and check if it's in 'matchpairs'. let c_lnum = a:lnum let c_col = a:col+1 + let line = getline(c_lnum) + if line[c_col-1] == '\' + let c_col = c_col + 1 + endif + let c = line[c_col-1] - let c = getline(c_lnum)[c_col-1] let plist = split(&matchpairs, '.\zs[:,]') let i = index(plist, c) if i < 0 diff --git a/runtime/pack/dist/opt/matchit/doc/matchit.txt b/runtime/pack/dist/opt/matchit/doc/matchit.txt index 935370fd40..ea6fd1184e 100644 --- a/runtime/pack/dist/opt/matchit/doc/matchit.txt +++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt @@ -4,7 +4,7 @@ For instructions on installing this file, type :help matchit-install inside Vim. -For Vim version 6.3. Last change: 2016 Mar 28 +For Vim version 6.3. Last change: 2017 May 14 VIM REFERENCE MANUAL by Benji Fisher @@ -242,7 +242,7 @@ Examples: In LaTeX, since "%" is used as the comment character, you can > :let b:match_skip = 'r:%' < Unfortunately, this will skip anything after "\%", an escaped "%". To - allow for this, and also "\\%" (an excaped backslash followed by the + allow for this, and also "\\%" (an escaped backslash followed by the comment character) you can > :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%' < @@ -392,7 +392,8 @@ a while. Moral: if a bug (known or not) bothers you, let me know. The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may have undesired effects in Select mode |Select-mode-mapping|. At least, if you want to replace the selection with any character in "ag%[]" there will be a -pause of |'updatetime'| first. +pause of |'updatetime'| first. E.g., "yV%" would normally work linewise, but +the plugin mapping makes it characterwise. It would be nice if "\0" were recognized as the entire pattern. That is, it would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1". I may diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 16c7ce4d92..f659a87b71 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2016 Nov 18 +" Last Change: 2017 Apr 30 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -311,44 +311,32 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX endif - syn keyword cConstant FLT_RADIX FLT_ROUNDS - syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON - syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON - syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON - syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP - syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP - syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP - syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP - syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP - syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP - syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL - syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY - syn keyword cConstant LC_NUMERIC LC_TIME - syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN - syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM + syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON + syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP + syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP + syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP HUGE_VAL CLOCKS_PER_SEC NULL LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY + syn keyword cConstant LC_NUMERIC LC_TIME SIG_DFL SIG_ERR SIG_IGN SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM " Add POSIX signals as well... - syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP - syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV - syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU - syn keyword cConstant SIGUSR1 SIGUSR2 - syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF - syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam - syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET - syn keyword cConstant TMP_MAX stderr stdin stdout - syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX + syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV + syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 + syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam + syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX " POSIX 2001 - syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG - syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ + syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ " non-POSIX signals syn keyword cConstant SIGWINCH SIGINFO - " Add POSIX errors as well - syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY - syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT - syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR - syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV - syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS - syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM - syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV + " Add POSIX errors as well. List comes from: + " http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html + syn keyword cConstant E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF + syn keyword cConstant EBADMSG EBUSY ECANCELED ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK + syn keyword cConstant EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTUNREACH EIDRM EILSEQ + syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE + syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA + syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR + syn keyword cConstant ENOSTR ENOSYS ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP + syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO + syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT + syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV " math.h syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4 syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 diff --git a/runtime/syntax/sbt.vim b/runtime/syntax/sbt.vim new file mode 100644 index 0000000000..cbf73beafe --- /dev/null +++ b/runtime/syntax/sbt.vim @@ -0,0 +1,32 @@ +" Vim syntax file +" Language: sbt +" Maintainer: Steven Dobay +" Last Change: 2017.04.30 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/scala.vim + +syn region sbtString start="\"[^"]" skip="\\\"" end="\"" contains=sbtStringEscape +syn match sbtStringEscape "\\u[0-9a-fA-F]\{4}" contained +syn match sbtStringEscape "\\[nrfvb\\\"]" contained + +syn match sbtIdentitifer "^\S\+\ze\s*\(:=\|++=\|+=\|<<=\|<+=\)" +syn match sbtBeginningSeq "^[Ss]eq\>" + +syn match sbtSpecial "\(:=\|++=\|+=\|<<=\|<+=\)" + +syn match sbtLineComment "//.*" +syn region sbtComment start="/\*" end="\*/" +syn region sbtDocComment start="/\*\*" end="\*/" keepend + +hi link sbtString String +hi link sbtIdentitifer Keyword +hi link sbtBeginningSeq Keyword +hi link sbtSpecial Special +hi link sbtComment Comment +hi link sbtLineComment Comment +hi link sbtDocComment Comment + From 6dd4a53502fb4ec1b66104eab1805e7254ad9e41 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 28 May 2017 07:56:36 +0200 Subject: [PATCH 02/26] patch 8.0.0605: the quickfix cached buffer may become invalid Problem: The buffer that quickfix caches for performance may become invalid. (Daniel Hahler) Solution: Reset qf_last_bufref in qf_init_ext(). (Daniel Hahler, closes #1728, closes #1676) --- src/quickfix.c | 18 +++++++++++------- src/version.c | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/quickfix.c b/src/quickfix.c index 9626cfa430..ce21661a65 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -157,6 +157,13 @@ static qf_info_T *ll_get_or_alloc_list(win_T *); */ #define GET_LOC_LIST(wp) (IS_LL_WINDOW(wp) ? wp->w_llist_ref : wp->w_llist) +/* + * Looking up a buffer can be slow if there are many. Remember the last one + * to make this a lot faster if there are multiple matches in the same file. + */ +static char_u *qf_last_bufname = NULL; +static bufref_T qf_last_bufref = {NULL, 0}; + /* * Read the errorfile "efile" into memory, line by line, building the error * list. Set the error list's title to qf_title. @@ -1151,6 +1158,10 @@ qf_init_ext( int retval = -1; /* default: return error flag */ int status; + /* Do not used the cached buffer, it may have been wiped out. */ + vim_free(qf_last_bufname); + qf_last_bufname = NULL; + vim_memset(&state, 0, sizeof(state)); vim_memset(&fields, 0, sizeof(fields)); #ifdef FEAT_MBYTE @@ -1659,13 +1670,6 @@ copy_loclist(win_T *from, win_T *to) to->w_llist->qf_curlist = qi->qf_curlist; /* current list */ } -/* - * Looking up a buffer can be slow if there are many. Remember the last one - * to make this a lot faster if there are multiple matches in the same file. - */ -static char_u *qf_last_bufname = NULL; -static bufref_T qf_last_bufref = {NULL, 0}; - /* * Get buffer number for file "directory/fname". * Also sets the b_has_qf_entry flag. diff --git a/src/version.c b/src/version.c index bc80ace741..2c5aa06fde 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 605, /**/ 604, /**/ From 6e62da3e14d32f76f60d5cc8b267059923842f17 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 28 May 2017 08:16:25 +0200 Subject: [PATCH 03/26] patch 8.0.0606: cannot set the context for a specified quickfix list Problem: Cannot set the context for a specified quickfix list. Solution: Use the list index instead of the current list. (Yegappan Lakshmanan) --- src/quickfix.c | 8 +++--- src/testdir/test_quickfix.vim | 47 +++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/quickfix.c b/src/quickfix.c index ce21661a65..6de55f75dc 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -4881,7 +4881,9 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action) /* Use the specified quickfix/location list */ if (di->di_tv.v_type == VAR_NUMBER) { - qf_idx = di->di_tv.vval.v_number - 1; + /* for zero use the current list */ + if (di->di_tv.vval.v_number != 0) + qf_idx = di->di_tv.vval.v_number - 1; if (qf_idx < 0 || qf_idx >= qi->qf_listcount) return FAIL; } @@ -4912,11 +4914,11 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action) if ((di = dict_find(what, (char_u *)"context", -1)) != NULL) { typval_T *ctx; - free_tv(qi->qf_lists[qi->qf_curlist].qf_ctx); + free_tv(qi->qf_lists[qf_idx].qf_ctx); ctx = alloc_tv(); if (ctx != NULL) copy_tv(&di->di_tv, ctx); - qi->qf_lists[qi->qf_curlist].qf_ctx = ctx; + qi->qf_lists[qf_idx].qf_ctx = ctx; } return retval; diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index f1fd3c97a1..51f6a6f7ce 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -1804,6 +1804,37 @@ func Xproperty_tests(cchar) call setloclist(0, [], 'f') call assert_equal({}, getloclist(0, {'context':1})) endif + + " Test for changing the context of previous quickfix lists + call g:Xsetlist([], 'f') + Xexpr "One" + Xexpr "Two" + Xexpr "Three" + call g:Xsetlist([], ' ', {'context' : [1], 'nr' : 1}) + call g:Xsetlist([], ' ', {'context' : [2], 'nr' : 2}) + " Also, check for setting the context using quickfix list number zero. + call g:Xsetlist([], ' ', {'context' : [3], 'nr' : 0}) + call test_garbagecollect_now() + let l = g:Xgetlist({'nr' : 1, 'context' : 1}) + call assert_equal([1], l.context) + let l = g:Xgetlist({'nr' : 2, 'context' : 1}) + call assert_equal([2], l.context) + let l = g:Xgetlist({'nr' : 3, 'context' : 1}) + call assert_equal([3], l.context) + + " Test for changing the context through reference and for garbage + " collection of quickfix context + let l = ["red"] + call g:Xsetlist([], ' ', {'context' : l}) + call add(l, "blue") + let x = g:Xgetlist({'context' : 1}) + call add(x.context, "green") + call assert_equal(["red", "blue", "green"], l) + call assert_equal(["red", "blue", "green"], x.context) + unlet l + call test_garbagecollect_now() + let m = g:Xgetlist({'context' : 1}) + call assert_equal(["red", "blue", "green"], m.context) endfunc func Test_qf_property() @@ -2073,3 +2104,19 @@ func Test_qf_free() call XfreeTests('c') call XfreeTests('l') endfunc + +" Test for buffer overflow when parsing lines and adding new entries to +" the quickfix list. +func Test_bufoverflow() + set efm=%f:%l:%m + cgetexpr ['File1:100:' . repeat('x', 1025)] + + set efm=%+GCompiler:\ %.%#,%f:%l:%m + cgetexpr ['Compiler: ' . repeat('a', 1015), 'File1:10:Hello World'] + + set efm=%DEntering\ directory\ %f,%f:%l:%m + cgetexpr ['Entering directory ' . repeat('a', 1006), + \ 'File1:10:Hello World'] + set efm&vim +endfunc + diff --git a/src/version.c b/src/version.c index 2c5aa06fde..0daa3497d6 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 606, /**/ 605, /**/ From 45e5fd135da5710f24a1acc142692f120f8b0b78 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 14:58:02 +0200 Subject: [PATCH 04/26] patch 8.0.0607: after :bwipe + :new bufref might still be valid Problem: When creating a bufref, then using :bwipe and :new it might get the same memory and bufref_valid() returns true. Solution: Add br_fnum to check the buffer number didn't change. --- src/buffer.c | 19 ++++++++++++------- src/globals.h | 2 +- src/if_py_both.h | 6 +++--- src/quickfix.c | 6 +++--- src/structs.h | 4 +++- src/version.c | 2 ++ 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 83d74a3795..a57d2f6435 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -372,18 +372,23 @@ open_buffer( set_bufref(bufref_T *bufref, buf_T *buf) { bufref->br_buf = buf; + bufref->br_fnum = buf->b_fnum; bufref->br_buf_free_count = buf_free_count; } /* - * Return TRUE if "bufref->br_buf" points to a valid buffer. + * Return TRUE if "bufref->br_buf" points to the same buffer as when + * set_bufref() was called and it is a valid buffer. * Only goes through the buffer list if buf_free_count changed. + * Also checks if b_fnum is still the same, a :bwipe followed by :new might get + * the same allocated memory, but it's a different buffer. */ int bufref_valid(bufref_T *bufref) { return bufref->br_buf_free_count == buf_free_count - ? TRUE : buf_valid(bufref->br_buf); + ? TRUE : buf_valid(bufref->br_buf) + && bufref->br_fnum == bufref->br_buf->b_fnum; } /* @@ -2261,14 +2266,14 @@ free_buf_options( } /* - * get alternate file n - * set linenr to lnum or altfpos.lnum if lnum == 0 - * also set cursor column to altfpos.col if 'startofline' is not set. + * Get alternate file "n". + * Set linenr to "lnum" or altfpos.lnum if "lnum" == 0. + * Also set cursor column to altfpos.col if 'startofline' is not set. * if (options & GETF_SETMARK) call setpcmark() * if (options & GETF_ALT) we are jumping to an alternate file. * if (options & GETF_SWITCH) respect 'switchbuf' settings when jumping * - * return FAIL for failure, OK for success + * Return FAIL for failure, OK for success. */ int buflist_getfile( @@ -2999,7 +3004,7 @@ buflist_findlnum(buf_T *buf) #if defined(FEAT_LISTCMDS) || defined(PROTO) /* - * List all know file names (for :files and :buffers command). + * List all known file names (for :files and :buffers command). */ void buflist_list(exarg_T *eap) diff --git a/src/globals.h b/src/globals.h index 1d67b0d7af..7bc5471769 100644 --- a/src/globals.h +++ b/src/globals.h @@ -385,7 +385,7 @@ EXTERN int keep_filetype INIT(= FALSE); /* value for did_filetype when /* When deleting the current buffer, another one must be loaded. If we know * which one is preferred, au_new_curbuf is set to it */ -EXTERN bufref_T au_new_curbuf INIT(= {NULL COMMA 0}); +EXTERN bufref_T au_new_curbuf INIT(= {NULL COMMA 0 COMMA 0}); /* When deleting a buffer/window and autocmd_busy is TRUE, do not free the * buffer/window. but link it in the list starting with diff --git a/src/if_py_both.h b/src/if_py_both.h index 78c70e700b..b6f232e495 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -4311,7 +4311,7 @@ restore_win_for_buf( static int SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change) { - bufref_T save_curbuf = {NULL, 0}; + bufref_T save_curbuf = {NULL, 0, 0}; win_T *save_curwin = NULL; tabpage_T *save_curtab = NULL; @@ -4415,7 +4415,7 @@ SetBufferLineList( PyObject *list, PyInt *len_change) { - bufref_T save_curbuf = {NULL, 0}; + bufref_T save_curbuf = {NULL, 0, 0}; win_T *save_curwin = NULL; tabpage_T *save_curtab = NULL; @@ -4616,7 +4616,7 @@ SetBufferLineList( static int InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change) { - bufref_T save_curbuf = {NULL, 0}; + bufref_T save_curbuf = {NULL, 0, 0}; win_T *save_curwin = NULL; tabpage_T *save_curtab = NULL; diff --git a/src/quickfix.c b/src/quickfix.c index 6de55f75dc..e330e6e9be 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -161,8 +161,8 @@ static qf_info_T *ll_get_or_alloc_list(win_T *); * Looking up a buffer can be slow if there are many. Remember the last one * to make this a lot faster if there are multiple matches in the same file. */ -static char_u *qf_last_bufname = NULL; -static bufref_T qf_last_bufref = {NULL, 0}; +static char_u *qf_last_bufname = NULL; +static bufref_T qf_last_bufref = {NULL, 0, 0}; /* * Read the errorfile "efile" into memory, line by line, building the error @@ -2732,7 +2732,7 @@ qf_history(exarg_T *eap) } /* - * Free error list "idx". + * Free all the entries in the error list "idx". */ static void qf_free(qf_info_T *qi, int idx) diff --git a/src/structs.h b/src/structs.h index 0175017423..d79b2253f7 100644 --- a/src/structs.h +++ b/src/structs.h @@ -69,11 +69,13 @@ typedef struct frame_S frame_T; typedef int scid_T; /* script ID */ typedef struct file_buffer buf_T; /* forward declaration */ -/* Reference to a buffer that stores the value of buf_free_count. +/* + * Reference to a buffer that stores the value of buf_free_count. * bufref_valid() only needs to check "buf" when the count differs. */ typedef struct { buf_T *br_buf; + int br_fnum; int br_buf_free_count; } bufref_T; diff --git a/src/version.c b/src/version.c index 0daa3497d6..e96a388e20 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 607, /**/ 606, /**/ From a3921f48c6b31a035c80fda49925dd3b42df0dec Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 15:30:34 +0200 Subject: [PATCH 05/26] patch 8.0.0608: cannot manipulate other than the current quickfix list Problem: Cannot manipulate other than the current quickfix list. Solution: Pass the list index to quickfix functions. (Yegappan Lakshmanan) --- src/quickfix.c | 66 +++++++++++++++++++++++++++++--------------------- src/version.c | 2 ++ 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/quickfix.c b/src/quickfix.c index e330e6e9be..b1a5ebdc1f 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -118,10 +118,10 @@ struct efm_S static efm_T *fmt_start = NULL; /* cached across qf_parse_line() calls */ static int qf_init_ext(qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title, char_u *enc); -static void qf_store_title(qf_info_T *qi, char_u *title); +static void qf_store_title(qf_info_T *qi, int qf_idx, char_u *title); static void qf_new_list(qf_info_T *qi, char_u *qf_title); static void ll_free_all(qf_info_T **pqi); -static int qf_add_entry(qf_info_T *qi, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid); +static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid); static qf_info_T *ll_new_list(void); static void qf_free(qf_info_T *qi, int idx); static char_u *qf_types(int, int); @@ -1277,6 +1277,7 @@ qf_init_ext( continue; if (qf_add_entry(qi, + qi->qf_curlist, qi->qf_directory, (*fields.namebuf || qi->qf_directory != NULL) ? fields.namebuf @@ -1344,13 +1345,13 @@ qf_init_end: } static void -qf_store_title(qf_info_T *qi, char_u *title) +qf_store_title(qf_info_T *qi, int qf_idx, char_u *title) { if (title != NULL) { char_u *p = alloc((int)STRLEN(title) + 2); - qi->qf_lists[qi->qf_curlist].qf_title = p; + qi->qf_lists[qf_idx].qf_title = p; if (p != NULL) sprintf((char *)p, ":%s", (char *)title); } @@ -1386,7 +1387,7 @@ qf_new_list(qf_info_T *qi, char_u *qf_title) else qi->qf_curlist = qi->qf_listcount++; vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T))); - qf_store_title(qi, qf_title); + qf_store_title(qi, qi->qf_curlist, qf_title); } /* @@ -1438,6 +1439,7 @@ qf_free_all(win_T *wp) static int qf_add_entry( qf_info_T *qi, /* quickfix list */ + int qf_idx, /* list index */ char_u *dir, /* optional directory name */ char_u *fname, /* file name or NULL */ int bufnum, /* buffer number or zero */ @@ -1488,13 +1490,13 @@ qf_add_entry( qfp->qf_type = type; qfp->qf_valid = valid; - lastp = &qi->qf_lists[qi->qf_curlist].qf_last; - if (qi->qf_lists[qi->qf_curlist].qf_count == 0) + lastp = &qi->qf_lists[qf_idx].qf_last; + if (qi->qf_lists[qf_idx].qf_count == 0) /* first element in the list */ { - qi->qf_lists[qi->qf_curlist].qf_start = qfp; - qi->qf_lists[qi->qf_curlist].qf_ptr = qfp; - qi->qf_lists[qi->qf_curlist].qf_index = 0; + qi->qf_lists[qf_idx].qf_start = qfp; + qi->qf_lists[qf_idx].qf_ptr = qfp; + qi->qf_lists[qf_idx].qf_index = 0; qfp->qf_prev = NULL; } else @@ -1505,13 +1507,13 @@ qf_add_entry( qfp->qf_next = NULL; qfp->qf_cleared = FALSE; *lastp = qfp; - ++qi->qf_lists[qi->qf_curlist].qf_count; - if (qi->qf_lists[qi->qf_curlist].qf_index == 0 && qfp->qf_valid) + ++qi->qf_lists[qf_idx].qf_count; + if (qi->qf_lists[qf_idx].qf_index == 0 && qfp->qf_valid) /* first valid entry */ { - qi->qf_lists[qi->qf_curlist].qf_index = - qi->qf_lists[qi->qf_curlist].qf_count; - qi->qf_lists[qi->qf_curlist].qf_ptr = qfp; + qi->qf_lists[qf_idx].qf_index = + qi->qf_lists[qf_idx].qf_count; + qi->qf_lists[qf_idx].qf_ptr = qfp; } return OK; @@ -1628,6 +1630,7 @@ copy_loclist(win_T *from, win_T *to) ++i, from_qfp = from_qfp->qf_next) { if (qf_add_entry(to->w_llist, + to->w_llist->qf_curlist, NULL, NULL, 0, @@ -4240,6 +4243,7 @@ ex_vimgrep(exarg_T *eap) * dummy buffer, unless duplicate_name is set, then the * buffer will be wiped out below. */ if (qf_add_entry(qi, + qi->qf_curlist, NULL, /* dir */ fname, duplicate_name ? 0 : buf->b_fnum, @@ -4744,6 +4748,7 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict) static int qf_add_entries( qf_info_T *qi, + int qf_idx, list_T *list, char_u *title, int action) @@ -4762,18 +4767,21 @@ qf_add_entries( int retval = OK; int did_bufnr_emsg = FALSE; - if (action == ' ' || qi->qf_curlist == qi->qf_listcount) + if (action == ' ' || qf_idx == qi->qf_listcount) + { /* make place for a new list */ qf_new_list(qi, title); + qf_idx = qi->qf_curlist; + } #ifdef FEAT_WINDOWS - else if (action == 'a' && qi->qf_lists[qi->qf_curlist].qf_count > 0) + else if (action == 'a' && qi->qf_lists[qf_idx].qf_count > 0) /* Adding to existing list, use last entry. */ - old_last = qi->qf_lists[qi->qf_curlist].qf_last; + old_last = qi->qf_lists[qf_idx].qf_last; #endif else if (action == 'r') { - qf_free(qi, qi->qf_curlist); - qf_store_title(qi, title); + qf_free(qi, qf_idx); + qf_store_title(qi, qf_idx, title); } for (li = list->lv_first; li != NULL; li = li->li_next) @@ -4819,6 +4827,7 @@ qf_add_entries( valid = (int)get_dict_number(d, (char_u *)"valid"); status = qf_add_entry(qi, + qf_idx, NULL, /* dir */ filename, bufnum, @@ -4843,17 +4852,17 @@ qf_add_entries( } } - if (qi->qf_lists[qi->qf_curlist].qf_index == 0) + if (qi->qf_lists[qf_idx].qf_index == 0) /* no valid entry */ - qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + qi->qf_lists[qf_idx].qf_nonevalid = TRUE; else - qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; + qi->qf_lists[qf_idx].qf_nonevalid = FALSE; if (action != 'a') { - qi->qf_lists[qi->qf_curlist].qf_ptr = - qi->qf_lists[qi->qf_curlist].qf_start; - if (qi->qf_lists[qi->qf_curlist].qf_count > 0) - qi->qf_lists[qi->qf_curlist].qf_index = 1; + qi->qf_lists[qf_idx].qf_ptr = + qi->qf_lists[qf_idx].qf_start; + if (qi->qf_lists[qf_idx].qf_count > 0) + qi->qf_lists[qf_idx].qf_index = 1; } #ifdef FEAT_WINDOWS @@ -5024,7 +5033,7 @@ set_errorlist( else if (what != NULL) retval = qf_set_properties(qi, what, action); else - retval = qf_add_entries(qi, list, title, action); + retval = qf_add_entries(qi, qi->qf_curlist, list, title, action); return retval; } @@ -5387,6 +5396,7 @@ ex_helpgrep(exarg_T *eap) line[--l] = NUL; if (qf_add_entry(qi, + qi->qf_curlist, NULL, /* dir */ fnames[fi], 0, diff --git a/src/version.c b/src/version.c index e96a388e20..70d6201945 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 608, /**/ 607, /**/ From 28a8193e3113f676f89fb6312b099d849df881d3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 15:33:48 +0200 Subject: [PATCH 06/26] patch 8.0.0609: some people still don't know how to quit Problem: For some people the hint about quitting is not sufficient. Solution: Put separately. Also use ":qa!" to get out even when there are changes. --- src/normal.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/normal.c b/src/normal.c index 9a12267720..7b3f94af52 100644 --- a/src/normal.c +++ b/src/normal.c @@ -8986,7 +8986,7 @@ nv_esc(cmdarg_T *cap) #endif && !VIsual_active && no_reason) - MSG(_("Type :quit to exit Vim")); + MSG(_("Type :qa! and press to abandon all changes and exit Vim")); /* Don't reset "restart_edit" when 'insertmode' is set, it won't be * set again below when halfway a mapping. */ diff --git a/src/version.c b/src/version.c index 70d6201945..8c5679e543 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 609, /**/ 608, /**/ From 4b974d54434b8020771be7225da94648e9ec961a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 15:37:46 +0200 Subject: [PATCH 07/26] patch 8.0.0610: the screen is redrawn when default 'background' is detected Problem: The screen is redrawn when t_BG is set and used to detect the value for 'background'. Solution: Don't redraw when the value of 'background' didn't change. --- src/term.c | 18 ++++++++++++------ src/version.c | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/term.c b/src/term.c index d23d8cba61..fb6b59e962 100644 --- a/src/term.c +++ b/src/term.c @@ -4385,14 +4385,20 @@ check_termcode( if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0 && tp[j + 11] == '/' && tp[j + 16] == '/' && !option_was_set((char_u *)"bg")) - {/* TODO: don't set option when already the right value */ + { + char *newval = (3 * '6' < tp[j+7] + tp[j+12] + + tp[j+17]) ? "light" : "dark"; + LOG_TR("Received RBG"); rbg_status = RBG_GOT; - set_option_value((char_u *)"bg", 0L, (char_u *)( - (3 * '6' < tp[j+7] + tp[j+12] + tp[j+17]) - ? "light" : "dark"), 0); - reset_option_was_set((char_u *)"bg"); - redraw_asap(CLEAR); + if (STRCMP(p_bg, newval) != 0) + { + /* value differs, apply it */ + set_option_value((char_u *)"bg", 0L, + (char_u *)newval, 0); + reset_option_was_set((char_u *)"bg"); + redraw_asap(CLEAR); + } } /* got finished code: consume it */ diff --git a/src/version.c b/src/version.c index 8c5679e543..bb3581c0bf 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 610, /**/ 609, /**/ From 976787d1f31451ca7a88e774a03e6c24ddc67876 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 15:45:50 +0200 Subject: [PATCH 08/26] patch 8.0.0611: the screen is not redrawn after sending t_u7 Problem: When t_u7 is sent a few characters in the second screen line are overwritten and not redrawn later. (Rastislav Barlik) Solution: Move redrawing the screen to after overwriting the characters. --- src/main.c | 8 +++++--- src/term.c | 4 ++++ src/version.c | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 883c9cc23e..ebd1ec3333 100644 --- a/src/main.c +++ b/src/main.c @@ -783,6 +783,11 @@ vim_main2(void) if (params.n_commands > 0) exe_commands(¶ms); +#if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE) + /* Must be done before redrawing, puts a few characters on the screen. */ + may_req_ambiguous_char_width(); +#endif + RedrawingDisabled = 0; redraw_all_later(NOT_VALID); no_wait_return = FALSE; @@ -796,9 +801,6 @@ vim_main2(void) * argument doesn't make it appear in the shell Vim was started from. */ may_req_termresponse(); -# if defined(FEAT_MBYTE) - may_req_ambiguous_char_width(); -# endif may_req_bg_color(); #endif diff --git a/src/term.c b/src/term.c index fb6b59e962..6dd59ad339 100644 --- a/src/term.c +++ b/src/term.c @@ -3333,9 +3333,13 @@ may_req_ambiguous_char_width(void) out_str(T_U7); u7_status = U7_SENT; out_flush(); + + /* This overwrites a few characters on the screen, a redraw is needed + * after this. Clear them out for now. */ term_windgoto(1, 0); out_str((char_u *)" "); term_windgoto(0, 0); + /* check for the characters now, otherwise they might be eaten by * get_keystroke() */ out_flush(); diff --git a/src/version.c b/src/version.c index bb3581c0bf..2d91a72598 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 611, /**/ 610, /**/ From ce876aaa9a250a5a0d0e34b3a2625e51cf9bf5bb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 17:47:42 +0200 Subject: [PATCH 09/26] patch 8.0.0612: pack dirs are added to 'runtimepath' too late Problem: Package directories are added to 'runtimepath' only after loading non-package plugins. Solution: Split off the code to add package directories to 'runtimepath'. (Ingo Karkat, closes #1680) --- src/ex_cmds2.c | 32 +++++++++++++++++++++++--------- src/globals.h | 2 ++ src/main.c | 11 ++++++++++- src/proto/ex_cmds2.pro | 2 ++ src/testdir/test_startup.vim | 32 ++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 6 files changed, 71 insertions(+), 10 deletions(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 36ee57e8ec..225225a78c 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3633,27 +3633,41 @@ theend: vim_free(ffname); } -static int did_source_packages = FALSE; +/* + * Add all packages in the "start" directory to 'runtimepath'. + */ + void +add_pack_start_dirs(void) +{ + do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, + add_pack_plugin, &APP_ADD_DIR); +} + +/* + * Load plugins from all packages in the "start" directory. + */ + void +load_start_packages(void) +{ + did_source_packages = TRUE; + do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, + add_pack_plugin, &APP_LOAD); +} /* * ":packloadall" * Find plugins in the package directories and source them. - * "eap" is NULL when invoked during startup. */ void ex_packloadall(exarg_T *eap) { - if (!did_source_packages || (eap != NULL && eap->forceit)) + if (!did_source_packages || eap->forceit) { - did_source_packages = TRUE; - /* First do a round to add all directories to 'runtimepath', then load * the plugins. This allows for plugins to use an autoload directory * of another plugin. */ - do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, - add_pack_plugin, &APP_ADD_DIR); - do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, - add_pack_plugin, &APP_LOAD); + add_pack_start_dirs(); + load_start_packages(); } } diff --git a/src/globals.h b/src/globals.h index 7bc5471769..56df6d5083 100644 --- a/src/globals.h +++ b/src/globals.h @@ -326,6 +326,8 @@ EXTERN int garbage_collect_at_exit INIT(= FALSE); EXTERN scid_T current_SID INIT(= 0); #endif +EXTERN int did_source_packages INIT(= FALSE); + /* Magic number used for hashitem "hi_key" value indicating a deleted item. * Only the address is used. */ EXTERN char_u hash_removed; diff --git a/src/main.c b/src/main.c index ebd1ec3333..0c7aa98462 100644 --- a/src/main.c +++ b/src/main.c @@ -449,6 +449,12 @@ vim_main2(void) */ if (p_lpl) { + /* First add all package directories to 'runtimepath', so that their + * autoload directories can be found. Only if not done already with a + * :packloadall command. */ + if (!did_source_packages) + add_pack_start_dirs(); + # ifdef VMS /* Somehow VMS doesn't handle the "**". */ source_runtime((char_u *)"plugin/*.vim", DIP_ALL | DIP_NOAFTER); # else @@ -456,7 +462,10 @@ vim_main2(void) # endif TIME_MSG("loading plugins"); - ex_packloadall(NULL); + /* Only source "start" packages if not done already with a :packloadall + * command. */ + if (!did_source_packages) + load_start_packages(); TIME_MSG("loading packages"); # ifdef VMS /* Somehow VMS doesn't handle the "**". */ diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro index 4a40f0a767..e8d2814089 100644 --- a/src/proto/ex_cmds2.pro +++ b/src/proto/ex_cmds2.pro @@ -72,6 +72,8 @@ void ex_runtime(exarg_T *eap); int source_runtime(char_u *name, int flags); int do_in_path(char_u *path, char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie); int do_in_runtimepath(char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie); +void add_pack_start_dirs(void); +void load_start_packages(void); void ex_packloadall(exarg_T *eap); void ex_packadd(exarg_T *eap); void ex_options(exarg_T *eap); diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index bce431f7dd..08a107e815 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -61,6 +61,38 @@ func Test_after_comes_later() call delete('Xafter', 'rf') endfunc +func Test_pack_in_rtp_when_plugins_run() + if !has('packages') + return + endif + let before = [ + \ 'set nocp viminfo+=nviminfo', + \ 'set guioptions+=M', + \ 'let $HOME = "/does/not/exist"', + \ 'set loadplugins', + \ 'set rtp=Xhere', + \ 'set packpath=Xhere', + \ 'set nomore', + \ ] + let after = [ + \ 'quit', + \ ] + call mkdir('Xhere/plugin', 'p') + call writefile(['redir! > Xtestout', 'silent set runtimepath?', 'silent! call foo#Trigger()', 'redir END'], 'Xhere/plugin/here.vim') + call mkdir('Xhere/pack/foo/start/foobar/autoload', 'p') + call writefile(['function! foo#Trigger()', 'echo "autoloaded foo"', 'endfunction'], 'Xhere/pack/foo/start/foobar/autoload/foo.vim') + + if RunVim(before, after, '') + + let lines = filter(readfile('Xtestout'), '!empty(v:val)') + call assert_match('Xhere[/\\]pack[/\\]foo[/\\]start[/\\]foobar', get(lines, 0)) + call assert_match('autoloaded foo', get(lines, 1)) + endif + + call delete('Xtestout') + call delete('Xhere', 'rf') +endfunc + func Test_help_arg() if !has('unix') && has('gui') " this doesn't work with gvim on MS-Windows diff --git a/src/version.c b/src/version.c index 2d91a72598..91cd500526 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 612, /**/ 611, /**/ From 3e54569b17683318e0cb6693ab0024c2ad1e3e8f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 19:00:32 +0200 Subject: [PATCH 10/26] patch 8.0.0613: the conf filetype is used before ftdetect from packages Problem: The conf filetype detection is done before ftdetect scripts from packages that are added later. Solution: Add the FALLBACK argument to :setfiletype. (closes #1679, closes #1693) --- runtime/filetype.vim | 33 +++++++++++++++++++++------ src/Makefile | 1 + src/ex_docmd.c | 13 +++++++++-- src/testdir/test_alot.vim | 1 + src/testdir/test_filetype.vim | 43 +++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 6 files changed, 84 insertions(+), 9 deletions(-) create mode 100644 src/testdir/test_filetype.vim diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 8758dd2f75..9878236b62 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2017 May 27 +" Last Change: 2017 Jun 04 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1181,14 +1181,21 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown " Mason au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason -" Matlab or Objective C +" Mathematica, Matlab, Murphi or Objective C au BufNewFile,BufRead *.m call s:FTm() func! s:FTm() let n = 1 - while n < 10 + let saw_comment = 0 " Whether we've seen a multiline comment leader. + while n < 100 let line = getline(n) - if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)' + if line =~ '^\s*/\*' + " /* ... */ is a comment in Objective C and Murphi, so we can't conclude + " it's either of them yet, but track this as a hint in case we don't see + " anything more definitive. + let saw_comment = 1 + endif + if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|//\)' setf objc return endif @@ -1200,11 +1207,23 @@ func! s:FTm() setf mma return endif + if line =~ '^\c\s*\(\(type\|var\)\>\|--\)' + setf murphi + return + endif let n = n + 1 endwhile - if exists("g:filetype_m") + + if saw_comment + " We didn't see anything definitive, but this looks like either Objective C + " or Murphi based on the comment leader. Assume the former as it is more + " common. + setf objc + elseif exists("g:filetype_m") + " Use user specified default filetype for .m exe "setf " . g:filetype_m else + " Default is matlab setf matlab endif endfunc @@ -2777,12 +2796,12 @@ runtime! ftdetect/*.vim " state. augroup END -" Generic configuration file (check this last, it's just guessing!) +" Generic configuration file. Use FALLBACK, it's just guessing! au filetypedetect BufNewFile,BufRead,StdinReadPost * \ if !did_filetype() && expand("") !~ g:ft_ignore_pat \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#' \ || getline(4) =~ '^#' || getline(5) =~ '^#') | - \ setf conf | + \ setf FALLBACK conf | \ endif diff --git a/src/Makefile b/src/Makefile index ddb61dc08a..8fa004e8f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2133,6 +2133,7 @@ test_arglist \ test_feedkeys \ test_file_perm \ test_fileformat \ + test_filetype \ test_filter_cmd \ test_filter_map \ test_findfile \ diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 13d5fe495e..2c9c8782e7 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -12172,13 +12172,22 @@ ex_filetype(exarg_T *eap) } /* - * ":setfiletype {name}" + * ":setfiletype [FALLBACK] {name}" */ static void ex_setfiletype(exarg_T *eap) { if (!did_filetype) - set_option_value((char_u *)"filetype", 0L, eap->arg, OPT_LOCAL); + { + char_u *arg = eap->arg; + + if (STRNCMP(arg, "FALLBACK ", 9) == 0) + arg += 9; + + set_option_value((char_u *)"filetype", 0L, arg, OPT_LOCAL); + if (arg != eap->arg) + did_filetype = FALSE; + } } #endif diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim index e961e99451..fec22714e7 100644 --- a/src/testdir/test_alot.vim +++ b/src/testdir/test_alot.vim @@ -16,6 +16,7 @@ source test_expr.vim source test_feedkeys.vim source test_file_perm.vim source test_fileformat.vim +source test_filetype.vim source test_filter_cmd.vim source test_filter_map.vim source test_findfile.vim diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim new file mode 100644 index 0000000000..818603b180 --- /dev/null +++ b/src/testdir/test_filetype.vim @@ -0,0 +1,43 @@ +" Test :setfiletype + +func Test_detection() + filetype on + augroup filetypedetect + au BufNewFile,BufRead * call assert_equal(1, did_filetype()) + augroup END + new something.vim + call assert_equal('vim', &filetype) + + bwipe! + filetype off +endfunc + +func Test_conf_type() + filetype on + call writefile(['# some comment', 'must be conf'], 'Xfile') + augroup filetypedetect + au BufNewFile,BufRead * call assert_equal(0, did_filetype()) + augroup END + split Xfile + call assert_equal('conf', &filetype) + + bwipe! + call delete('Xfile') + filetype off +endfunc + +func Test_other_type() + filetype on + augroup filetypedetect + au BufNewFile,BufRead * call assert_equal(0, did_filetype()) + au BufNewFile,BufRead Xfile setf testfile + au BufNewFile,BufRead * call assert_equal(1, did_filetype()) + augroup END + call writefile(['# some comment', 'must be conf'], 'Xfile') + split Xfile + call assert_equal('testfile', &filetype) + + bwipe! + call delete('Xfile') + filetype off +endfunc diff --git a/src/version.c b/src/version.c index 91cd500526..f5b5732ad7 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 613, /**/ 612, /**/ From 863e80b4451b5102b41bebf9ddca3a420de746fa Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 20:30:00 +0200 Subject: [PATCH 11/26] patch 8.0.0614: float2nr() is not exactly right Problem: float2nr() is not exactly right. Solution: Make float2nr() more accurate. Turn test64 into a new style test. (Hirohito Higashi, closes #1688) --- src/Makefile | 2 +- src/evalfunc.c | 4 +- src/macros.h | 3 ++ src/testdir/Make_all.mak | 1 - src/testdir/Make_vms.mms | 2 +- src/testdir/test65.in | 95 --------------------------------- src/testdir/test65.ok | 73 ------------------------- src/testdir/test_float_func.vim | 47 ++++++++++++++++ src/testdir/test_vimscript.vim | 43 +++++++++++++++ src/version.c | 2 + 10 files changed, 99 insertions(+), 173 deletions(-) delete mode 100644 src/testdir/test65.in delete mode 100644 src/testdir/test65.ok diff --git a/src/Makefile b/src/Makefile index 8fa004e8f7..500b074300 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2087,7 +2087,7 @@ test1 \ test30 test31 test32 test33 test34 test36 test37 test38 test39 \ test40 test41 test42 test43 test44 test45 test48 test49 \ test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \ - test60 test64 test65 test66 test67 test68 test69 \ + test60 test64 test66 test67 test68 test69 \ test70 test72 test73 test74 test75 test77 test78 test79 \ test80 test82 test83 test84 test85 test86 test87 test88 \ test90 test91 test94 test95 test97 test98 test99 \ diff --git a/src/evalfunc.c b/src/evalfunc.c index b16b260829..60cd344243 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3352,9 +3352,9 @@ f_float2nr(typval_T *argvars, typval_T *rettv) if (get_float_arg(argvars, &f) == OK) { - if (f < -VARNUM_MAX) + if (f <= -VARNUM_MAX + DBL_EPSILON) rettv->vval.v_number = -VARNUM_MAX; - else if (f > VARNUM_MAX) + else if (f >= VARNUM_MAX - DBL_EPSILON) rettv->vval.v_number = VARNUM_MAX; else rettv->vval.v_number = (varnumber_T)f; diff --git a/src/macros.h b/src/macros.h index 8ebc8ceb81..d75d190723 100644 --- a/src/macros.h +++ b/src/macros.h @@ -364,6 +364,9 @@ # if !defined(NAN) # define NAN (INFINITY-INFINITY) # endif +# if !defined(DBL_EPSILON) +# define DBL_EPSILON 2.2204460492503131e-16 +# endif # endif #endif diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak index ce3936727b..2b78bf22bb 100644 --- a/src/testdir/Make_all.mak +++ b/src/testdir/Make_all.mak @@ -50,7 +50,6 @@ SCRIPTS_ALL = \ test57.out \ test60.out \ test64.out \ - test65.out \ test66.out \ test67.out \ test68.out \ diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index 4888b17819..b0c26aa8e0 100644 --- a/src/testdir/Make_vms.mms +++ b/src/testdir/Make_vms.mms @@ -87,7 +87,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \ test43.out test44.out test45.out \ test48.out test49.out test51.out test53.out test54.out \ test55.out test56.out test57.out test60.out \ - test64.out test65.out \ + test64.out \ test66.out test67.out test68.out test69.out \ test72.out test75.out \ test77a.out test78.out test79.out test80.out \ diff --git a/src/testdir/test65.in b/src/testdir/test65.in deleted file mode 100644 index ca53f27555..0000000000 --- a/src/testdir/test65.in +++ /dev/null @@ -1,95 +0,0 @@ -Test for floating point and logical operators. - -STARTTEST -:so small.vim -:if !has("float") -: e! test.ok -: wq! test.out -:endif -:" -:$put =printf('%f', 123.456) -:$put =printf('%e', 123.456) -:$put =printf('%g', 123.456) -:" check we don't crash on division by zero -:echo 1.0 / 0.0 -:$put ='+=' -:let v = 1.234 -:let v += 6.543 -:$put =printf('%g', v) -:let v = 1.234 -:let v += 5 -:$put =printf('%g', v) -:let a = 5 -:let a += 3.333 -:$put =string(a) -:$put ='==' -:let v = 1.234 -:$put =v == 1.234 -:$put =v == 1.2341 -:$put ='add-subtract' -:$put =printf('%g', 4 + 1.234) -:$put =printf('%g', 1.234 - 8) -:$put ='mult-div' -:$put =printf('%g', 4 * 1.234) -:$put =printf('%g', 4.0 / 1234) -:$put ='dict' -:$put =string({'x': 1.234, 'y': -2.0e20}) -:$put ='list' -:$put =string([-123.4, 2.0e-20]) -:$put ='abs' -:$put =printf('%d', abs(1456)) -:$put =printf('%d', abs(-4)) -:$put =printf('%d', abs([1, 2, 3])) -:$put =printf('%g', abs(14.56)) -:$put =printf('%g', abs(-54.32)) -:$put ='ceil' -:$put =printf('%g', ceil(1.456)) -:$put =printf('%g', ceil(-5.456)) -:$put =printf('%g', ceil(-4.000)) -:$put ='floor' -:$put =printf('%g', floor(1.856)) -:$put =printf('%g', floor(-5.456)) -:$put =printf('%g', floor(4.0)) -:$put ='log10' -:$put =printf('%g', log10(1000)) -:$put =printf('%g', log10(0.01000)) -:$put ='pow' -:$put =printf('%g', pow(3, 3.0)) -:$put =printf('%g', pow(2, 16)) -:$put ='round' -:$put =printf('%g', round(0.456)) -:$put =printf('%g', round(4.5)) -:$put =printf('%g', round(-4.50)) -:$put ='sqrt' -:$put =printf('%g', sqrt(100)) -:echo sqrt(-4.01) -:$put ='str2float' -:$put =printf('%g', str2float('1e40')) -:$put ='trunc' -:$put =printf('%g', trunc(1.456)) -:$put =printf('%g', trunc(-5.456)) -:$put =printf('%g', trunc(4.000)) -:$put ='float2nr' -:$put =float2nr(123.456) -:$put =float2nr(-123.456) -:$put ='AND' -:$put =and(127, 127) -:$put =and(127, 16) -:$put =and(127, 128) -:$put ='OR' -:$put =or(16, 7) -:$put =or(8, 7) -:$put =or(0, 123) -:$put ='XOR' -:$put =xor(127, 127) -:$put =xor(127, 16) -:$put =xor(127, 128) -:$put ='invert' -:$put =and(invert(127), 65535) -:$put =and(invert(16), 65535) -:$put =and(invert(128), 65535) -:$put =invert(1.0) -:/^Results/,$wq! test.out -ENDTEST - -Results of test65: diff --git a/src/testdir/test65.ok b/src/testdir/test65.ok deleted file mode 100644 index 7aac326058..0000000000 --- a/src/testdir/test65.ok +++ /dev/null @@ -1,73 +0,0 @@ -Results of test65: -123.456000 -1.234560e+02 -123.456 -+= -7.777 -6.234 -8.333 -== -1 -0 -add-subtract -5.234 --6.766 -mult-div -4.936 -0.003241 -dict -{'x': 1.234, 'y': -2.0e20} -list -[-123.4, 2.0e-20] -abs -1456 -4 --1 -14.56 -54.32 -ceil -2.0 --5.0 --4.0 -floor -1.0 --6.0 -4.0 -log10 -3.0 --2.0 -pow -27.0 -65536.0 -round -0.0 -5.0 --5.0 -sqrt -10.0 -str2float -1.0e40 -trunc -1.0 --5.0 -4.0 -float2nr -123 --123 -AND -127 -16 -0 -OR -23 -15 -123 -XOR -0 -111 -255 -invert -65408 -65519 -65407 -0 diff --git a/src/testdir/test_float_func.vim b/src/testdir/test_float_func.vim index de5de65573..32b985e1b8 100644 --- a/src/testdir/test_float_func.vim +++ b/src/testdir/test_float_func.vim @@ -224,6 +224,20 @@ func Test_str2float() call assert_fails("call str2float(function('string'))", 'E729:') endfunc +func Test_float2nr() + call assert_equal(1, float2nr(1.234)) + call assert_equal(123, float2nr(1.234e2)) + call assert_equal(12, float2nr(123.4e-1)) + let max_number = 1/0 + let min_number = -max_number + call assert_equal(max_number/2+1, float2nr(pow(2, 62))) + call assert_equal(max_number, float2nr(pow(2, 63))) + call assert_equal(max_number, float2nr(pow(2, 64))) + call assert_equal(min_number/2-1, float2nr(-pow(2, 62))) + call assert_equal(min_number, float2nr(-pow(2, 63))) + call assert_equal(min_number, float2nr(-pow(2, 64))) +endfunc + func Test_floor() call assert_equal('2.0', string(floor(2.0))) call assert_equal('2.0', string(floor(2.11))) @@ -282,3 +296,36 @@ func Test_isnan() call assert_equal(0, isnan([])) call assert_equal(0, isnan({})) endfunc + +" This was converted from test65 +func Test_float_misc() + call assert_equal('123.456000', printf('%f', 123.456)) + call assert_equal('1.234560e+02', printf('%e', 123.456)) + call assert_equal('123.456', printf('%g', 123.456)) + " += + let v = 1.234 + let v += 6.543 + call assert_equal('7.777', printf('%g', v)) + let v = 1.234 + let v += 5 + call assert_equal('6.234', printf('%g', v)) + let v = 5 + let v += 3.333 + call assert_equal('8.333', string(v)) + " == + let v = 1.234 + call assert_true(v == 1.234) + call assert_false(v == 1.2341) + " add-subtract + call assert_equal('5.234', printf('%g', 4 + 1.234)) + call assert_equal('-6.766', printf('%g', 1.234 - 8)) + " mult-div + call assert_equal('4.936', printf('%g', 4 * 1.234)) + call assert_equal('0.003241', printf('%g', 4.0 / 1234)) + " dict + call assert_equal("{'x': 1.234, 'y': -2.0e20}", string({'x': 1.234, 'y': -2.0e20})) + " list + call assert_equal('[-123.4, 2.0e-20]', string([-123.4, 2.0e-20])) +endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index ce28e82c64..f4d2cd03d5 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -1320,6 +1320,49 @@ func Test_script_emty_line_continuation() \ endfunc +"------------------------------------------------------------------------------- +" Test 97: bitwise functions {{{1 +"------------------------------------------------------------------------------- +func Test_bitwise_functions() + " and + call assert_equal(127, and(127, 127)) + call assert_equal(16, and(127, 16)) + call assert_equal(0, and(127, 128)) + call assert_fails("call and(1.0, 1)", 'E805:') + call assert_fails("call and([], 1)", 'E745:') + call assert_fails("call and({}, 1)", 'E728:') + call assert_fails("call and(1, 1.0)", 'E805:') + call assert_fails("call and(1, [])", 'E745:') + call assert_fails("call and(1, {})", 'E728:') + " or + call assert_equal(23, or(16, 7)) + call assert_equal(15, or(8, 7)) + call assert_equal(123, or(0, 123)) + call assert_fails("call or(1.0, 1)", 'E805:') + call assert_fails("call or([], 1)", 'E745:') + call assert_fails("call or({}, 1)", 'E728:') + call assert_fails("call or(1, 1.0)", 'E805:') + call assert_fails("call or(1, [])", 'E745:') + call assert_fails("call or(1, {})", 'E728:') + " xor + call assert_equal(0, xor(127, 127)) + call assert_equal(111, xor(127, 16)) + call assert_equal(255, xor(127, 128)) + call assert_fails("call xor(1.0, 1)", 'E805:') + call assert_fails("call xor([], 1)", 'E745:') + call assert_fails("call xor({}, 1)", 'E728:') + call assert_fails("call xor(1, 1.0)", 'E805:') + call assert_fails("call xor(1, [])", 'E745:') + call assert_fails("call xor(1, {})", 'E728:') + " invert + call assert_equal(65408, and(invert(127), 65535)) + call assert_equal(65519, and(invert(16), 65535)) + call assert_equal(65407, and(invert(128), 65535)) + call assert_fails("call invert(1.0)", 'E805:') + call assert_fails("call invert([])", 'E745:') + call assert_fails("call invert({})", 'E728:') +endfunc + "------------------------------------------------------------------------------- " Modelines {{{1 " vim: ts=8 sw=4 tw=80 fdm=marker diff --git a/src/version.c b/src/version.c index f5b5732ad7..d312148ee8 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 614, /**/ 613, /**/ From bf15b8d78b22661db8b19d662b62bb9a061cdd37 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 20:43:48 +0200 Subject: [PATCH 12/26] patch 8.0.0615: using % with :hardcopy wrongly escapes spaces Problem: Using % with :hardcopy wrongly escapes spaces. (Alexey Muranov) Solution: Expand % differently. (Christian Brabandt, closes #1682) --- src/ex_docmd.c | 1 + src/testdir/test_hardcopy.vim | 9 +++++++++ src/version.c | 2 ++ 3 files changed, 12 insertions(+) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 2c9c8782e7..bf340de405 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -5042,6 +5042,7 @@ expand_filename( && eap->cmdidx != CMD_lgrep && eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd + && eap->cmdidx != CMD_hardcopy #ifndef UNIX && !(eap->argt & NOSPC) #endif diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim index ea9790d134..2a316d4f0f 100644 --- a/src/testdir/test_hardcopy.vim +++ b/src/testdir/test_hardcopy.vim @@ -60,3 +60,12 @@ func Test_with_syntax() set printoptions& endif endfunc + +func Test_fname_with_spaces() + split t\ e\ s\ t.txt + call setline(1, ['just', 'some', 'text']) + hardcopy > %.ps + call assert_true(filereadable('t e s t.txt.ps')) + call delete('t e s t.txt.ps') + bwipe! +endfunc diff --git a/src/version.c b/src/version.c index d312148ee8..c0711fb84d 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 615, /**/ 614, /**/ From 1615b36b91b094263240d7b555283ddf33208f62 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 21:06:09 +0200 Subject: [PATCH 13/26] patch 8.0.0616: not always setting 'background' correctly after :hi Normal Problem: When setting the cterm background with ":hi Normal" the value of 'background' may be set wrongly. Solution: Check that the color is less than 16. Don't set 'background' when it was set explicitly. (Lemonboy, closes #1710) --- src/syntax.c | 19 +++++++++++++------ src/testdir/test_syntax.vim | 23 +++++++++++++++++++++++ src/version.c | 2 ++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/syntax.c b/src/syntax.c index 42a0bdc3f9..10805f4e82 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -7834,18 +7834,25 @@ do_highlight( must_redraw = CLEAR; if (color >= 0) { + int dark = -1; + if (termcap_active) term_bg_color(color); if (t_colors < 16) - i = (color == 0 || color == 4); - else - i = (color < 7 || color == 8); + dark = (color == 0 || color == 4); + /* Limit the heuristic to the standard 16 colors */ + else if (color < 16) + dark = (color < 7 || color == 8); /* Set the 'background' option if the value is * wrong. */ - if (i != (*p_bg == 'd')) + if (dark != -1 + && dark != (*p_bg == 'd') + && !option_was_set((char_u *)"bg")) + { set_option_value((char_u *)"bg", 0L, - i ? (char_u *)"dark" - : (char_u *)"light", 0); + (char_u *)(dark ? "dark" : "light"), 0); + reset_option_was_set((char_u *)"bg"); + } } } } diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim index 8d4be00d38..eb093c8ff3 100644 --- a/src/testdir/test_syntax.vim +++ b/src/testdir/test_syntax.vim @@ -401,3 +401,26 @@ func Test_highlight_invalid_arg() call assert_fails('hi XXX xxx=White', 'E423:') endfunc +func Test_bg_detection() + if has('gui_running') + return + endif + " auto-detection of &bg, make sure sure it isn't set anywhere before + " this test + hi Normal ctermbg=0 + call assert_equal('dark', &bg) + hi Normal ctermbg=4 + call assert_equal('dark', &bg) + hi Normal ctermbg=12 + call assert_equal('light', &bg) + hi Normal ctermbg=15 + call assert_equal('light', &bg) + + " manually-set &bg takes precendence over auto-detection + set bg=light + hi Normal ctermbg=4 + call assert_equal('light', &bg) + set bg=dark + hi Normal ctermbg=12 + call assert_equal('dark', &bg) +endfunc diff --git a/src/version.c b/src/version.c index c0711fb84d..eb46948597 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 616, /**/ 615, /**/ From 763209c57bf50ae777f9c2929eeea01eff7ae6ee Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Jun 2017 21:40:36 +0200 Subject: [PATCH 14/26] patch 8.0.0617: hardcopy test hangs on MS-Windows Problem: Hardcopy test hangs on MS-Windows. Solution: Check the postscript feature is supported. --- src/testdir/test_hardcopy.vim | 14 ++++++++------ src/version.c | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim index 2a316d4f0f..07bb2479b7 100644 --- a/src/testdir/test_hardcopy.vim +++ b/src/testdir/test_hardcopy.vim @@ -62,10 +62,12 @@ func Test_with_syntax() endfunc func Test_fname_with_spaces() - split t\ e\ s\ t.txt - call setline(1, ['just', 'some', 'text']) - hardcopy > %.ps - call assert_true(filereadable('t e s t.txt.ps')) - call delete('t e s t.txt.ps') - bwipe! + if has('postscript') + split t\ e\ s\ t.txt + call setline(1, ['just', 'some', 'text']) + hardcopy > %.ps + call assert_true(filereadable('t e s t.txt.ps')) + call delete('t e s t.txt.ps') + bwipe! + endif endfunc diff --git a/src/version.c b/src/version.c index eb46948597..4fddbb9244 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 617, /**/ 616, /**/ From bb7943b7920ef2f88cb9b6f46c34c7946c370819 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 13:30:06 +0200 Subject: [PATCH 15/26] patch 8.0.0618: NFA regex engine handles [0-z] incorrectly Problem: NFA regex engine handles [0-z] incorrectly. Solution: Return at the right point. (James McCoy, closes #1703) --- src/regexp_nfa.c | 10 ++++++---- src/testdir/test36.in | 12 +++++++++--- src/testdir/test36.ok | 6 ++++++ src/version.c | 2 ++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 120861a46b..c490acb710 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -628,37 +628,39 @@ nfa_recognize_char_class(char_u *start, char_u *end, int extra_newl) config |= CLASS_o9; break; } - else if (*(p + 2) == '7') { config |= CLASS_o7; break; } + return FAIL; + case 'a': if (*(p + 2) == 'z') { config |= CLASS_az; break; } - else if (*(p + 2) == 'f') { config |= CLASS_af; break; } + return FAIL; + case 'A': if (*(p + 2) == 'Z') { config |= CLASS_AZ; break; } - else if (*(p + 2) == 'F') { config |= CLASS_AF; break; } - /* FALLTHROUGH */ + return FAIL; + default: return FAIL; } diff --git a/src/testdir/test36.in b/src/testdir/test36.in index 5e8ce4484a..ea95ebbf24 100644 --- a/src/testdir/test36.in +++ b/src/testdir/test36.in @@ -98,9 +98,15 @@ p:s/\%#=2\U//g p:s/\%#=0[^A-Z]//g p:s/\%#=1[^A-Z]//g p:s/\%#=2[^A-Z]//g -p:s/\%#=0\%204l^\t...//g -p:s/\%#=1\%205l^\t...//g -p:s/\%#=2\%206l^\t...//g +p:s/\%#=0\%210l^\t...//g +p:s/\%#=1\%211l^\t...//g +p:s/\%#=2\%212l^\t...//g +p:s/\%#=0[0-z]//g +p:s/\%#=1[0-z]//g +p:s/\%#=2[0-z]//g +p:s/\%#=0[^0-z]//g +p:s/\%#=1[^0-z]//g +p:s/\%#=2[^0-z]//g :/^start-here/+1,$wq! test.out ENDTEST diff --git a/src/testdir/test36.ok b/src/testdir/test36.ok index df21ed1c5b..867833bb96 100644 --- a/src/testdir/test36.ok +++ b/src/testdir/test36.ok @@ -97,3 +97,9 @@ ABCDEFGHIXYZ !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé + !"#$%&'()#+'-./{|}~€‚›¦±¼ÇÓé + !"#$%&'()#+'-./{|}~€‚›¦±¼ÇÓé + !"#$%&'()#+'-./{|}~€‚›¦±¼ÇÓé +0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz +0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz +0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz diff --git a/src/version.c b/src/version.c index 4fddbb9244..fa8b538a8c 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 618, /**/ 617, /**/ From 9472eec83c3f9c191814dc81dd82498c10b1fc9c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 13:31:56 +0200 Subject: [PATCH 16/26] patch 8.0.0619: GUI gets stuck if timer uses feedkeys() Problem: In the GUI, when a timer uses feedkeys(), it still waits for an event. (Raymond Ko) Solution: Check tb_change_cnt in one more place. --- src/gui.c | 13 +++++++++---- src/version.c | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui.c b/src/gui.c index 7d44db1df9..25310aafd4 100644 --- a/src/gui.c +++ b/src/gui.c @@ -2849,6 +2849,10 @@ gui_insert_lines(int row, int count) } } +/* + * Returns OK if a character was found to be available within the given time, + * or FAIL otherwise. + */ static int gui_wait_for_chars_or_timer(long wtime) { @@ -2869,16 +2873,16 @@ gui_wait_for_chars_or_timer(long wtime) if (typebuf.tb_change_cnt != tb_change_cnt) { /* timer may have used feedkeys() */ - return FALSE; + return FAIL; } if (due_time <= 0 || (wtime > 0 && due_time > remaining)) due_time = remaining; if (gui_mch_wait_for_chars(due_time)) - return TRUE; + return OK; if (wtime > 0) remaining -= due_time; } - return FALSE; + return FAIL; #else return gui_mch_wait_for_chars(wtime); #endif @@ -2896,6 +2900,7 @@ gui_wait_for_chars_or_timer(long wtime) gui_wait_for_chars(long wtime) { int retval; + int tb_change_cnt = typebuf.tb_change_cnt; #ifdef FEAT_MENU /* @@ -2953,7 +2958,7 @@ gui_wait_for_chars(long wtime) } #endif - if (retval == FAIL) + if (retval == FAIL && typebuf.tb_change_cnt == tb_change_cnt) { /* Blocking wait. */ before_blocking(); diff --git a/src/version.c b/src/version.c index fa8b538a8c..3d91495329 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 619, /**/ 618, /**/ From 6aa8cea46d4179b2617daae034063dd0d8054e35 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 14:44:35 +0200 Subject: [PATCH 17/26] Update runtime files. --- runtime/doc/arabic.txt | 40 +- runtime/doc/autocmd.txt | 2 +- runtime/doc/eval.txt | 3 +- runtime/doc/ft_ada.txt | 2 +- runtime/doc/hangulin.txt | 16 +- runtime/doc/help.txt | 2 +- runtime/doc/if_ole.txt | 4 +- runtime/doc/if_perl.txt | 4 +- runtime/doc/insert.txt | 14 +- runtime/doc/intro.txt | 4 +- runtime/doc/map.txt | 6 +- runtime/doc/netbeans.txt | 4 +- runtime/doc/options.txt | 12 +- runtime/doc/os_beos.txt | 2 +- runtime/doc/os_vms.txt | 10 +- runtime/doc/os_win32.txt | 2 +- runtime/doc/pi_getscript.txt | 4 +- runtime/doc/print.txt | 64 +-- runtime/doc/quotes.txt | 114 ++--- runtime/doc/spell.txt | 4 +- runtime/doc/syntax.txt | 11 +- runtime/doc/todo.txt | 59 ++- runtime/doc/usr_09.txt | 4 +- runtime/doc/version6.txt | 4 +- runtime/doc/version7.txt | 120 ++--- runtime/syntax/cpp.vim | 4 +- runtime/syntax/haskell.vim | 4 +- src/po/it.po | 914 +++++++++++++++++++---------------- 28 files changed, 769 insertions(+), 664 deletions(-) diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 42fd878b5d..5d0e9f39db 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -10,11 +10,11 @@ Arabic Language support (options & mappings) for Vim *Arabic* *E800* In order to use right-to-left and Arabic mapping support, it is -necessary to compile VIM with the |+arabic| feature. +necessary to compile Vim with the |+arabic| feature. These functions have been created by Nadim Shaikli -It is best to view this file with these settings within VIM's GUI: > +It is best to view this file with these settings within Vim's GUI: > :set encoding=utf-8 :set arabicshape @@ -42,7 +42,7 @@ the user interface remains the standard Vi interface. Highlights ---------- -o Editing left-to-right files as in the original VIM hasn't changed. +o Editing left-to-right files as in the original Vim hasn't changed. o Viewing and editing files in right-to-left windows. File orientation is per window, so it is possible to view the same @@ -52,7 +52,7 @@ o No special terminal with right-to-left capabilities is required. The right-to-left changes are completely hardware independent. Only Arabic fonts are necessary. -o Compatible with the original VIM. Almost all features work in +o Compatible with the original Vim. Almost all features work in right-to-left mode (there are liable to be bugs). o Changing keyboard mapping and reverse insert modes using a single @@ -66,14 +66,14 @@ o While in Arabic mode, numbers are entered from left to right. Upon o Arabic keymapping on the command line in reverse insert mode. -o Proper Bidirectional functionality is possible given VIM is +o Proper Bidirectional functionality is possible given Vim is started within a Bidi capable terminal emulator. Arabic Fonts *arabicfonts* ------------ -VIM requires monospaced fonts of which there are many out there. +Vim requires monospaced fonts of which there are many out there. Arabic requires ISO-8859-6 as well as Presentation Form-B fonts (without Form-B, Arabic will _NOT_ be usable). It is highly recommended that users search for so-called 'ISO-10646-1' fonts. @@ -96,13 +96,13 @@ o Installation of fonts for X Window systems (Unix/Linux) Usage ----- -Prior to the actual usage of Arabic within VIM, a number of settings +Prior to the actual usage of Arabic within Vim, a number of settings need to be accounted for and invoked. o Setting the Arabic fonts - + For VIM GUI set the 'guifont' to your_ARABIC_FONT. This is done - by entering the following command in the VIM window. + + For Vim GUI set the 'guifont' to your_ARABIC_FONT. This is done + by entering the following command in the Vim window. > :set guifont=your_ARABIC_FONT < @@ -115,7 +115,7 @@ o Setting the Arabic fonts you can include ':set guifont=your_ARABIC_FONT' to your .vimrc file. - + Under the X Window environment, you can also start VIM with + + Under the X Window environment, you can also start Vim with '-fn your_ARABIC_FONT' option. o Setting the appropriate character Encoding @@ -124,7 +124,7 @@ o Setting the appropriate character Encoding > :set encoding=utf-8 < - to your .vimrc file (entering the command manually into you VIM + to your .vimrc file (entering the command manually into you Vim window is highly discouraged). In short, include ':set encoding=utf-8' to your .vimrc file. @@ -137,11 +137,11 @@ o Setting the appropriate character Encoding o Enable Arabic settings [short-cut] In order to simplify and streamline things, you can either invoke - VIM with the command-line option, + Vim with the command-line option, % vim -A my_utf8_arabic_file ... - or enable 'arabic' via the following command within VIM + or enable 'arabic' via the following command within Vim > :set arabic < @@ -189,7 +189,7 @@ o Enable Arabic settings [short-cut] > :set keymap=arabic < - in your VIM window. You can also append the 'keymap' set command to + in your Vim window. You can also append the 'keymap' set command to your .vimrc file. In other words, you can include ':set keymap=arabic' to your .vimrc file. @@ -202,7 +202,7 @@ o Enable Arabic settings [short-cut] + Arabic deletion of a combined pair character - By default VIM has the 'delcombine' option disabled. This option + By default Vim has the 'delcombine' option disabled. This option allows the deletion of ALEF in a LAM_ALEF (LAA) combined character and still retain the LAM (i.e. it reverts to treating the combined character as its natural two characters form -- this also pertains @@ -211,13 +211,13 @@ o Enable Arabic settings [short-cut] > :set delcombine < - in our VIM window. You can also append the 'delcombine' set command + in our Vim window. You can also append the 'delcombine' set command to your .vimrc file. In other words, you can include ':set delcombine' to your .vimrc file. + Arabic right-to-left Mode - By default VIM starts in Left-to-right mode. 'rightleft' is the + By default Vim starts in Left-to-right mode. 'rightleft' is the command that allows one to alter a window's orientation - that can be accomplished via, @@ -253,7 +253,7 @@ o Enable Arabic settings [short-cut] > :set arabicshape < - in our VIM window. You can also append the 'arabicshape' set + in our Vim window. You can also append the 'arabicshape' set command to your .vimrc file. In other words, you can include ':set arabicshape' to your .vimrc file. @@ -261,7 +261,7 @@ o Enable Arabic settings [short-cut] Keymap/Keyboard *arabickeymap* --------------- -The character/letter encoding used in VIM is the standard UTF-8. +The character/letter encoding used in Vim is the standard UTF-8. It is widely discouraged that any other encoding be used or even attempted. @@ -294,7 +294,7 @@ o Keyboard Restrictions ------------ -o VIM in its GUI form does not currently support Bi-directionality +o Vim in its GUI form does not currently support Bi-directionality (i.e. the ability to see both Arabic and Latin intermixed within the same line). diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 575e8523dc..b2d1c24fe9 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -610,7 +610,7 @@ FileChangedShell When Vim notices that the modification time of |timestamp| Mostly triggered after executing a shell command, but also with a |:checktime| command - or when Gvim regains input focus. + or when gvim regains input focus. This autocommand is triggered for each changed file. It is not used when 'autoread' is set and the buffer was not changed. If a diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6a0013ab94..0f3d27a6c2 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 May 02 +*eval.txt* For Vim version 8.0. Last change: 2017 Jun 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3373,6 +3373,7 @@ did_filetype() Returns |TRUE| when autocommands are being executed and the FileType event has been triggered at least once. Can be used to avoid triggering the FileType event again in the scripts that detect the file type. |FileType| + Returns |FALSE| when `:setf FALLBACK` was used. When editing another file, the counter is reset, thus this really checks if the FileType event has been triggered for the current buffer. This allows an autocommand that starts diff --git a/runtime/doc/ft_ada.txt b/runtime/doc/ft_ada.txt index 81d7ceab59..5f1b78e2e4 100644 --- a/runtime/doc/ft_ada.txt +++ b/runtime/doc/ft_ada.txt @@ -116,7 +116,7 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic then "gnat xref -v *.ad?" 4) Project manager support is completely broken - don't even try "gnat xref -Padacl.gpr". -5) VIM is faster when the tags file is sorted - use "sort --unique +5) Vim is faster when the tags file is sorted - use "sort --unique --ignore-case --output=tags tags" . 6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark the file assorted. diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt index 009250116f..08fb6126bd 100644 --- a/runtime/doc/hangulin.txt +++ b/runtime/doc/hangulin.txt @@ -6,7 +6,7 @@ Introduction *hangul* ------------ -It is to input hangul, the Korean language, with VIM GUI version. +It is to input hangul, the Korean language, with Vim GUI version. If you have a XIM program, you can use another |+xim| feature. Basically, it is for anybody who has no XIM program. @@ -31,7 +31,7 @@ You should set LANG variable to Korean locale such as ko, ko_KR.eucKR or ko_KR.UTF-8. If you set LC_ALL variable, it should be set to Korean locale also. -VIM resource +Vim resource ------------ You may want to set 'encoding' and 'fileencodings'. Next are examples: > @@ -53,12 +53,12 @@ If both are set, VIM_KEYBOARD has higher priority. Hangul Fonts ------------ -If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'. +If you use GTK version of gvim, you should set 'guifont' and 'guifontwide'. For example: > set guifont=Courier\ 12 set guifontwide=NanumGothicCoding\ 12 -If you use Motif or Athena version of GVIM, you should set 'guifontset' in +If you use Motif or Athena version of gvim, you should set 'guifontset' in your vimrc. You can set fontset in the .Xdefaults file. $HOME/.gvimrc: > @@ -77,11 +77,11 @@ $HOME/.Xdefaults: > attention! the , (comma) or ; (semicolon) -And there should be no ':set guifont'. If it exists, then Gvim ignores -':set guifontset'. It means VIM runs without fontset supporting. +And there should be no ':set guifont'. If it exists, then gvim ignores +':set guifontset'. It means Vim runs without fontset supporting. So, you can see only English. Hangul does not be correctly displayed. -After "fontset" feature is enabled, VIM does not allow using english +After "fontset" feature is enabled, Vim does not allow using english font only in "font" setting for syntax. For example, if you use > :set guifontset=eng_font,your_font @@ -99,7 +99,7 @@ We don't support Johab font. We don't support Hanja input. And We don't have any plan to support them. -If you really need such features, you can use console version of VIM with a +If you really need such features, you can use console version of Vim with a capable terminal emulator. Bug or Comment diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 58049f656f..2be3ced374 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -31,7 +31,7 @@ Get specific help: It is possible to go directly to whatever you want help help entries for "word". Or use ":helpgrep word". |:helpgrep| -VIM stands for Vi IMproved. Most of VIM was made by Bram Moolenaar, but only +Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only through the help of many others. See |credits|. ------------------------------------------------------------------------------ *doc-file-list* *Q_ct* diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt index 6a30a5807e..be84f43b17 100644 --- a/runtime/doc/if_ole.txt +++ b/runtime/doc/if_ole.txt @@ -41,9 +41,9 @@ instance), code similar to the following should be used: $vim = new Win32::OLE 'Vim.Application'; [C#] > - // Add a reference to VIM in your project. + // Add a reference to Vim in your project. // Choose the COM tab. - // Select "VIM Ole Interface 1.1 Type Library" + // Select "Vim Ole Interface 1.1 Type Library" Vim.Vim vimobj = new Vim.Vim(); Vim does not support acting as a "hidden" OLE server, like some other OLE diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt index 84bfc78283..d69c22fb35 100644 --- a/runtime/doc/if_perl.txt +++ b/runtime/doc/if_perl.txt @@ -7,7 +7,7 @@ Perl and Vim *perl* *Perl* 1. Editing Perl files |perl-editing| -2. Compiling VIM with Perl interface |perl-compiling| +2. Compiling Vim with Perl interface |perl-compiling| 3. Using the Perl interface |perl-using| 4. Dynamic loading |perl-dynamic| @@ -33,7 +33,7 @@ Vim in the $VIMRUNTIME/tools directory. This script has currently more features than Exuberant ctags' Perl support. ============================================================================== -2. Compiling VIM with Perl interface *perl-compiling* +2. Compiling Vim with Perl interface *perl-compiling* To compile Vim with Perl interface, you need Perl 5.004 (or later). Perl must be installed before you compile Vim. Vim's Perl interface does NOT work with diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 2c6900e896..2c4e2d0901 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 8.0. Last change: 2017 Apr 07 +*insert.txt* For Vim version 8.0. Last change: 2017 May 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -634,13 +634,13 @@ Completion can be done for: 10. User defined completion |i_CTRL-X_CTRL-U| 11. omni completion |i_CTRL-X_CTRL-O| 12. Spelling suggestions |i_CTRL-X_s| -13. keywords in 'complete' |i_CTRL-N| +13. keywords in 'complete' |i_CTRL-N| |i_CTRL-P| -All these (except 2) are done in CTRL-X mode. This is a sub-mode of Insert -and Replace modes. You enter CTRL-X mode by typing CTRL-X and one of the -CTRL-X commands. You exit CTRL-X mode by typing a key that is not a valid -CTRL-X mode command. Valid keys are the CTRL-X command itself, CTRL-N (next), -and CTRL-P (previous). +All these, except CTRL-N and CTRL-P, are done in CTRL-X mode. This is a +sub-mode of Insert and Replace modes. You enter CTRL-X mode by typing CTRL-X +and one of the CTRL-X commands. You exit CTRL-X mode by typing a key that is +not a valid CTRL-X mode command. Valid keys are the CTRL-X command itself, +CTRL-N (next), and CTRL-P (previous). Also see the 'infercase' option if you want to adjust the case of the match. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index d6664ff45d..3dfea22930 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -84,8 +84,8 @@ The Vim pages contain the most recent information about Vim. They also contain links to the most recent version of Vim. The FAQ is a list of Frequently Asked Questions. Read this if you have problems. - VIM home page: http://www.vim.org/ - VIM FAQ: http://vimdoc.sf.net/ + Vim home page: http://www.vim.org/ + Vim FAQ: http://vimdoc.sf.net/ Downloading: ftp://ftp.vim.org/pub/vim/MIRRORS diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 7d723cea93..239c7915c9 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.0. Last change: 2017 Mar 10 +*map.txt* For Vim version 8.0. Last change: 2017 May 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -185,7 +185,7 @@ that starts with ",". Then you need to type another character for Vim to know whether to use the "," mapping or the longer one. To avoid this add the argument. Then the mapping will be used when it matches, Vim does not wait for more characters to be typed. However, if the characters were -already type they are used. +already typed they are used. *:map-* *:map-silent* To define a mapping which will not be echoed on the command line, add @@ -798,7 +798,7 @@ Bear in mind that convert-meta has been reported to have troubles when used in UTF-8 locales. On terminals like xterm, the "metaSendsEscape" resource can be toggled on the fly through the "Main Options" menu, by pressing Ctrl-LeftClick on the terminal; that's a good last resource in case you want to send ESC when -using other applications but not when inside VIM. +using other applications but not when inside Vim. 1.11 MAPPING AN OPERATOR *:map-operator* diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index fb54b809d6..722cec6554 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -120,7 +120,7 @@ In case you do not want the NetBeans interface you can disable it by uncommenting a line with "--disable-netbeans" in the Makefile. Currently the NetBeans interface is supported by Vim running in a terminal and -by GVim when it is run with one of the following GUIs: GTK, GNOME, Windows, +by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows, Athena and Motif. If Motif support is required the user must supply XPM libraries. See @@ -996,7 +996,7 @@ to "Vim". In the Expert tab make sure the "Vim Command" is correct. You should be careful if you change the "Vim Command". There are command line options there which must be there for the connection to be properly set up. You can change the command name but that's about it. If your gvim -can be found by your $PATH then the VIM Command can start with "gvim". If +can be found by your $PATH then the Vim Command can start with "gvim". If you don't want gvim searched from your $PATH then hard code in the full Unix path name. At this point you should get a gvim for any source file you open in NetBeans. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index c6fc424284..25b3f1835b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.0. Last change: 2017 May 08 +*options.txt* For Vim version 8.0. Last change: 2017 Jun 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -370,7 +370,7 @@ Note: In the future more global options can be made global-local. Using Setting the filetype -:setf[iletype] {filetype} *:setf* *:setfiletype* +:setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype* Set the 'filetype' option to {filetype}, but only if not done yet in a sequence of (nested) autocommands. This is short for: > @@ -380,6 +380,13 @@ Setting the filetype < This command is used in a filetype.vim file to avoid setting the 'filetype' option twice, causing different settings and syntax files to be loaded. + + When the optional FALLBACK argument is present, a + later :setfiletype command will override the + 'filetype'. This is to used for filetype detections + that are just a guess. |did_filetype()| will return + false after this command. + {not in Vi} *option-window* *optwin* @@ -7735,6 +7742,7 @@ A jump table for the options with a short description can be found at |Q_op|. compatible terminal. If setting this option does not work (produces a colorless UI) reading |xterm-true-color| might help. + Note that the "cterm" attributes are still used, not the "gui" ones. NOTE: This option is reset when 'compatible' is set. *'terse'* *'noterse'* diff --git a/runtime/doc/os_beos.txt b/runtime/doc/os_beos.txt index f63eeaac00..06749bed8b 100644 --- a/runtime/doc/os_beos.txt +++ b/runtime/doc/os_beos.txt @@ -144,7 +144,7 @@ The default value for $VIM is set at compile time and can be determined with > :version The normal value is /boot/home/config/share/vim. If you don't like it you can -set the VIM environment variable to override this, or set 'helpfile' in your +set the Vim environment variable to override this, or set 'helpfile' in your .vimrc: > :if version >= 500 diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index 53f6fe5e57..5cf2378c37 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -539,7 +539,7 @@ More info under :help hardcopy 8.10 Setting up the symbols -When I use GVIM this way and press CTRL-Y in the parent terminal, gvim exits. +When I use gvim this way and press CTRL-Y in the parent terminal, gvim exits. I now use a different symbol that seems to work OK and fixes the problem. I suggest this instead: > @@ -547,7 +547,7 @@ I suggest this instead: > The /INPUT=NLA0: separates the standard input of the gvim process from the parent terminal, to block signals from the parent window. -Without the -GEOMETRY, the GVIM window size will be minimal and the menu +Without the -GEOMETRY, the gvim window size will be minimal and the menu will be confused after a window-resize. (Carlo Mekenkamp, Coen Engelbarts, Vim 6.0ac) @@ -764,14 +764,14 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/ 9. VMS related changes *vms-changes* -Version 7.4 -- Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name" +Version 7.4 +- Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name" add _un_ at the beginning to keep the extension - correct swap file name wildcard handling - handle iconv usage correctly - do not optimize on vax - otherwise it hangs compiling crypto files - fileio.c fix the comment -- correct RealWaitForChar +- correct RealWaitForChar - after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have G_FLOAT but IA64 uses IEEE float otherwise Vim crashes - guard against crashes that are caused by mixed filenames diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index 98b37d0ab8..9112dacde2 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -135,7 +135,7 @@ you will need to get a version older than that. 6. Running under Windows 3.1 *win32-win3.1* *win32s* *windows-3.1* *gui-w32s* -There was a special version of Gvim that runs under Windows 3.1 and 3.11. +There was a special version of gvim that runs under Windows 3.1 and 3.11. Support was removed in patch 7.4.1363. ============================================================================== diff --git a/runtime/doc/pi_getscript.txt b/runtime/doc/pi_getscript.txt index 628d9b74e5..66d11ab206 100644 --- a/runtime/doc/pi_getscript.txt +++ b/runtime/doc/pi_getscript.txt @@ -9,7 +9,7 @@ Copyright: (c) 2004-2012 by Charles E. Campbell *glvs-copyright* The VIM LICENSE (see |copyright|) applies to the files in this package, including getscriptPlugin.vim, getscript.vim, GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript" - instead of "VIM". Like anything else that's free, getscript and its + instead of "Vim". Like anything else that's free, getscript and its associated files are provided *as is* and comes with no warranty of any kind, either expressed or implied. No guarantees of merchantability. No guarantees of suitability for any purpose. By @@ -68,7 +68,7 @@ Your computer needs to have wget or curl for GetLatestVimScripts to do its work. mv GetLatestVimScripts.dist GetLatestVimScripts.dat (edit GetLatestVimScripts.dat to install your own personal list of desired plugins -- see |GetLatestVimScripts_dat|) - + 3. Windows: vim getscript.vba :so % diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index daa03549cc..62c37cfe63 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -99,25 +99,25 @@ If the option is empty, then vim will use the system default printer for HPUX: hp-roman8, EBCDIC: ebcdic-uk) global -Sets the character encoding used when printing. This option tells VIM which +Sets the character encoding used when printing. This option tells Vim which print character encoding file from the "print" directory in 'runtimepath' to use. This option will accept any value from |encoding-names|. Any recognized names -are converted to VIM standard names - see 'encoding' for more details. Names -not recognized by VIM will just be converted to lower case and underscores +are converted to Vim standard names - see 'encoding' for more details. Names +not recognized by Vim will just be converted to lower case and underscores replaced with '-' signs. -If 'printencoding' is empty or VIM cannot find the file then it will use -'encoding' (if VIM is compiled with |+multi_byte| and it is set an 8-bit -encoding) to find the print character encoding file. If VIM is unable to find +If 'printencoding' is empty or Vim cannot find the file then it will use +'encoding' (if Vim is compiled with |+multi_byte| and it is set an 8-bit +encoding) to find the print character encoding file. If Vim is unable to find a character encoding file then it will use the "latin1" print character encoding file. -When 'encoding' is set to a multi-byte encoding, VIM will try to convert +When 'encoding' is set to a multi-byte encoding, Vim will try to convert characters to the printing encoding for printing (if 'printencoding' is empty then the conversion will be to latin1). Conversion to a printing encoding -other than latin1 will require VIM to be compiled with the |+iconv| feature. +other than latin1 will require Vim to be compiled with the |+iconv| feature. If no conversion is possible then printing will fail. Any characters that cannot be converted will be replaced with upside down question marks. @@ -203,7 +203,7 @@ header is used when this option is empty. 'printmbcharset' 'pmbcs' string (default "") global Sets the CJK character set to be used when generating CJK output from -|:hardcopy|. The following predefined values are currently recognised by VIM: +|:hardcopy|. The following predefined values are currently recognised by Vim: Value Description ~ Chinese GB_2312-80 @@ -270,7 +270,7 @@ Japanese text you would do the following; > If 'printmbcharset' is not one of the above values then it is assumed to specify a custom multi-byte character set and no check will be made that it is -compatible with the value for 'printencoding'. VIM will look for a file +compatible with the value for 'printencoding'. Vim will look for a file defining the character set in the "print" directory in 'runtimepath'. *pmbfn-option* @@ -420,10 +420,10 @@ There are currently a number of limitations with PostScript printing: possible to get all the characters in an encoding to print by installing a new version of the Courier font family. -- Multi-byte support - Currently VIM will try to convert multi-byte characters +- Multi-byte support - Currently Vim will try to convert multi-byte characters to the 8-bit encoding specified by 'printencoding' (or latin1 if it is empty). Any characters that are not successfully converted are shown as - unknown characters. Printing will fail if VIM cannot convert the multi-byte + unknown characters. Printing will fail if Vim cannot convert the multi-byte to the 8-bit encoding. ============================================================================== @@ -434,11 +434,11 @@ you need to define your own PostScript font encoding vector. Details on how to define a font encoding vector is beyond the scope of this help file, but you can find details in the PostScript Language Reference Manual, 3rd Edition, published by Addison-Wesley and available in PDF form at -http://www.adobe.com/. The following describes what you need to do for VIM to +http://www.adobe.com/. The following describes what you need to do for Vim to locate and use your print character encoding. i. Decide on a unique name for your encoding vector, one that does not clash - with any of the recognized or standard encoding names that VIM uses (see + with any of the recognized or standard encoding names that Vim uses (see |encoding-names| for a list), and that no one else is likely to use. ii. Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your 'runtimepath' and rename it with your unique name. @@ -446,23 +446,23 @@ iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1 with your unique name (don't forget the line starting %%Title:), and modify the array of glyph names to define your new encoding vector. The array must have exactly 256 entries or you will not be able to print! -iv. Within VIM, set 'printencoding' to your unique encoding name and then - print your file. VIM will now use your custom print character encoding. +iv. Within Vim, set 'printencoding' to your unique encoding name and then + print your file. Vim will now use your custom print character encoding. -VIM will report an error with the resource file if you change the order or +Vim will report an error with the resource file if you change the order or content of the first 3 lines, other than the name of the encoding on the line starting %%Title: or the version number on the line starting %%Version:. -[Technical explanation for those that know PostScript - VIM looks for a file +[Technical explanation for those that know PostScript - Vim looks for a file with the same name as the encoding it will use when printing. The file defines a new PostScript Encoding resource called /VIM-name, where name is the -print character encoding VIM will use.] +print character encoding Vim will use.] ============================================================================== 5. PostScript CJK Printing *postscript-cjk-printing* *E673* *E674* *E675* -VIM supports printing of Chinese, Japanese, and Korean files. Setting up VIM +Vim supports printing of Chinese, Japanese, and Korean files. Setting up Vim to correctly print CJK files requires setting up a few more options. Each of these countries has many standard character sets and encodings which @@ -483,7 +483,7 @@ option allows you to specify different fonts to use when printing characters which are syntax highlighted with the font styles normal, italic, bold and bold-italic. -No CJK fonts are supplied with VIM. There are some free Korean, Japanese, and +No CJK fonts are supplied with Vim. There are some free Korean, Japanese, and Traditional Chinese fonts available at: http://examples.oreilly.com/cjkvinfo/adobe/samples/ @@ -498,7 +498,7 @@ CJK fonts can be large containing several thousand glyphs, and it is not uncommon to find that they only contain a subset of a national standard. It is not unusual to find the fonts to not include characters for codes in the ASCII code range. If you find half-width Roman characters are not appearing -in your printout then you should configure VIM to use the Courier font the +in your printout then you should configure Vim to use the Courier font the half-width ASCII characters with 'printmbfont'. If your font does not include other characters then you will need to find another font that does. @@ -506,7 +506,7 @@ Another issue with ASCII characters, is that the various national character sets specify a couple of different glyphs in the ASCII code range. If you print ASCII text using the national character set you may see some unexpected characters. If you want true ASCII code printing then you need to configure -VIM to output ASCII characters for the ASCII code range with 'printmbfont'. +Vim to output ASCII characters for the ASCII code range with 'printmbfont'. It is possible to define your own multi-byte character set although this should not be attempted lightly. A discussion on the process if beyond the @@ -525,13 +525,13 @@ print job completing. There are a number of possible causes as to why the printing may have failed: - Wrong version of the prolog resource file. The prolog resource file - contains some PostScript that VIM needs to be able to print. Each version - of VIM needs one particular version. Make sure you have correctly installed + contains some PostScript that Vim needs to be able to print. Each version + of Vim needs one particular version. Make sure you have correctly installed the runtime files, and don't have any old versions of a file called prolog in the print directory in your 'runtimepath' directory. - Paper size. Some PostScript printers will abort printing a file if they do - not support the requested paper size. By default VIM uses A4 paper. Find + not support the requested paper size. By default Vim uses A4 paper. Find out what size paper your printer normally uses and set the appropriate paper size with 'printoptions'. If you cannot find the name of the paper used, measure a sheet and compare it with the table of supported paper sizes listed @@ -668,7 +668,7 @@ complex print document creation. N-UP PRINTING -The psnup utility takes an existing PostScript file generated from VIM and +The psnup utility takes an existing PostScript file generated from Vim and convert it to an n-up version. The simplest way to create a 2-up printout is to first create a PostScript file with: > @@ -724,16 +724,16 @@ There are a couple of points to bear in mind: ============================================================================== 8. Formfeed Characters *printing-formfeed* -By default VIM does not do any special processing of |formfeed| control -characters. Setting the 'printoptions' formfeed item will make VIM recognize +By default Vim does not do any special processing of |formfeed| control +characters. Setting the 'printoptions' formfeed item will make Vim recognize formfeed characters and continue printing the current line at the beginning of the first line on a new page. The use of formfeed characters provides rudimentary print control but there are certain things to be aware of. -VIM will always start printing a line (including a line number if enabled) +Vim will always start printing a line (including a line number if enabled) containing a formfeed character, even if it is the first character on the line. This means if a line starting with a formfeed character is the first -line of a page then VIM will print a blank page. +line of a page then Vim will print a blank page. Since the line number is printed at the start of printing the line containing the formfeed character, the remainder of the line printed on the new page @@ -742,7 +742,7 @@ lines of a long line when wrap in 'printoptions' is enabled). If the formfeed character is the last character on a line, then printing will continue on the second line of the new page, not the first. This is due to -VIM processing the end of the line after the formfeed character and moving +Vim processing the end of the line after the formfeed character and moving down a line to continue printing. Due to the points made above it is recommended that when formfeed character diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 451fa5103d..529a0f714a 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -63,53 +63,53 @@ versions of 'emacs' in the late 1970's and was relieved by finding 'vi' in the first UNIX I came across in 1983). In my opinion, it's about time 'VIM' replace 'emacs' as the standard for top editors. (Bo Thide', Sweden) -I love and use VIM heavily too. (Larry Wall) +I love and use Vim heavily too. (Larry Wall) Vi is like a Ferrari, if you're a beginner, it handles like a bitch, but once you get the hang of it, it's small, powerful and FAST! (Unknown) -VIM is like a new model Ferrari, and sounds like one too - "VIIIIIIMMM!" +Vim is like a new model Ferrari, and sounds like one too - "VIIIIIIMMM!" (Stephen Riehm, Germany) -Schon bei Nutzung eines Bruchteils der VIM-Funktionen wird der Benutzer recht +Schon bei Nutzung eines Bruchteils der Vim-Funktionen wird der Benutzer recht schnell die Vorzuege dieses Editors kennen- und schaetzenlernen. -Translated: Even when only using a fraction of VIM-functions, the user will +Translated: Even when only using a fraction of Vim-functions, the user will quickly get used to and appreciate the advantages of this editor. (Garry -Glendown, conclusion of an article on VIM in iX magazine 9/1998) +Glendown, conclusion of an article on Vim in iX magazine 9/1998) -I've recently acquired the O'Reilly book on VI (it also discusses VIM +I've recently acquired the O'Reilly book on Vi (it also discusses Vim in-depth), and I'm amazed at just how powerful this application is. (Jeffrey Rankin) -This guide was written using the Windows 9.x distribution of GVIM, which is +This guide was written using the Windows 9.x distribution of gvim, which is quite possibly the greatest thing to come along since God created the naked girl. (Michael DiBernardo) -Boy, I thought I knew almost everything about VIM, but every time I browse the -online documentation, I hit upon a minor but cool aspect of a VIM feature that +Boy, I thought I knew almost everything about Vim, but every time I browse the +online documentation, I hit upon a minor but cool aspect of a Vim feature that I didn't know before! I must say the documentation is one the finest I've ever seen in a product -- even better than most commercial products. (Gautam Mudunuri) -VIM 4.5 is really a fantastic editor. It has sooooo many features and more +Vim 4.5 is really a fantastic editor. It has sooooo many features and more importantly, the defaults are so well thought out that you really don't have to change anything!! Words cannot express my amazement and gratitude to the -creators of VIM. Keep it up. (Vikas, USA) +creators of Vim. Keep it up. (Vikas, USA) I wonder how long it will be before people will refer to other Vi editors as -VIM clones? (Darren Hiebert) +Vim clones? (Darren Hiebert) I read about [auto-positioning-in-file-based-on-the-errors-from-make] in one of those "Perfect Programmer's Editor" threads and was delighted to discover -that VIM already supports it. (Brendan Macmillan, Australia) +that Vim already supports it. (Brendan Macmillan, Australia) -I just discovered VIM (5.0) and I'm telling everyone I know about it! -I tell them VIM stands for VI for the new (M)illenium. Thanks so much! +I just discovered Vim (5.0) and I'm telling everyone I know about it! +I tell them Vim stands for Vi for the new (M)illenium. Thanks so much! (Matt F. Valentine) I think from now on "vi" should be called "Vim Imitation", not the other way around. (Rungun Ramanathan) -The Law of VIM: +The Law of Vim: For each member b of the possible behaviour space B of program P, there exists a finite time t before which at least one user u in the total user space U of program P will request b becomes a member of the allowed behaviour space B' @@ -118,42 +118,42 @@ In other words: Sooner or later everyone wants everything as an option. (Negri) Whenever I move to a new computing platform, the first thing I do is to port -VIM. Lately, I am simply stunned by its ease of compilation using the +Vim. Lately, I am simply stunned by its ease of compilation using the configure facility. (A.M. Sabuncu, Turkey) The options are really excellent and very powerful. (Anish Maharaj) The Spring user-interface designs are in, and word from the boutiques is that -80x24 text-only mode is back with a *vengeance! Vi editor clone VIM burst onto +80x24 text-only mode is back with a *vengeance! Vi editor clone Vim burst onto March desk-tops with a dazzling show of pastel syntax highlights for its 5.0 -look. Strident and customizable, VIM raises eyebrows with its interpretation +look. Strident and customizable, Vim raises eyebrows with its interpretation of the classic Vi single-key macro collection. http://www.ntk.net/index.cgi?back=archive98/now0327.txt&line=179#l -I just wanted to take this opportunity to let you know that VIM 5 ROCKS! +I just wanted to take this opportunity to let you know that Vim 5 ROCKS! Syntax highlighting: how did I survive without it?! Thank you for creating mankind's best editor! (Mun Johl, USA) -Thanks again for VIM. I use it every day on Linux. (Eric Foster-Johnson, +Thanks again for Vim. I use it every day on Linux. (Eric Foster-Johnson, author of the book "UNIX Programming Tools") The BEST EDITOR EVER (Stuart Woolford) -I have used most of VIM's fancy features at least once, many frequently, and I +I have used most of Vim's fancy features at least once, many frequently, and I can honestly say that I couldn't live with anything less anymore. My productivity has easily doubled compared to what it was when I used vi. (Sitaram Chamarty) -I luv VIM. It is incredible. I'm naming my first-born Vimberly. (Jose +I luv Vim. It is incredible. I'm naming my first-born Vimberly. (Jose Unpingco, USA) -Hint: "VIM" is "vi improved" - much better! (Sven Guckes, Germany) +Hint: "Vim" is "vi improved" - much better! (Sven Guckes, Germany) -I use VIM every day. I spend more time in VIM than in any other program... +I use Vim every day. I spend more time in Vim than in any other program... It's the best vi clone there is. I think it's great. (Craig Sanders, Australia) -I strongly advise using VIM--its infinite undo/redo saved me much grief. +I strongly advise using Vim--its infinite undo/redo saved me much grief. (Terry Brown) Thanks very much for writing what in my opinion is the finest text editor on @@ -163,98 +163,98 @@ the planet. If I were to get another cat, I would name it "Vim". I typed :set all and the screen FILLED up with options. A whole screen of things to be set and unset. I saw some of my old friends like wrapmargin, modelines and showmode, but the screen was FILLED with new friends! I love -them all! I love VIM! I'm so happy that I've found this editor! I feel +them all! I love Vim! I'm so happy that I've found this editor! I feel like how I once felt when I started using vi after a couple of years of using ed. I never thought I'd forsake my beloved ed, but vi ... oh god, vi was -great. And now, VIM. (Peter Jay Salzman, USA) +great. And now, Vim. (Peter Jay Salzman, USA) I am really happy with such a wonderful software package. Much better than almost any expensive, off the shelf program. (Jeff Walker) -Whenever I reread the VIM documentation I'm overcome with excitement at the +Whenever I reread the Vim documentation I'm overcome with excitement at the power of the editor. (William Edward Webber, Australia) -Hurrah for VIM!! It is "at your fingertips" like vi, and has the extensions +Hurrah for Vim!! It is "at your fingertips" like vi, and has the extensions that vi sorely needs: highlighting for executing commands on blocks, an easily navigable and digestible help screen, and more. (Paul Pax) The reason WHY I don't have this amazingly useful macro anymore, is that I -now use VIM - and this is built in!! (Stephen Riehm, Germany) +now use Vim - and this is built in!! (Stephen Riehm, Germany) -I am a user of VIM and I love it. I use it to do all my programming, C, +I am a user of Vim and I love it. I use it to do all my programming, C, C++, HTML what ever. (Tim Allwine) -I discovered VIM after years of struggling with the original vi, and I just +I discovered Vim after years of struggling with the original vi, and I just can't live without it anymore. (Emmanuel Mogenet, USA) -Emacs has not a bit of chance to survive so long as VIM is around. Besides, +Emacs has not a bit of chance to survive so long as Vim is around. Besides, it also has the most detailed software documentation I have ever seen---much better than most commercial software! (Leiming Qian) -This version of VIM will just blow people apart when they discover just how +This version of Vim will just blow people apart when they discover just how fantastic it is! (Tony Nugent, Australia) -I took your advice & finally got VIM & I'm really impressed. Instant convert. +I took your advice & finally got Vim & I'm really impressed. Instant convert. (Patrick Killelea, USA) -VIM is by far my favorite piece of shareware and I have been particularly +Vim is by far my favorite piece of shareware and I have been particularly pleased with version 3.0. This is really a solid piece of work. (Robert Colon, USA) -VIM is a joy to use, it is so well thought and practical that I wonder why -anybody would use visual development tools. VIM is powerful and elegant, it +Vim is a joy to use, it is so well thought and practical that I wonder why +anybody would use visual development tools. Vim is powerful and elegant, it looks deceptively simple but is almost as complex as a 747 (especially when I -look at my growing .vimrc), keep up that wonderful job, VIM is a centerpiece +look at my growing .vimrc), keep up that wonderful job, Vim is a centerpiece of the free software world. (Louis-David Mitterand, USA) -I cannot believe how great it is to use VIM. I think the guys at work are +I cannot believe how great it is to use Vim. I think the guys at work are getting tired of hearing me bragging about it. Others eyes are lighting up. (Rick Croote) Emacs takes way too much time to start up and run, it is too big and bulky for -effective use and the interface is more confusing than it is of any help. VIM +effective use and the interface is more confusing than it is of any help. Vim however is short, it is fast, it is powerful, it has a good interface and it is all purpose. (Paal Ditlefsen Ekran) -From the first time I got VIM3.0, I was very enthusiastic. It has almost no +From the first time I got Vim3.0, I was very enthusiastic. It has almost no problems. The swapfile handling and the backup possibilities are robust, also the protection against editing one file twice. It is very compatible to the real VI (and that is a MUST, because my brain is trained over years in using it). (Gert van Antwerpen, Holland) -Visual mode in VIM is a very powerful thing! (Tony Nugent, Australia) +Visual mode in Vim is a very powerful thing! (Tony Nugent, Australia) -I have to say that VIM is =THE= single greatest piece of source code to ever +I have to say that Vim is =THE= single greatest piece of source code to ever come across the net (Jim Battle, USA). -In fact, if you do want to get a new vi I'd suggest VIM-3.0. This is, by +In fact, if you do want to get a new vi I'd suggest Vim-3.0. This is, by far, the best version of vi I've ever seen (Albert W. Schueller). -I should mention that VIM is a very good editor and can compete with anything +I should mention that Vim is a very good editor and can compete with anything (Ilya Beloozerov). To tell the truth sometimes I used elvis, vile, xvi, calvin, etc. And this is -the reason that I can state that VIM is the best! (Ferenc Deak, Hungary) +the reason that I can state that Vim is the best! (Ferenc Deak, Hungary) -VIM is by far the best editor that I have used in a long time, and I have +Vim is by far the best editor that I have used in a long time, and I have looked at just about every thing that is available for every platform that I -use. VIM is the best on all of them. (Guy L. Oliver) +use. Vim is the best on all of them. (Guy L. Oliver) -VIM is the greatest editor since the stone chisel. (Jose Unpingco, USA) +Vim is the greatest editor since the stone chisel. (Jose Unpingco, USA) -I would like to say that with VIM I am finally making the 'emacs to vi' +I would like to say that with Vim I am finally making the 'emacs to vi' transition - as an Editor it is so much better in many ways: keyboard layout, memory usage, text alteration to name 3. (Mark Adam) In fact, now if I want to know what a particular setting does in vi, I fire up -VIM and check out its help! (Nikhil Patel, USA) +Vim and check out its help! (Nikhil Patel, USA) -As a vi user, VIM has made working with text a far more pleasant task than +As a vi user, Vim has made working with text a far more pleasant task than before I encountered this program. (Steinar Knutsen, Norway) -I use VIM since version 3.0. Since that time, it is the ONLY editor I use, -with Solaris, Linux and OS/2 Warp. I suggest all my friends to use VIM, they -try, and they continue using it. VIM is really the best software I have ever +I use Vim since version 3.0. Since that time, it is the ONLY editor I use, +with Solaris, Linux and OS/2 Warp. I suggest all my friends to use Vim, they +try, and they continue using it. Vim is really the best software I have ever downloaded from the Internet, and the best editor I know of. (Marco Eccettuato, Italy) diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 60513f9fc8..9b62fda341 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -478,7 +478,7 @@ Vim uses a binary file format for spelling. This greatly speeds up loading the word list and keeps it small. *.aff* *.dic* *Myspell* You can create a Vim spell file from the .aff and .dic files that Myspell -uses. Myspell is used by OpenOffice.org and Mozilla. The OpenOffice .oxt +uses. Myspell is used by OpenOffice.org and Mozilla. The OpenOffice .oxt files are zip files which contain the .aff and .dic files. You should be able to find them here: http://extensions.services.openoffice.org/dictionary @@ -1614,7 +1614,7 @@ COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE* KEY (Hunspell) *spell-KEY* Define characters that are close together on the keyboard. Used to give better suggestions. Not supported. - + LANG (Hunspell) *spell-LANG* This specifies language-specific behavior. This actually moves part of the language knowledge into the program, diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4a47c33757..6606524abc 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.0. Last change: 2017 Feb 06 +*syntax.txt* For Vim version 8.0. Last change: 2017 Jun 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4812,10 +4812,11 @@ ctermbg={color-nr} *highlight-ctermbg* Example: > :highlight Normal ctermfg=grey ctermbg=darkblue < When setting the "ctermbg" color for the Normal group, the - 'background' option will be adjusted automatically. This causes the - highlight groups that depend on 'background' to change! This means - you should set the colors for Normal first, before setting other - colors. + 'background' option will be adjusted automatically, under the + condition that the color is recognized and 'background' was not set + explicitly. This causes the highlight groups that depend on + 'background' to change! This means you should set the colors for + Normal first, before setting other colors. When a colorscheme is being used, changing 'background' causes it to be reloaded, which may reset all colors (including Normal). First delete the "g:colors_name" variable when you don't want this. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index eda32c563c..ac8026ba83 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2017 May 27 +*todo.txt* For Vim version 8.0. Last change: 2017 Jun 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -112,30 +112,19 @@ Regexp problems: With foldmethod=syntax and nofoldenable comment highlighting isn't removed. (Marcin Szewczyk, 2017 Apr 26) -Patch for Murphy filetype detection. (Matthew Fernandez, 2017 May 17) - -ZoomWin plugin ratings went down a lot. Bot problem? (Charles Campbell, 2017 -May 18) +ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737) ml_get errors with buggy script. (Dominique, 2017 Apr 30) Error in emsg with buggy script. (Dominique, 2017 Apr 30) -Patch to update 'runtimepath' earlier. (Ingo Karkat, 2017 May 5, #1680) - -Patch to make float2nr() more accurate. (Hirohito Higashi, 2017 May 7, #1688) - -Patch to make :hardcopy handle spaces correctly. (Christian Brabandt, 2017 May -7, #1682) - 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. -Patch to recognize 'bg' detection. (Lemonboy, 2017 May 18, #1710) - -Patch to recognize 1.0 as a whole as a float. (Yasuhiro Matsumoto, 2017 May -11) +Using freed memory with "qf" FileType autocommand that does :cclose. +(Lemonboy, 2017 May 28, #1730, fix in 1734, with test that doesn't fail, but +it fails when run manually) Add "starting" to test_override()? Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696) @@ -144,13 +133,6 @@ case of :bwipe followed by :new. Files for Latvian language. (Vitolins, 2017 May 3, #1675) -Adding a filetype in a "start" package is not picked up as expected. -(comment by Ingo Karkat, #1679) -Patch for a fix, Ingo Karkat, #1693. - -Patch to fix character class detection in NFA engine. -(James McCoy, 2017 May 12, update May 24, #1703) - Setting 'clipboard' to "unnamed" makes a global command very slow (Daniel Drucker, 2017 May 8). This was supposed to be fixed, did it break again somehow? @@ -160,13 +142,17 @@ Better TeX indent file. (Christian Brabandt, 2017 May 3) Openhab syntax file (mueller, #1678) -Followup patch for 8.0.0590 for "context" in locations. (Yegappan, 2017 May 4) - Use gvimext.dll from the nightly build? (Issue #249) Patch to remove HAVE_GTK_MULTIHEAD-relevant code. (Kazunobu Kuriyama, 2017 May 5) Update May 11 +'synmaxcol' works with bytes instead of screen cells. (Llandon, 2017 May 31, +#1736) + +Patch to pass quickfix list index to functions. (Yegappan Lakshmanan, 2017 May +31) + Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May 8, #1690) @@ -184,6 +170,8 @@ Bogus characters inserted when triggering indent while changing text. Patch to have ":stag" respect 'switchbuf'. (Ingo Karkat, 2017 May 5, #1681) +Patch to improve building with MSVC. (Leonardo Manera, #1747) + Wrong selection of quoted text (Guraga, #1687) Patch to fix selection of quoted text. (Christian Brabandt, 2017 May 7, #1687) @@ -199,8 +187,9 @@ Is it possible to keep the complete menu open when calling complete()? Calling may_req_ambiguous_char_width() and may_req_bg_color() only after executing command line commands may not work properly. -Set "starting" to 0 earlier, and move the may_req calls above exe_commands()? (Rastislav Barlink, 2017 May 18) +Set "starting" to 0 earlier, and move the may_req calls above exe_commands()? +No, that's a problem with using "-c quit", not running Vim interactive. Memory leak in test97? The string is actually freed. Weird. @@ -219,6 +208,9 @@ Even better: add a way to disable a mapping temporarily and re-enable it later. This is for a sub-mode that is active for a short while (one buffer). Still need maplist() to find the mappings. What can we use to identify a mapping? Something unique would be better than the LHS. +Perhaps simpler: actually delete the mappings. Use maplist() to list matching +mappings (with a lhs prefix, like maparg()), mapdelete() to delete, +maprestore() to restore (using the output of maplist(). Patch to support chinese wordcount in utf-8. (Rain, 2017 May 24, #1722) Or not? @@ -232,6 +224,10 @@ Wrong memory access using p_fdm, found in patch to add tests for diff mode Patch to improve test coverage for diff mode. (Dominique Pelle, 2017 May 11, #1685) +Add an argument to :mkvimrc (or add aother command) to skip mappings from +plugins (source is a Vim script). No need to put these in a .vimrc, they will +be defined when the plugin is loaded. + Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}]) tb_highlight(winid, 'ToolBar') tb_get(winid) @@ -265,6 +261,10 @@ Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17) Completion for :!cmd shows each match twice. #1435 +Patch to change GUI behavior: instead of changing the window size change the +lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20, +#703) + GTK: When adding a timer from 'balloonexpr' it won't fire, because g_main_context_iteration() doesn't return. Need to trigger an event when the timer expires. @@ -598,10 +598,6 @@ When command names are very long :command output is difficult to read. Use a maximum for the column width? (#871) Patcy by varmanishant, 2016 Jun 18, #876 -Patch to change GUI behavior: instead of changing the window size change the -lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20, -#703) - Installation of .desktop files does not work everywhere. It's now fixed, but the target directory probably isn't right. Add configure check? @@ -720,7 +716,8 @@ Value of virtcol() for '[ and '] depend on multi-byte character. (Luchr, #277) Can we cache the syntax attributes, so that updates for 'relativenumber' and -'cursorline'/'cursorcolumn' are a lot faster? +'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes +before combining them. C highlighting: modern C allows: /* comment */ #ifdef and also line continuation after #include. diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt index 8a0fe74d9f..694670afa5 100644 --- a/runtime/doc/usr_09.txt +++ b/runtime/doc/usr_09.txt @@ -191,7 +191,7 @@ mouse button. The selected text will be inserted. The "current selection" will only remain valid until some other text is selected. After doing the paste in the other gVim, now select some characters in that window. You will notice that the words that were previously selected -in the other gVim window are displayed differently. This means that it no +in the other gvim window are displayed differently. This means that it no longer is the current selection. You don't need to select text with the mouse, using the keyboard commands for @@ -215,7 +215,7 @@ USING BOTH This use of both the "current selection" and the "real clipboard" might sound a bit confusing. But it is very useful. Let's show this with an example. -Use one gVim with a text file and perform these actions: +Use one gvim with a text file and perform these actions: - Select two words in Visual mode. - Use the Edit/Copy menu to get these words onto the clipboard. diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index f0205dd632..ce4f01c232 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -9250,7 +9250,7 @@ Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c, src/proto/quickfix.pro, src/quickfix.c Patch 6.1.424 (extra) -Problem: Win32: Gvim compiled with VC++ 7.0 run on Windows 95 does not show +Problem: Win32: gvim compiled with VC++ 7.0 run on Windows 95 does not show menu items. Solution: Define $WINVER to avoid an extra item is added to MENUITEMINFO. (Muraoka Taro) @@ -12319,7 +12319,7 @@ Solution: Don't ignore the WM_SYSKEYUP event when the menu is disabled. Files: src/gui_w32.c Patch 6.2.362 (extra, after 6.2.347) -Problem: Win32: The manifest causes Gvim not to work. (Dave Roberts) +Problem: Win32: The manifest causes gvim not to work. (Dave Roberts) Solution: Change "x86" to "X86". (Serge Pirotte) Files: src/gvim.exe.mnf diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 98ea0a37bd..d05871ea94 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -4151,7 +4151,7 @@ Patch 7.0.173 Problem: ":call f().TT()" doesn't work. (Richard Emberson) Solution: When a function returns a Dictionary or another composite continue evaluating what follows. -Files: src/eval.c +Files: src/eval.c Patch 7.0.174 Problem: ":mksession" doesn't restore window layout correctly in tab pages @@ -4265,7 +4265,7 @@ Problem: When 'swapfile' is switched off in an empty file it is possible that not all blocks are loaded into memory, causing ml_get errors later. Solution: Rename "dont_release" to "mf_dont_release" and also use it to - avoid using the cached line and locked block. + avoid using the cached line and locked block. Files: src/globals.h, src/memfile.c, src/memline.c Patch 7.0.193 @@ -6031,7 +6031,7 @@ Solution: Add type casts. (Ben Schmidt) Files: src/version.c Patch 7.1.207 -Problem: Netbeans: "remove" cannot delete one line. +Problem: Netbeans: "remove" cannot delete one line. Solution: Remove partial lines and whole lines properly. Avoid a memory leak. (Xavier de Gaye) Files: src/netbeans.c @@ -7991,7 +7991,7 @@ Files: src/ex_cmds.c Patch 7.2.097 Problem: "!xterm&" doesn't work when 'shell' is "bash". -Solution: Ignore SIGHUP after calling setsid(). (Simon Schubert) +Solution: Ignore SIGHUP after calling setsid(). (Simon Schubert) Files: src/os_unix.c Patch 7.2.098 @@ -8740,7 +8740,7 @@ Files: src/gui_gtk_x11.c, src/message.c, src/ops.c, src/proto/ui.pro, src/ui.c Patch 7.2.222 -Problem: ":mksession" doesn't work properly with 'acd' set. +Problem: ":mksession" doesn't work properly with 'acd' set. Solution: Make it work. (Yakov Lerner) Files: src/ex_docmd.c @@ -9150,7 +9150,7 @@ Solution: Add the missing "else". (Lech Lorens) Files: src/ops.c Patch 7.2.293 -Problem: When setting 'comments' option it may be used in a wrong way. +Problem: When setting 'comments' option it may be used in a wrong way. Solution: Don't increment after skipping over digits. (Yukihiro Nakadaira) Files: src/misc1.c @@ -10191,32 +10191,32 @@ More information here: |two-engines| Better Python interface *better-python-interface* ----------------------- -Added |python-bindeval| function. Unlike |python-eval| this one returns -|python-Dictionary|, |python-List| and |python-Function| objects for -dictionaries lists and functions respectively in place of their Python +Added |python-bindeval| function. Unlike |python-eval| this one returns +|python-Dictionary|, |python-List| and |python-Function| objects for +dictionaries lists and functions respectively in place of their Python built-in equivalents (or None if we are talking about function references). - For simple types this function returns Python built-in types and not only -Python `str()` like |python-eval| does. On Python 3 it will return `bytes()` + For simple types this function returns Python built-in types and not only +Python `str()` like |python-eval| does. On Python 3 it will return `bytes()` objects in place of `str()` ones avoiding possibility of UnicodeDecodeError. Interface of new objects mimics standard Python `dict()` and `list()` interfaces to some extent. Extent will be improved in the future. -Added special |python-vars| objects also available for |python-buffer| and +Added special |python-vars| objects also available for |python-buffer| and |python-window|. They ease access to Vim script variables from Python. -Now you no longer need to alter `sys.path` to import your module: special -hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and -{rtp}/pythonx directories (for Python 2, Python 3 and both respectively). +Now you no longer need to alter `sys.path` to import your module: special +hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and +{rtp}/pythonx directories (for Python 2, Python 3 and both respectively). See |python-special-path|. Added possibility to work with |tabpage|s through |python-tabpage| object. -Added automatic conversion of Vim errors and exceptions to Python +Added automatic conversion of Vim errors and exceptions to Python exceptions. -Changed the behavior of the |python-buffers| object: it now uses buffer numbers -as keys in place of the index of the buffer in the internal buffer list. -This should not break anything as the only way to get this index was +Changed the behavior of the |python-buffers| object: it now uses buffer numbers +as keys in place of the index of the buffer in the internal buffer list. +This should not break anything as the only way to get this index was iterating over |python-buffers|. Added |:pydo| and |:py3do| commands. @@ -10226,7 +10226,7 @@ Added the |pyeval()| and |py3eval()| functions. Now in all places which previously accepted `str()` objects, `str()` and `unicode()` (Python 2) or `bytes()` and `str()` (Python 3) are accepted. -|python-window| has gained `.col` and `.row` attributes that are currently +|python-window| has gained `.col` and `.row` attributes that are currently the only way to get internal window positions. Added or fixed support for `dir()` in Vim Python objects. @@ -10235,12 +10235,12 @@ Added or fixed support for `dir()` in Vim Python objects. Changed *changed-7.4* ------- -Old Python versions (≤2.2) are no longer supported. Building with them did +Old Python versions (≤2.2) are no longer supported. Building with them did not work anyway. Options: - Added ability to automatically save the selection into the system - clipboard when using non-GUI version of Vim (autoselectplus in + Added ability to automatically save the selection into the system + clipboard when using non-GUI version of Vim (autoselectplus in 'clipboard'). Also added ability to use the system clipboard as default register (previously only primary selection could be used). (Ivan Krasilnikov, Christian Brabandt, Bram Moolenaar) @@ -10255,12 +10255,12 @@ Options: 'relativenumber'. (Christian Brabandt) Commands: - |:diffoff| now saves the local values of some settings and restores - them in place of blindly resetting them to the defaults. (Christian + |:diffoff| now saves the local values of some settings and restores + them in place of blindly resetting them to the defaults. (Christian Brabandt) Other: - Lua interface now also uses userdata binded to Vim structures. (Taro + Lua interface now also uses userdata binded to Vim structures. (Taro Muraoka, Luis Carvalho) glob() and autocommand patterns used to work with the undocumented @@ -10285,74 +10285,74 @@ Functions: Added |wildmenumode()| function. (Christian Brabandt) - Debugging functions: |screenattr()|, |screenchar()|, |screencol()|, + Debugging functions: |screenattr()|, |screenchar()|, |screencol()|, |screenrow()|. (Simon Ruderich, Bram Moolenaar) - Added ability to use |Dictionary-function|s for |sort()|ing, via + Added ability to use |Dictionary-function|s for |sort()|ing, via optional third argument. (Nikolay Pavlov) - Added special |expand()| argument that expands to the current line + Added special |expand()| argument that expands to the current line number. - Made it possible to force |char2nr()| to always give unicode codepoints + Made it possible to force |char2nr()| to always give unicode codepoints regardless of current encoding. (Yasuhiro Matsumoto) - Made it possible for functions generating file list generate |List| - and not NL-separated string. (e.g. |glob()|, |expand()|) (Christian + Made it possible for functions generating file list generate |List| + and not NL-separated string. (e.g. |glob()|, |expand()|) (Christian Brabandt) - Functions that obtain variables from the specific window, tabpage or - buffer scope dictionary can now return specified default value in - place of empty string in case variable is not found. (|gettabvar()|, + Functions that obtain variables from the specific window, tabpage or + buffer scope dictionary can now return specified default value in + place of empty string in case variable is not found. (|gettabvar()|, |getwinvar()|, |getbufvar()|) (Shougo Matsushita, Hirohito Higashi) Autocommands: - Added |InsertCharPre| event launched before inserting character. + Added |InsertCharPre| event launched before inserting character. (Jakson A. Aquino) - Added |CompleteDone| event launched after finishing completion in + Added |CompleteDone| event launched after finishing completion in insert mode. (idea by Florian Klein) - Added |QuitPre| event launched when commands that can either close Vim + Added |QuitPre| event launched when commands that can either close Vim or only some window(s) are launched. - Added |TextChanged| and |TextChangedI| events launched when text is + Added |TextChanged| and |TextChangedI| events launched when text is changed. Commands: |:syntime| command useful for debugging. - Made it possible to remove all signs from the current buffer using + Made it possible to remove all signs from the current buffer using |:sign-unplace|. (Christian Brabandt) Added |:language| autocompletion. (Dominique Pelle) - Added more |:command-complete| completion types: |:behave| suboptions, - color schemes, compilers, |:cscope| suboptions, files from 'path', - |:history| suboptions, locale names, |:syntime| suboptions, user + Added more |:command-complete| completion types: |:behave| suboptions, + color schemes, compilers, |:cscope| suboptions, files from 'path', + |:history| suboptions, locale names, |:syntime| suboptions, user names. (Dominique Pelle) - Added |:map-nowait| creating mapping which when having lhs that is the - prefix of another mapping’s lhs will not allow Vim to wait for user to - type more characters to resolve ambiguity, forcing Vim to take the + Added |:map-nowait| creating mapping which when having lhs that is the + prefix of another mapping’s lhs will not allow Vim to wait for user to + type more characters to resolve ambiguity, forcing Vim to take the shorter alternative: one with . Options: Made it possible to ignore case when completing: 'wildignorecase'. - Added ability to delete comment leader when using |J| by `j` flag in + Added ability to delete comment leader when using |J| by `j` flag in 'formatoptions' (|fo-table|). (Lech Lorens) - Added ability to control indentation inside namespaces: |cino-N|. + Added ability to control indentation inside namespaces: |cino-N|. (Konstantin Lepa) - Added ability to control alignment inside `if` condition separately + Added ability to control alignment inside `if` condition separately from alignment inside function arguments: |cino-k|. (Lech Lorens) Other: Improved support for cmd.exe. (Ben Fritz, Bram Moolenaar) - Added |v:windowid| variable containing current window number in GUI + Added |v:windowid| variable containing current window number in GUI Vim. (Christian J. Robinson, Lech Lorens) Added rxvt-unicode and SGR mouse support. (Yiding Jia, Hayaki Saito) @@ -11923,7 +11923,7 @@ Solution: Pass the separator character to in_history(). (Taro Muraoka) Files: src/ex_getln.c Patch 7.3.266 -Problem: In Gvim with iBus typing space in Insert mode doesn't work. +Problem: In gvim with iBus typing space in Insert mode doesn't work. Solution: Clear xim_expected_char after checking it. Files: src/mbyte.c @@ -11938,7 +11938,7 @@ Solution: Use O_NOCTTY both in the master and slave. (Bjorn Winckler) Files: src/os_unix.c Patch 7.3.269 -Problem: 'shellcmdflag' only works with one flag. +Problem: 'shellcmdflag' only works with one flag. Solution: Split into multiple arguments. (Gary Johnson) Files: src/os_unix.c @@ -13118,7 +13118,7 @@ Files: src/ops.c Patch 7.3.477 Problem: Using ":echo" to output enough lines to scroll, then using "j" and "k" at the more prompt, displays the command on top of the output. - (Marcin Szamotulski) + (Marcin Szamotulski) Solution: Put the output below the command. (Christian Brabandt) Files: src/eval.c @@ -13371,7 +13371,7 @@ Solution: Recognize completefunction returning -3. (Matsushita Shougo) Files: src/edit.c Patch 7.3.520 -Problem: Gvim starts up slow on Ubuntu 12.04. +Problem: gvim starts up slow on Ubuntu 12.04. Solution: Move the call to gui_mch_init_check() to after fork(). (Yasuhiro Matsumoto) Do check $DISPLAY being set. Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro @@ -13424,7 +13424,7 @@ Solution: Make the count select that many characters or lines. (Christian Files: src/normal.c Patch 7.3.530 (after 7.3.520) -Problem: Gvim does not work when 'guioptions' includes "f". (Davido) +Problem: gvim does not work when 'guioptions' includes "f". (Davido) Solution: Call gui_mch_init_check() when running GUI in the foreground. (Yasuhiro Matsumoto) Files: src/gui.c @@ -14287,7 +14287,7 @@ Files: Filelist Patch 7.3.682 (after 7.3.677) Problem: Compiler complains about incompatible types. Solution: Remove type casts. (hint by Danek Duvall) -Files: src/edit.c +Files: src/edit.c Patch 7.3.683 Problem: ":python" may crash when vimbindeval() returns None. @@ -16340,7 +16340,7 @@ Solution: Avoid negative argument to vim_strncpy(). (Narendran Files: src/if_cscope.c Patch 7.3.1039 -Problem: New regexp engine does not support \%23c, \%<23c and the like. +Problem: New regexp engine does not support \%23c, \%<23c and the like. Solution: Implement them. (partly by Yasuhiro Matsumoto) Files: src/regexp.h, src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok @@ -17552,9 +17552,9 @@ Solution: Specify a separate viminfo file. Files: src/testdir/test61.in Patch 7.3.1252 -Problem: Gvim does not find the toolbar bitmap files in ~/vimfiles/bitmaps +Problem: gvim does not find the toolbar bitmap files in ~/vimfiles/bitmaps if the corresponding menu command contains additional characters - like the shortcut marker '&' or if you use a non-english locale. + like the shortcut marker '&' or if you use a non-english locale. Solution: Use menu->en_dname or menu->dname. (Martin Gieseking) Files: src/gui_w32.c @@ -18175,7 +18175,7 @@ Files: src/window.c Patch 7.4a.045 Problem: Configure does not always find the right library for Lua. Missing - support for LuaJit. + support for LuaJit. Solution: Improve the configure detection of Lua. (Hiroshi Shirosaki) Files: src/Makefile, src/configure.in, src/auto/configure diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 5a478fb77d..9cb0860e84 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -2,7 +2,7 @@ " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan -" Last Change: 2016 Oct 28 +" Last Change: 2017 Jun 05 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -48,7 +48,7 @@ endif if !exists("cpp_no_cpp14") syn case ignore syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" - syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" + syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" syn case match endif diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim index 11f4c35a58..e398085ba8 100644 --- a/runtime/syntax/haskell.vim +++ b/runtime/syntax/haskell.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Haskell " Maintainer: Haskell Cafe mailinglist -" Last Change: 2008 Dec 15 +" Last Change: 2017 Jun 04 " Original Author: John Williams " " Thanks to Ryan Crumley for suggestions and John Meacham for @@ -62,7 +62,7 @@ syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hs syn match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" syn match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" -" Keyword definitions. These must be patters instead of keywords +" Keyword definitions. These must be patterns instead of keywords " because otherwise they would match as keywords at the start of a " "literate" comment (see lhs.vim). syn match hsModule "\" diff --git a/src/po/it.po b/src/po/it.po index c527b76570..2190047e0e 100644 --- a/src/po/it.po +++ b/src/po/it.po @@ -13,8 +13,8 @@ msgid "" msgstr "" "Project-Id-Version: vim 7.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-16 16:34+0200\n" -"PO-Revision-Date: 2016-07-16 16:50+0200\n" +"POT-Creation-Date: 2017-05-28 10:54+0200\n" +"PO-Revision-Date: 2017-05-28 23:45+0200\n" "Last-Translator: Antonio Colombo \n" "Language-Team: Antonio Colombo \n" "Language: Italian\n" @@ -57,6 +57,9 @@ msgstr "E83: Non riesco ad allocare un buffer, uso l'altro..." msgid "E931: Buffer cannot be registered" msgstr "E931: Non riesco a registrare il buffer" +msgid "E937: Attempt to delete a buffer that is in use" +msgstr "E937: Tentativo di eliminare un buffer ancora usato" + msgid "E515: No buffers were unloaded" msgstr "E515: Nessun buffer scaricato" @@ -210,6 +213,31 @@ msgstr " riga=%ld id=%d, nome=%s" msgid "E902: Cannot connect to port" msgstr "E902: Non posso commettermi alla porta" +msgid "E901: gethostbyname() in channel_open()" +msgstr "E901: gethostbyname() in channel_open()" + +msgid "E898: socket() in channel_open()" +msgstr "E898: socket() in channel_open()" + +msgid "E903: received command with non-string argument" +msgstr "E903: il comando ricevuto non aveva come argomento una stringa" + +msgid "E904: last argument for expr/call must be a number" +msgstr "E904: l'ultimo argomento per espressione/chiamata dev'essere numerico" + +msgid "E904: third argument for call must be a list" +msgstr "E904: il terzo argomento della chiamata dev'essere una Lista" + +msgid "E905: received unknown command: %s" +msgstr "E905: recevuto comando non conosciuto: %s" + +#, c-format +msgid "E630: %s(): write while not connected" +msgstr "E630: %s(): scrittura in mancanza di connessione" + +msgid "E631: %s(): write failed" +msgstr "E631: %s(): scrittura non riuscita" + #, c-format msgid "E917: Cannot use a callback with %s()" msgstr "E917: Non posso usare callback con %s()" @@ -249,7 +277,29 @@ msgid "[crypted]" msgstr "[cifrato]" #, c-format -msgid "E96: Can not diff more than %ld buffers" +msgid "E720: Missing colon in Dictionary: %s" +msgstr "E720: Manca ':' nel Dizionario: %s" + +#, c-format +msgid "E721: Duplicate key in Dictionary: \"%s\"" +msgstr "E721: Chiave duplicata nel Dizionario: \"%s\"" + +#, c-format +msgid "E722: Missing comma in Dictionary: %s" +msgstr "E722: Manca virgola nel Dizionario: %s" + +#, c-format +msgid "E723: Missing end of Dictionary '}': %s" +msgstr "E723: Manca '}' a fine Dizionario: %s" + +msgid "extend() argument" +msgstr "argomento di extend()" + +#, c-format +msgid "E737: Key already exists: %s" +msgstr "E737: Chiave già esistente: %s" + +msgid "E96: Cannot diff more than %ld buffers" msgstr "E96: Non supporto differenze fra più di %ld buffer" msgid "E810: Cannot read or write temp files" @@ -377,6 +427,9 @@ msgstr "Scansione: %s" msgid "Scanning tags." msgstr "Scansione tag." +msgid "match in file" +msgstr "corrispondenza nel file" + msgid " Adding" msgstr " Aggiungo" @@ -404,13 +457,10 @@ msgstr "corrispondenza %d di %d" msgid "match %d" msgstr "corrispondenza %d" +#. maximum nesting of lists and dicts msgid "E18: Unexpected characters in :let" msgstr "E18: Caratteri non previsti in :let" -#, c-format -msgid "E684: list index out of range: %ld" -msgstr "E684: indice lista fuori intervallo: %ld" - #, c-format msgid "E121: Undefined variable: %s" msgstr "E121: Variabile non definita: %s" @@ -418,41 +468,6 @@ msgstr "E121: Variabile non definita: %s" msgid "E111: Missing ']'" msgstr "E111: Manca ']'" -#, c-format -msgid "E686: Argument of %s must be a List" -msgstr "E686: L'argomento di %s deve essere una Lista" - -#, c-format -msgid "E712: Argument of %s must be a List or Dictionary" -msgstr "E712: L'argomento di %s deve essere una Lista o un Dizionario" - -msgid "E714: List required" -msgstr "E714: È necessaria una Lista" - -msgid "E715: Dictionary required" -msgstr "E715: È necessario un Dizionario" - -msgid "E928: String required" -msgstr "E928: Stringa necessaria" - -#, c-format -msgid "E118: Too many arguments for function: %s" -msgstr "E118: Troppi argomenti per la funzione: %s" - -#, c-format -msgid "E716: Key not present in Dictionary: %s" -msgstr "E716: Chiave assente dal Dizionario: %s" - -#, c-format -msgid "E122: Function %s already exists, add ! to replace it" -msgstr "E122: La funzione %s esiste già, aggiungi ! per sostituirla" - -msgid "E717: Dictionary entry already exists" -msgstr "E717: C'è già la voce nel Dizionario" - -msgid "E718: Funcref required" -msgstr "E718: Funcref necessario" - msgid "E719: Cannot use [:] with a Dictionary" msgstr "E719: Non posso usare [:] con un Dizionario" @@ -460,10 +475,6 @@ msgstr "E719: Non posso usare [:] con un Dizionario" msgid "E734: Wrong variable type for %s=" msgstr "E734: Tipo di variabile errato per %s=" -#, c-format -msgid "E130: Unknown function: %s" -msgstr "E130: Funzione sconosciuta: %s" - #, c-format msgid "E461: Illegal variable name: %s" msgstr "E461: Nome di variabile non ammesso: %s" @@ -503,14 +514,15 @@ msgstr "E711: Il valore Lista non ha elementi sufficienti" msgid "E690: Missing \"in\" after :for" msgstr "E690: Manca \"in\" dopo :for" -#, c-format -msgid "E107: Missing parentheses: %s" -msgstr "E107: Mancano parentesi: %s" - #, c-format msgid "E108: No such variable: \"%s\"" msgstr "E108: Variabile inesistente: \"%s\"" +#. For historic reasons this error is not given for a list or dict. +#. * E.g., the b: dict could be locked/unlocked. +msgid "E940: Cannot lock or unlock variable %s" +msgstr "E940: Non riesco a bloccare o sbloccare la variabile %s" + msgid "E743: variable nested too deep for (un)lock" msgstr "E743: variabile troppo nidificata per lock/unlock" @@ -560,194 +572,12 @@ msgstr "E114: Manca '\"': %s" msgid "E115: Missing quote: %s" msgstr "E115: Manca apostrofo: %s" -#, c-format -msgid "E696: Missing comma in List: %s" -msgstr "E696: Manca virgola nella Lista: %s" - -#, c-format -msgid "E697: Missing end of List ']': %s" -msgstr "E697: Manca ']' a fine Lista: %s" - msgid "Not enough memory to set references, garbage collection aborted!" msgstr "Memoria insufficiente per impostarlo, recupero memoria fallito!" -#, c-format -msgid "E720: Missing colon in Dictionary: %s" -msgstr "E720: Manca ':' nel Dizionario: %s" - -#, c-format -msgid "E721: Duplicate key in Dictionary: \"%s\"" -msgstr "E721: Chiave duplicata nel Dizionario: \"%s\"" - -#, c-format -msgid "E722: Missing comma in Dictionary: %s" -msgstr "E722: Manca virgola nel Dizionario: %s" - -#, c-format -msgid "E723: Missing end of Dictionary '}': %s" -msgstr "E723: Manca '}' a fine Dizionario: %s" - -#, c-format -msgid "E125: Illegal argument: %s" -msgstr "E125: Argomento non ammesso: %s" - -#, c-format -msgid "E853: Duplicate argument name: %s" -msgstr "E853: Nome argomento duplicato: %s" - msgid "E724: variable nested too deep for displaying" msgstr "E724: variabile troppo nidificata per la visualizzazione" -#, c-format -msgid "E740: Too many arguments for function %s" -msgstr "E740: Troppi argomenti per la funzione: %s" - -#, c-format -msgid "E116: Invalid arguments for function %s" -msgstr "E116: Argomenti non validi per la funzione: %s" - -#, c-format -msgid "E117: Unknown function: %s" -msgstr "E117: Funzione sconosciuta: %s" - -#, c-format -msgid "E119: Not enough arguments for function: %s" -msgstr "E119: La funzione: %s richiede più argomenti" - -#, c-format -msgid "E120: Using not in a script context: %s" -msgstr "E120: Uso di fuori dal contesto di uno script: %s" - -#, c-format -msgid "E725: Calling dict function without Dictionary: %s" -msgstr "E725: Chiamata di funzione dict in assenza di Dizionario: %s" - -msgid "E808: Number or Float required" -msgstr "E808: Ci vuole un Numero o un Numero-a-virgola-mobile" - -msgid "add() argument" -msgstr "argomento di add()" - -msgid "E699: Too many arguments" -msgstr "E699: Troppi argomenti" - -msgid "E785: complete() can only be used in Insert mode" -msgstr "E785: complete() può essere usata solo in modalità inserimento" - -#. -#. * Yes this is ugly, I don't particularly like it either. But doing it -#. * this way has the compelling advantage that translations need not to -#. * be touched at all. See below what 'ok' and 'ync' are used for. -#. -msgid "&Ok" -msgstr "&OK" - -msgid "extend() argument" -msgstr "argomento di extend()" - -#, c-format -msgid "E737: Key already exists: %s" -msgstr "E737: Chiave già esistente: %s" - -msgid "map() argument" -msgstr "argomento di map()" - -msgid "filter() argument" -msgstr "argomento di filter()" - -#, c-format -msgid "+-%s%3ld lines: " -msgstr "+-%s%3ld righe: " - -#, c-format -msgid "E700: Unknown function: %s" -msgstr "E700: Funzione sconosciuta: %s" - -msgid "E922: expected a dict" -msgstr "E922: aspettavo un Dizionario" - -msgid "E923: Second argument of function() must be a list or a dict" -msgstr "" -"E923: Il secondo argomento di function() dev'essere una Lista o un Dizionario" - -msgid "" -"&OK\n" -"&Cancel" -msgstr "" -"&OK\n" -"&Non eseguire" - -msgid "called inputrestore() more often than inputsave()" -msgstr "inputrestore() chiamata più volte di inputsave()" - -msgid "insert() argument" -msgstr "argomento di insert()" - -msgid "E786: Range not allowed" -msgstr "E786: Intervallo non consentito" - -msgid "E916: not a valid job" -msgstr "E916: job non valido" - -msgid "E701: Invalid type for len()" -msgstr "E701: Tipo non valido per len()" - -msgid "E726: Stride is zero" -msgstr "E726: Incremento indice a zero" - -msgid "E727: Start past end" -msgstr "E727: Indice iniziale superiore a quello finale" - -msgid "" -msgstr "" - -msgid "E240: No connection to Vim server" -msgstr "E240: Manca connessione con server Vim" - -#, c-format -msgid "E241: Unable to send to %s" -msgstr "E241: Impossibile inviare a %s" - -msgid "E277: Unable to read a server reply" -msgstr "E277: Non riesco a leggere una risposta del server" - -msgid "remove() argument" -msgstr "argomento di remove()" - -msgid "E655: Too many symbolic links (cycle?)" -msgstr "E655: Troppi link simbolici (circolarità?)" - -msgid "reverse() argument" -msgstr "argomento di reverse()" - -msgid "E258: Unable to send to client" -msgstr "E258: Impossibile inviare al client" - -#, c-format -msgid "E927: Invalid action: '%s'" -msgstr "E927: Azione non valida: '%s'" - -msgid "sort() argument" -msgstr "argomento di sort()" - -msgid "uniq() argument" -msgstr "argomento di uniq()" - -msgid "E702: Sort compare function failed" -msgstr "E702: Funzione confronto nel sort non riuscita" - -msgid "E882: Uniq compare function failed" -msgstr "E882: Funzione confronto in uniq non riuscita" - -msgid "(Invalid)" -msgstr "(Non valido)" - -msgid "E677: Error writing temp file" -msgstr "E677: Errore in scrittura su file temporaneo" - -msgid "E921: Invalid callback argument" -msgstr "E921: Argomento callback non valido" - msgid "E805: Using a Float as a Number" msgstr "E805: Uso di un Numero-a-virgola-mobile come Numero" @@ -827,74 +657,6 @@ msgstr "E742: Non riesco a cambiare il valore di %s" msgid "E698: variable nested too deep for making a copy" msgstr "E698: Variabile troppo nidificata per poterla copiare" -#, c-format -msgid "E123: Undefined function: %s" -msgstr "E123: Funzione non definita: %s" - -#, c-format -msgid "E124: Missing '(': %s" -msgstr "E124: Manca '(': %s" - -msgid "E862: Cannot use g: here" -msgstr "E862: Non si può usare g: qui" - -msgid "E126: Missing :endfunction" -msgstr "E126: Manca :endfunction" - -#, c-format -msgid "E707: Function name conflicts with variable: %s" -msgstr "E707: Nome funzione in conflitto con la variabile: %s" - -#, c-format -msgid "E127: Cannot redefine function %s: It is in use" -msgstr "E127: Non posso ridefinire la funzione %s: È in uso" - -#, c-format -msgid "E746: Function name does not match script file name: %s" -msgstr "E746: Il nome funzione non corrisponde al nome file dello script: %s" - -msgid "E129: Function name required" -msgstr "E129: Nome funzione necessario" - -#, c-format -msgid "E128: Function name must start with a capital or \"s:\": %s" -msgstr "E128: Il nome funzione deve iniziare con maiuscola o \"s:\": %s" - -#, c-format -msgid "E884: Function name cannot contain a colon: %s" -msgstr "E884: Il nome della funzione non può contenere un due punti: %s" - -#, c-format -msgid "E131: Cannot delete function %s: It is in use" -msgstr "E131: Non posso eliminare la funzione %s: È in uso" - -msgid "E132: Function call depth is higher than 'maxfuncdepth'" -msgstr "" -"E132: Nidificazione della chiamata di funzione maggiore di 'maxfuncdepth'" - -#, c-format -msgid "calling %s" -msgstr "chiamo %s" - -#, c-format -msgid "%s aborted" -msgstr "%s non completata" - -#, c-format -msgid "%s returning #%ld" -msgstr "%s ritorno #%ld" - -#, c-format -msgid "%s returning %s" -msgstr "%s ritorno %s" - -#, c-format -msgid "continuing in %s" -msgstr "continuo in %s" - -msgid "E133: :return not inside a function" -msgstr "E133: :return fuori da una funzione" - msgid "" "\n" "# global variables:\n" @@ -909,8 +671,137 @@ msgstr "" "\n" "\tImpostata l'ultima volta da " -msgid "No old files" -msgstr "Nessun file elaborato in precedenza" +msgid "map() argument" +msgstr "argomento di map()" + +msgid "filter() argument" +msgstr "argomento di filter()" + +#, c-format +msgid "E686: Argument of %s must be a List" +msgstr "E686: L'argomento di %s deve essere una Lista" + +msgid "E928: String required" +msgstr "E928: Stringa necessaria" + +msgid "E808: Number or Float required" +msgstr "E808: Ci vuole un Numero o un Numero-a-virgola-mobile" + +msgid "add() argument" +msgstr "argomento di add()" + +msgid "E785: complete() can only be used in Insert mode" +msgstr "E785: complete() può essere usata solo in modalità inserimento" + +#. +#. * Yes this is ugly, I don't particularly like it either. But doing it +#. * this way has the compelling advantage that translations need not to +#. * be touched at all. See below what 'ok' and 'ync' are used for. +#. +msgid "&Ok" +msgstr "&OK" + +#, c-format +msgid "E700: Unknown function: %s" +msgstr "E700: Funzione sconosciuta: %s" + +msgid "E922: expected a dict" +msgstr "E922: aspettavo un Dizionario" + +msgid "E923: Second argument of function() must be a list or a dict" +msgstr "" +"E923: Il secondo argomento di function() dev'essere una Lista o un Dizionario" + +msgid "" +"&OK\n" +"&Cancel" +msgstr "" +"&OK\n" +"&Non eseguire" + +msgid "called inputrestore() more often than inputsave()" +msgstr "inputrestore() chiamata più volte di inputsave()" + +msgid "insert() argument" +msgstr "argomento di insert()" + +msgid "E786: Range not allowed" +msgstr "E786: Intervallo non consentito" + +msgid "E916: not a valid job" +msgstr "E916: job non valido" + +msgid "E701: Invalid type for len()" +msgstr "E701: Tipo non valido per len()" + +#, c-format +msgid "E798: ID is reserved for \":match\": %ld" +msgstr "E798: ID riservato per \":match\": %ld" + +msgid "E726: Stride is zero" +msgstr "E726: Incremento indice a zero" + +msgid "E727: Start past end" +msgstr "E727: Indice iniziale superiore a quello finale" + +msgid "" +msgstr "" + +msgid "E240: No connection to the X server" +msgstr "E240: Manca connessione con server Vim" + +#, c-format +msgid "E241: Unable to send to %s" +msgstr "E241: Impossibile inviare a %s" + +msgid "E277: Unable to read a server reply" +msgstr "E277: Non riesco a leggere una risposta del server" + +msgid "E941: already started a server" +msgstr "E941: un server è già stato predisposto" + +msgid "E942: +clientserver feature not available" +msgstr "E942: funzionalità +clientserver non disponibile" + +msgid "remove() argument" +msgstr "argomento di remove()" + +msgid "E655: Too many symbolic links (cycle?)" +msgstr "E655: Troppi link simbolici (circolarità?)" + +msgid "reverse() argument" +msgstr "argomento di reverse()" + +msgid "E258: Unable to send to client" +msgstr "E258: Impossibile inviare al client" + +#, c-format +msgid "E927: Invalid action: '%s'" +msgstr "E927: Azione non valida: '%s'" + +msgid "sort() argument" +msgstr "argomento di sort()" + +msgid "uniq() argument" +msgstr "argomento di uniq()" + +msgid "E702: Sort compare function failed" +msgstr "E702: Funzione confronto nel sort non riuscita" + +msgid "E882: Uniq compare function failed" +msgstr "E882: Funzione confronto in uniq non riuscita" + +msgid "(Invalid)" +msgstr "(Non valido)" + +msgid "E935: invalid submatch number: %d" +msgstr "E935: nomeri di sotto-corrispondenza non valido: %d" + +msgid "E677: Error writing temp file" +msgstr "E677: Errore in scrittura su file temporaneo" + +msgid "E921: Invalid callback argument" +msgstr "E921: Argomento callback non valido" #, c-format msgid "<%s>%s%s %d, Hex %02x, Octal %03o" @@ -1146,6 +1037,9 @@ msgstr "E149: Spiacente, nessun aiuto per %s" msgid "Sorry, help file \"%s\" not found" msgstr "Spiacente, non trovo file di aiuto \"%s\"" +msgid "E151: No match: %s" +msgstr "E151: Nessuna corrispondenza: %s" + #, c-format msgid "E152: Cannot open %s for writing" msgstr "E152: Non posso aprire %s in scrittura" @@ -1191,6 +1085,9 @@ msgstr "E159: Manca numero 'sign'" msgid "E158: Invalid buffer name: %s" msgstr "E158: Nome buffer non valido: %s" +msgid "E934: Cannot jump to a buffer that does not have a name" +msgstr "E934: Impossibile passare a un buffer che non ha un nome" + #, c-format msgid "E157: Invalid sign ID: %ld" msgstr "E157: ID 'sign' non valido: %ld" @@ -1208,6 +1105,9 @@ msgstr " (non supportata)" msgid "[Deleted]" msgstr "[Cancellato]" +msgid "No old files" +msgstr "Nessun file elaborato in precedenza" + msgid "Entering Debug mode. Type \"cont\" to continue." msgstr "Entro modalità Debug. Batti \"cont\" per continuare." @@ -1280,9 +1180,18 @@ msgstr "Cerco \"%s\" in \"%s\"" msgid "Searching for \"%s\"" msgstr "Cerco \"%s\"" +#, c-format msgid "not found in '%s': \"%s\"" msgstr "non trovato in '%s': \"%s\"" +#, c-format +msgid "W20: Required python version 2.x not supported, ignoring file: %s" +msgstr "W20: Versione richiesta di python 2.x non supportata, ignoro il file: %s" + +#, c-format +msgid "W21: Required python version 3.x not supported, ignoring file: %s" +msgstr "W21: Versione richiesta di python 3.x non supportata, ignoro il file: %s" + msgid "Source Vim script" msgstr "Esegui script Vim" @@ -1310,6 +1219,10 @@ msgstr "riga %ld: eseguo \"%s\"" msgid "finished sourcing %s" msgstr "esecuzione di %s terminata" +#, c-format +msgid "continuing in %s" +msgstr "continuo in %s" + msgid "modeline" msgstr "modeline" @@ -1376,6 +1289,9 @@ msgstr "Intervallo rovesciato, OK invertirlo" msgid "E494: Use w or w>>" msgstr "E494: Usa w oppure w>>" +msgid "E943: Command table needs to be updated, run 'make cmdidxs'" +msgstr "E943: Tabella dei comandi da aggiornare, eseguire 'make cmdidxs'" + msgid "E319: Sorry, the command is not available in this version" msgstr "E319: Spiacente, comando non disponibile in questa versione" @@ -2081,6 +1997,12 @@ msgstr "auto-rimozione dell'autocomando: %s " msgid "E367: No such group: \"%s\"" msgstr "E367: Gruppo inesistente: \"%s\"" +msgid "E936: Cannot delete the current group" +msgstr "E936: Non posso cancellare il gruppo corrente" + +msgid "W19: Deleting augroup that is still in use" +msgstr "W19: Cancello augroup, ma è ancora in uso" + #, c-format msgid "E215: Illegal character after *: %s" msgstr "E215: Carattere non ammesso dopo *: %s" @@ -2141,10 +2063,6 @@ msgstr "E350: Non posso creare piegatura con il 'foldmethod' in uso" msgid "E351: Cannot delete fold with current 'foldmethod'" msgstr "E351: Non posso cancellare piegatura con il 'foldmethod' in uso" -#, c-format -msgid "+--%3ld lines folded " -msgstr "+--%3ld righe piegate" - msgid "E222: Add to read buffer" msgstr "E222: Aggiunto al buffer di lettura" @@ -2930,6 +2848,17 @@ msgstr "E573: Identificativo di server non valido: %s" msgid "E251: VIM instance registry property is badly formed. Deleted!" msgstr "E251: Proprietà registry relative a VIM non adeguate. Cancellate!" +msgid "E938: Duplicate key in JSON: \"%s\"" +msgstr "E938: Chiave duplicata in JSON: \"%s\"" + +#, c-format +msgid "E696: Missing comma in List: %s" +msgstr "E696: Manca virgola nella Lista: %s" + +#, c-format +msgid "E697: Missing end of List ']': %s" +msgstr "E697: Manca ']' a fine Lista: %s" + msgid "Unknown option argument" msgstr "Argomento di opzione sconosciuto" @@ -2955,12 +2884,12 @@ msgstr "%d file da elaborare\n" msgid "netbeans is not supported with this GUI\n" msgstr "netbeans non è supportato con questa GUI\n" -msgid "This Vim was not compiled with the diff feature." -msgstr "Vim non compilato con funzionalità 'diff'." - msgid "'-nb' cannot be used: not enabled at compile time\n" msgstr "'-nb' non disponibile: non abilitato in compilazione\n" +msgid "This Vim was not compiled with the diff feature." +msgstr "Vim non compilato con funzionalità 'diff'." + msgid "Attempt to open script file again: \"" msgstr "Tento di riaprire lo script file: \"" @@ -2974,8 +2903,8 @@ msgid "Vim: Error: Failure to start gvim from NetBeans\n" msgstr "Vim: Errore: Avvio di gvim da NetBeans non riuscito\n" msgid "Vim: Error: This version of Vim does not run in a Cygwin terminal\n" -msgstr "Vim: Errore: Questa versione di Vim non funziona in un" -" terminale Cygwin\n" +msgstr "" +"Vim: Errore: Questa versione di Vim non funziona in un terminale Cygwin\n" msgid "Vim: Warning: Output is not to a terminal\n" msgstr "Vim: Avviso: Output non diretto a un terminale\n" @@ -3144,11 +3073,14 @@ msgstr "-T \tImposta tipo terminale a " msgid "--not-a-term\t\tSkip warning for input/output not being a terminal" msgstr "--not-a-term\t\tNon avvisare se input/output non da terminale" +msgid "--ttyfail\t\tExit if input or output is not a terminal" +msgstr "--ttyfail\t\tEsce se l'input o l'output non sono da un terminale" + msgid "-u \t\tUse instead of any .vimrc" -msgstr "-u \t\tUsa invece di .vimrc" +msgstr "-u \t\tUsa invece di qualche .vimrc" msgid "-U \t\tUse instead of any .gvimrc" -msgstr "-U \t\tUsa invece di .gvimrc" +msgstr "-U \t\tUsa invece di qualche .gvimrc" msgid "--noplugin\t\tDon't load plugin scripts" msgstr "--noplugin\t\tNon caricare script plugin" @@ -4278,27 +4210,31 @@ msgstr "" msgid "%ld Cols; " msgstr "%ld Col.; " +#, c-format msgid "Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Bytes" msgstr "" "Selezionate %s%ld di %ld Righe; %lld di %lld Parole; %lld di %lld Caratt." +#, c-format msgid "" "Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Chars; %lld of " "%lld Bytes" msgstr "" -"Selezionate %s%ld di %ld Righe; %lld di %lld Parole; %lld di %lld Caratt.;" -" %lld di %lld Byte" +"Selezionate %s%ld di %ld Righe; %lld di %lld Parole; %lld di %lld Caratt.; " +"%lld di %lld Byte" +#, c-format msgid "Col %s of %s; Line %ld of %ld; Word %lld of %lld; Byte %lld of %lld" msgstr "" "Col. %s di %s; Riga %ld di %ld; Parola %lld di %lld; Caratt. %lld di %lld" +#, c-format msgid "" "Col %s of %s; Line %ld of %ld; Word %lld of %lld; Char %lld of %lld; Byte " "%lld of %lld" msgstr "" -"Col. %s di %s; Riga %ld di %ld; Parola %lld di %lld; Caratt. %lld di %lld;" -" Byte %lld di %lld" +"Col. %s di %s; Riga %ld di %ld; Parola %lld di %lld; Caratt. %lld di %lld; " +"Byte %lld di %lld" #, c-format msgid "(+%ld for BOM)" @@ -4529,9 +4465,6 @@ msgstr "ERRORE I/O" msgid "Message" msgstr "Messaggio" -msgid "'columns' is not 80, cannot execute external commands" -msgstr "'columns' non vale 80, non riesco ad eseguire comandi esterni" - msgid "E237: Printer selection failed" msgstr "E237: Scelta stampante non riuscita" @@ -4760,15 +4693,17 @@ msgstr "(%d di %d)%s%s: " msgid " (line deleted)" msgstr " (riga cancellata)" +msgid "%serror list %d of %d; %d errors " +msgstr "%slista errori %d di %d; %d errori" + msgid "E380: At bottom of quickfix stack" msgstr "E380: Al fondo dello stack di quickfix" msgid "E381: At top of quickfix stack" msgstr "E381: In cima allo stack di quickfix" -#, c-format -msgid "error list %d of %d; %d errors" -msgstr "lista errori %d di %d; %d errori" +msgid "No entries" +msgstr "Nessun elemento" msgid "E382: Cannot write, 'buftype' option is set" msgstr "E382: Non posso scrivere, l'opzione 'buftype' è impostata" @@ -4993,9 +4928,6 @@ msgstr " Ebraico" msgid " Arabic" msgstr " Arabo" -msgid " (lang)" -msgstr " (lingua)" - msgid " (paste)" msgstr " (incolla)" @@ -5090,8 +5022,47 @@ msgstr "" "# Ult. %sEspressione di Ricerca:\n" "~" -msgid "E759: Format error in spell file" -msgstr "E759: Errore di formato nel file ortografico" +msgid "E756: Spell checking is not enabled" +msgstr "E756: Controllo ortografico non abilitato" + +#, c-format +msgid "Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\"" +msgstr "Avviso: Non trovo lista parole \"%s_%s.spl\" o \"%s_ascii.spl\"" + +#, c-format +msgid "Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\"" +msgstr "Avviso: Non trovo lista parole \"%s.%s.spl\" o \"%s.ascii.spl\"" + +msgid "E797: SpellFileMissing autocommand deleted buffer" +msgstr "E797: L'autocomando 'SpellFileMissing' ha cancellato il buffer" + +#, c-format +msgid "Warning: region %s not supported" +msgstr "Avviso: regione %s non supportata" + +msgid "Sorry, no suggestions" +msgstr "Spiacente, nessun suggerimento" + +#, c-format +msgid "Sorry, only %ld suggestions" +msgstr "Spiacente, solo %ld suggerimenti" + +#. for when 'cmdheight' > 1 +#. avoid more prompt +#, c-format +msgid "Change \"%.*s\" to:" +msgstr "Cambiare \"%.*s\" in:" + +#, c-format +msgid " < \"%.*s\"" +msgstr " < \"%.*s\"" + +msgid "E752: No previous spell replacement" +msgstr "E752: Nessuna sostituzione ortografica precedente" + +#, c-format +msgid "E753: Not found: %s" +msgstr "E753: Non trovato: %s" msgid "E758: Truncated spell file" msgstr "E758: File ortografico troncato" @@ -5113,17 +5084,6 @@ msgstr "E762: Carattere fuori intervallo in FOL, LOW o UPP" msgid "Compressing word tree..." msgstr "Comprimo albero di parole..." -msgid "E756: Spell checking is not enabled" -msgstr "E756: Controllo ortografico non abilitato" - -#, c-format -msgid "Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\"" -msgstr "Avviso: Non trovo lista parole \"%s_%s.spl\" o \"%s_ascii.spl\"" - -#, c-format -msgid "Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\"" -msgstr "Avviso: Non trovo lista parole \"%s.%s.spl\" o \"%s.ascii.spl\"" - #, c-format msgid "Reading spell file \"%s\"" msgstr "Lettura file ortografico \"%s\"" @@ -5141,8 +5101,24 @@ msgid "E770: Unsupported section in spell file" msgstr "E770: Sezione non supportata nel file ortografico" #, c-format -msgid "Warning: region %s not supported" -msgstr "Avviso: regione %s non supportata" +msgid "E778: This does not look like a .sug file: %s" +msgstr "E778: Questo non sembra un file .sug: %s" + +#, c-format +msgid "E779: Old .sug file, needs to be updated: %s" +msgstr "E779: File .sug obsoleto, è necessario aggiornarlo: %s" + +#, c-format +msgid "E780: .sug file is for newer version of Vim: %s" +msgstr "E780: Il file .sug è per versioni di Vim più recenti: %s" + +#, c-format +msgid "E781: .sug file doesn't match .spl file: %s" +msgstr "E781: Il file .sug non corrisponde al file .spl: %s" + +#, c-format +msgid "E782: error while reading .sug file: %s" +msgstr "E782: Errore leggendo il file .sug: %s" #, c-format msgid "Reading affix file %s ..." @@ -5412,50 +5388,6 @@ msgstr "Parola '%.*s' aggiunta a %s" msgid "E763: Word characters differ between spell files" msgstr "E763: Caratteri di parola differenti nei file ortografici" -msgid "Sorry, no suggestions" -msgstr "Spiacente, nessun suggerimento" - -#, c-format -msgid "Sorry, only %ld suggestions" -msgstr "Spiacente, solo %ld suggerimenti" - -#. for when 'cmdheight' > 1 -#. avoid more prompt -#, c-format -msgid "Change \"%.*s\" to:" -msgstr "Cambiare \"%.*s\" in:" - -#, c-format -msgid " < \"%.*s\"" -msgstr " < \"%.*s\"" - -msgid "E752: No previous spell replacement" -msgstr "E752: Nessuna sostituzione ortografica precedente" - -#, c-format -msgid "E753: Not found: %s" -msgstr "E753: Non trovato: %s" - -#, c-format -msgid "E778: This does not look like a .sug file: %s" -msgstr "E778: Questo non sembra un file .sug: %s" - -#, c-format -msgid "E779: Old .sug file, needs to be updated: %s" -msgstr "E779: File .sug obsoleto, è necessario aggiornarlo: %s" - -#, c-format -msgid "E780: .sug file is for newer version of Vim: %s" -msgstr "E780: Il file .sug è per versioni di Vim più recenti: %s" - -#, c-format -msgid "E781: .sug file doesn't match .spl file: %s" -msgstr "E781: Il file .sug non corrisponde al file .spl: %s" - -#, c-format -msgid "E782: error while reading .sug file: %s" -msgstr "E782: Errore leggendo il file .sug: %s" - #. This should have been checked when generating the .spl #. * file. msgid "E783: duplicate char in MAP entry" @@ -5464,10 +5396,31 @@ msgstr "E783: carattere duplicato nell'elemento MAP" msgid "No Syntax items defined for this buffer" msgstr "Nessun elemento sintattico definito per questo buffer" +msgid "syn conceal on" +msgstr "syn conceal attivo" + +msgid "syn conceal off" +msgstr "syn conceal inattivo" + #, c-format msgid "E390: Illegal argument: %s" msgstr "E390: Argomento non ammesso: %s" +msgid "syntax case ignore" +msgstr "syntax, ignorare maiuscolo/minuscolo" + +msgid "syntax case match" +msgstr "syntax, considerare maiuscolo/minuscolo" + +msgid "syntax spell toplevel" +msgstr "syntax, effettua spell sul testo" + +msgid "syntax spell notoplevel" +msgstr "syntax, non effettuare spell sul testo" + +msgid "syntax spell default" +msgstr "syntax, usare valore di default per lo spell" + msgid "syntax iskeyword " msgstr "syntax iskeyword " @@ -5943,13 +5896,129 @@ msgstr "E439: lista 'undo' non valida" msgid "E440: undo line missing" msgstr "E440: riga di 'undo' mancante" -#. Only MS VC 4.1 and earlier can do Win32s -msgid "" -"\n" -"MS-Windows 16/32-bit GUI version" +#, c-format +msgid "E122: Function %s already exists, add ! to replace it" +msgstr "E122: La funzione %s esiste già, aggiungi ! per sostituirla" + +msgid "E717: Dictionary entry already exists" +msgstr "E717: C'è già la voce nel Dizionario" + +msgid "E718: Funcref required" +msgstr "E718: Funcref necessario" + +#, c-format +msgid "E130: Unknown function: %s" +msgstr "E130: Funzione sconosciuta: %s" + +#, c-format +msgid "E125: Illegal argument: %s" +msgstr "E125: Argomento non ammesso: %s" + +#, c-format +msgid "E853: Duplicate argument name: %s" +msgstr "E853: Nome argomento duplicato: %s" + +#, c-format +msgid "E740: Too many arguments for function %s" +msgstr "E740: Troppi argomenti per la funzione: %s" + +#, c-format +msgid "E116: Invalid arguments for function %s" +msgstr "E116: Argomenti non validi per la funzione: %s" + +msgid "E132: Function call depth is higher than 'maxfuncdepth'" msgstr "" -"\n" -"versione MS-Windows 16/32-bit GUI" +"E132: Nidificazione della chiamata di funzione maggiore di 'maxfuncdepth'" + +#, c-format +msgid "calling %s" +msgstr "chiamo %s" + +#, c-format +msgid "%s aborted" +msgstr "%s non completata" + +#, c-format +msgid "%s returning #%ld" +msgstr "%s ritorno #%ld" + +#, c-format +msgid "%s returning %s" +msgstr "%s ritorno %s" + +msgid "E699: Too many arguments" +msgstr "E699: Troppi argomenti" + +#, c-format +msgid "E117: Unknown function: %s" +msgstr "E117: Funzione sconosciuta: %s" + +msgid "E933: Function was deleted: %s" +msgstr "E933: Funzione eliminata: %s" + +#, c-format +msgid "E119: Not enough arguments for function: %s" +msgstr "E119: La funzione: %s richiede più argomenti" + +#, c-format +msgid "E120: Using not in a script context: %s" +msgstr "E120: Uso di fuori dal contesto di uno script: %s" + +#, c-format +msgid "E725: Calling dict function without Dictionary: %s" +msgstr "E725: Chiamata di funzione dict in assenza di Dizionario: %s" + +msgid "E129: Function name required" +msgstr "E129: Nome funzione necessario" + +#, c-format +msgid "E128: Function name must start with a capital or \"s:\": %s" +msgstr "E128: Il nome funzione deve iniziare con maiuscola o \"s:\": %s" + +#, c-format +msgid "E884: Function name cannot contain a colon: %s" +msgstr "E884: Il nome della funzione non può contenere un due punti: %s" + +#, c-format +msgid "E123: Undefined function: %s" +msgstr "E123: Funzione non definita: %s" + +#, c-format +msgid "E124: Missing '(': %s" +msgstr "E124: Manca '(': %s" + +msgid "E862: Cannot use g: here" +msgstr "E862: Non si può usare g: qui" + +#, c-format +msgid "E932: Closure function should not be at top level: %s" +msgstr "E932: La funzione di chiusura non novrebbe essere al livello più alto: %s" + +msgid "E126: Missing :endfunction" +msgstr "E126: Manca :endfunction" + +#, c-format +msgid "E707: Function name conflicts with variable: %s" +msgstr "E707: Nome funzione in conflitto con la variabile: %s" + +#, c-format +msgid "E127: Cannot redefine function %s: It is in use" +msgstr "E127: Non posso ridefinire la funzione %s: È in uso" + +#, c-format +msgid "E746: Function name does not match script file name: %s" +msgstr "E746: Il nome funzione non corrisponde al nome file dello script: %s" + +#, c-format +msgid "E131: Cannot delete function %s: It is in use" +msgstr "E131: Non posso eliminare la funzione %s: È in uso" + +msgid "E133: :return not inside a function" +msgstr "E133: :return fuori da una funzione" + +#, c-format +msgid "E107: Missing parentheses: %s" +msgstr "E107: Mancano parentesi: %s" msgid "" "\n" @@ -5965,9 +6034,6 @@ msgstr "" "\n" "Versione MS-Windows 32-bit GUI" -msgid " in Win32s mode" -msgstr " in modalità Win32s" - msgid " with OLE support" msgstr " con supporto OLE" @@ -6144,6 +6210,9 @@ msgstr " II file gvimrc utente: \"" msgid "3rd user gvimrc file: \"" msgstr " III file gvimrc utente: \"" +msgid " defaults file: \"" +msgstr " file dei default: \"" + msgid " system menu file: \"" msgstr " file menu di sistema: \"" @@ -6234,12 +6303,6 @@ msgstr "batti :help register per informazioni " msgid "menu Help->Sponsor/Register for information " msgstr "menu Aiuto->Sponsor/Registrazione per informazioni " -msgid "WARNING: Windows 95/98/ME detected" -msgstr "AVVISO: Trovato Windows 95/98/ME" - -msgid "type :help windows95 for info on this" -msgstr "batti :help windows95 per info al riguardo" - msgid "Already only one window" msgstr "C'è già una finestra sola" @@ -6273,8 +6336,21 @@ msgstr "E446: Nessun nome file sotto il cursore" msgid "E447: Can't find file \"%s\" in path" msgstr "E447: Non riesco a trovare il file \"%s\" nel percorso" +msgid "E799: Invalid ID: %ld (must be greater than or equal to 1)" +msgstr "E799: ID non valido: %ld (dev'essere maggiore o uguale a 1)" + +#, c-format +msgid "E801: ID already taken: %ld" +msgstr "E801: ID già utilizzato: %ld" + msgid "List or number required" -msgstr "È necessaria una lista o un numero" +msgstr "È necessaria una Lista o un numero" + +msgid "E802: Invalid ID: %ld (must be greater than or equal to 1)" +msgstr "E802: ID non valido: %ld (dev'essere maggiore o uguale a 1)" + +msgid "E803: ID not found: %ld" +msgstr "E803: ID non trovato: %ld" #, c-format msgid "E370: Could not load library %s" @@ -6381,6 +6457,10 @@ msgstr "E236: Font \"%s\" non di larghezza fissa" msgid "E473: Internal error" msgstr "E473: Errore interno" +#, c-format +msgid "E685: Internal error: %s" +msgstr "E685: Errore interno: %s" + msgid "Interrupted" msgstr "Interrotto" @@ -6568,6 +6648,28 @@ msgstr "" msgid "E713: Cannot use empty key for Dictionary" msgstr "E713: Non posso usare una chiave nulla per il Dizionario" +msgid "E715: Dictionary required" +msgstr "E715: È necessario un Dizionario" + +#, c-format +msgid "E684: list index out of range: %ld" +msgstr "E684: indice lista fuori intervallo: %ld" + +#, c-format +msgid "E118: Too many arguments for function: %s" +msgstr "E118: Troppi argomenti per la funzione: %s" + +#, c-format +msgid "E716: Key not present in Dictionary: %s" +msgstr "E716: Chiave assente dal Dizionario: %s" + +msgid "E714: List required" +msgstr "E714: È necessaria una Lista" + +#, c-format +msgid "E712: Argument of %s must be a List or Dictionary" +msgstr "E712: L'argomento di %s deve essere una Lista o un Dizionario" + msgid "E47: Error while reading errorfile" msgstr "E47: Errore leggendo il file errori" @@ -6625,8 +6727,8 @@ msgstr "E592: 'winwidth' non pu msgid "E80: Error while writing" msgstr "E80: Errore in scrittura" -msgid "Zero count" -msgstr "Contatore a zero" +msgid "E939: Positive count required" +msgstr "E939: Un contatore positivo è necessario" msgid "E81: Using not in a script context" msgstr "E81: Uso di fuori dal contesto di uno script" @@ -6640,10 +6742,6 @@ msgstr "E463: Regione protetta, impossibile modificare" msgid "E744: NetBeans does not allow changes in read-only files" msgstr "E744: NetBeans non permette modifiche a file di sola lettura" -#, c-format -msgid "E685: Internal error: %s" -msgstr "E685: Errore interno: %s" - msgid "E363: pattern uses more memory than 'maxmempattern'" msgstr "E363: l'espressione usa troppa memoria rispetto a 'maxmempattern'" @@ -6944,6 +7042,6 @@ msgid "" "Failed to set path: sys.path is not a list\n" "You should now append vim.VIM_SPECIAL_PATH to sys.path" msgstr "" -"Impostazione di percorso non riuscita: sys.path non è una lista\n" +"Impostazione di percorso non riuscita: sys.path non è una Lista\n" "Dovresti aggiungere vim.VIM_SPECIAL_PATH a sys.path" From b463e8d999ec812d656876f313efbeaeed663b45 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 15:07:09 +0200 Subject: [PATCH 18/26] patch 8.0.0620: checking for HAVE_GTK_MULTIHEAD is not needed Problem: Since we only support GTK versions that have it, the ckeck for HAVE_GTK_MULTIHEAD is no longer needed. Solution: Remove HAVE_GTK_MULTIHEAD. (Kazunobu Kuriyama) --- src/auto/configure | 7 ----- src/config.h.in | 3 -- src/configure.ac | 5 ---- src/gui_beval.c | 9 ++---- src/gui_gtk_x11.c | 75 +++++++++++++++------------------------------- src/mbyte.c | 13 ++------ src/version.c | 2 ++ 7 files changed, 30 insertions(+), 84 deletions(-) diff --git a/src/auto/configure b/src/auto/configure index 6dd5bb9ba5..1980a95b20 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -8997,11 +8997,6 @@ $as_echo "no" >&6; } fi fi if test "x$GUITYPE" = "xGTK"; then - if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ - || test "0$gtk_minor_version" -ge 2; then - $as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h - - fi if test -z "$SKIP_GNOME"; then { @@ -9294,8 +9289,6 @@ $as_echo "no" >&6; } SKIP_MOTIF=YES GUITYPE=GTK - $as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h - $as_echo "#define USE_GTK3 1" >>confdefs.h fi diff --git a/src/config.h.in b/src/config.h.in index f8a23ed78b..a93450710f 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -398,9 +398,6 @@ /* Define if you use KDE and want KDE Toolbar support. */ #undef FEAT_KDETOOLBAR -/* Define if GTK+ multihead support is available (requires GTK+ >= 2.1.1). */ -#undef HAVE_GTK_MULTIHEAD - /* Define if your X has own locale library */ #undef X_LOCALE diff --git a/src/configure.ac b/src/configure.ac index d424550483..1c1b1c7e42 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -2606,10 +2606,6 @@ if test -z "$SKIP_GTK2"; then fi fi if test "x$GUITYPE" = "xGTK"; then - if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ - || test "0$gtk_minor_version" -ge 2; then - AC_DEFINE(HAVE_GTK_MULTIHEAD) - fi dnl dnl if GTK exists, then check for GNOME. dnl @@ -2658,7 +2654,6 @@ if test -z "$SKIP_GTK3"; then SKIP_MOTIF=YES GUITYPE=GTK AC_SUBST(GTK_LIBNAME) - AC_DEFINE(HAVE_GTK_MULTIHEAD) AC_DEFINE(USE_GTK3) fi fi diff --git a/src/gui_beval.c b/src/gui_beval.c index 818a50b2dc..abff1b0916 100644 --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -1177,8 +1177,7 @@ drawBalloon(BalloonEval *beval) int x_offset = EVAL_OFFSET_X; int y_offset = EVAL_OFFSET_Y; PangoLayout *layout; -# ifdef HAVE_GTK_MULTIHEAD -# if GTK_CHECK_VERSION(3,22,2) +# if GTK_CHECK_VERSION(3,22,2) GdkRectangle rect; GdkMonitor * const mon = gdk_display_get_monitor_at_window( gtk_widget_get_display(beval->balloonShell), @@ -1187,17 +1186,13 @@ drawBalloon(BalloonEval *beval) screen_w = rect.width; screen_h = rect.height; -# else +# else GdkScreen *screen; screen = gtk_widget_get_screen(beval->target); gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen); screen_w = gdk_screen_get_width(screen); screen_h = gdk_screen_get_height(screen); -# endif -# else - screen_w = gdk_screen_width(); - screen_h = gdk_screen_height(); # endif # if !GTK_CHECK_VERSION(3,0,0) gtk_widget_ensure_style(beval->balloonShell); diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index c00b3d6c49..5837c0b172 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -102,12 +102,8 @@ extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockI /* * Easy-to-use macro for multihead support. */ -#ifdef HAVE_GTK_MULTIHEAD -# define GET_X_ATOM(atom) gdk_x11_atom_to_xatom_for_display( \ +#define GET_X_ATOM(atom) gdk_x11_atom_to_xatom_for_display( \ gtk_widget_get_display(gui.mainwin), atom) -#else -# define GET_X_ATOM(atom) ((Atom)(atom)) -#endif /* Selection type distinguishers */ enum @@ -2846,7 +2842,7 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED) /* * Cannot handle "XLib-only" windows with gtk event routines, we'll * have to change the "server" registration to that of the main window - * If we have not registered a name yet, remember the window + * If we have not registered a name yet, remember the window. */ # if GTK_CHECK_VERSION(3,0,0) serverChangeRegisteredWindow(GDK_WINDOW_XDISPLAY(mainwin_win), @@ -2884,16 +2880,14 @@ create_blank_pointer(void) char blank_data[] = { 0x0 }; #endif -#ifdef HAVE_GTK_MULTIHEAD -# if GTK_CHECK_VERSION(3,12,0) +#if GTK_CHECK_VERSION(3,12,0) { GdkWindow * const win = gtk_widget_get_window(gui.mainwin); GdkScreen * const scrn = gdk_window_get_screen(win); root_window = gdk_screen_get_root_window(scrn); } -# else +#else root_window = gtk_widget_get_root_window(gui.mainwin); -# endif #endif /* Create a pseudo blank pointer, which is in fact one pixel by one pixel @@ -2932,7 +2926,6 @@ create_blank_pointer(void) return cursor; } -#ifdef HAVE_GTK_MULTIHEAD static void mainwin_screen_changed_cb(GtkWidget *widget, GdkScreen *previous_screen UNUSED, @@ -2945,22 +2938,22 @@ mainwin_screen_changed_cb(GtkWidget *widget, * Recreate the invisible mouse cursor. */ if (gui.blank_pointer != NULL) -# if GTK_CHECK_VERSION(3,0,0) +#if GTK_CHECK_VERSION(3,0,0) g_object_unref(G_OBJECT(gui.blank_pointer)); -# else +#else gdk_cursor_unref(gui.blank_pointer); -# endif +#endif gui.blank_pointer = create_blank_pointer(); -# if GTK_CHECK_VERSION(3,0,0) +#if GTK_CHECK_VERSION(3,0,0) if (gui.pointer_hidden && gtk_widget_get_window(gui.drawarea) != NULL) gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), gui.blank_pointer); -# else +#else if (gui.pointer_hidden && gui.drawarea->window != NULL) gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer); -# endif +#endif /* * Create a new PangoContext for this screen, and initialize it @@ -2978,7 +2971,6 @@ mainwin_screen_changed_cb(GtkWidget *widget, gui_set_shellsize(FALSE, FALSE, RESIZE_BOTH); } } -#endif /* HAVE_GTK_MULTIHEAD */ /* * After the drawing area comes up, we calculate all colors and create the @@ -3907,12 +3899,8 @@ gui_mch_init(void) GtkWidget *plug; /* Use GtkSocket from another app. */ -#ifdef HAVE_GTK_MULTIHEAD plug = gtk_plug_new_for_display(gdk_display_get_default(), gtk_socket_id); -#else - plug = gtk_plug_new(gtk_socket_id); -#endif #if GTK_CHECK_VERSION(3,0,0) if (plug != NULL && gtk_plug_get_socket_window(GTK_PLUG(plug)) != NULL) #else @@ -3972,10 +3960,10 @@ gui_mch_init(void) gtk_signal_connect(GTK_OBJECT(gui.mainwin), "realize", GTK_SIGNAL_FUNC(&mainwin_realize), NULL); #endif -#ifdef HAVE_GTK_MULTIHEAD - g_signal_connect(G_OBJECT(gui.mainwin), "screen_changed", + + g_signal_connect(G_OBJECT(gui.mainwin), "screen-changed", G_CALLBACK(&mainwin_screen_changed_cb), NULL); -#endif + gui.accel_group = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(gui.mainwin), gui.accel_group); @@ -4992,8 +4980,7 @@ gui_mch_set_shellsize(int width, int height, void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) { -#ifdef HAVE_GTK_MULTIHEAD -# if GTK_CHECK_VERSION(3,22,2) +#if GTK_CHECK_VERSION(3,22,2) GdkRectangle rect; GdkMonitor * const mon = gdk_display_get_monitor_at_window( gtk_widget_get_display(gui.mainwin), @@ -5001,8 +4988,10 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) gdk_monitor_get_geometry(mon, &rect); *screen_w = rect.width; + /* Subtract 'guiheadroom' from the height to allow some room for the + * window manager (task list and window title bar). */ *screen_h = rect.height - p_ghr; -# else +#else GdkScreen* screen; if (gui.mainwin != NULL && gtk_widget_has_screen(gui.mainwin)) @@ -5011,13 +5000,9 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) screen = gdk_screen_get_default(); *screen_w = gdk_screen_get_width(screen); - *screen_h = gdk_screen_get_height(screen) - p_ghr; -# endif -#else - *screen_w = gdk_screen_width(); /* Subtract 'guiheadroom' from the height to allow some room for the * window manager (task list and window title bar). */ - *screen_h = gdk_screen_height() - p_ghr; + *screen_h = gdk_screen_get_height(screen) - p_ghr; #endif /* @@ -6335,23 +6320,19 @@ gui_mch_get_display(void) void gui_mch_beep(void) { -#ifdef HAVE_GTK_MULTIHEAD GdkDisplay *display; -# if GTK_CHECK_VERSION(3,0,0) +#if GTK_CHECK_VERSION(3,0,0) if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin)) -# else +#else if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin)) -# endif +#endif display = gtk_widget_get_display(gui.mainwin); else display = gdk_display_get_default(); if (display != NULL) gdk_display_beep(display); -#else - gdk_beep(); -#endif } void @@ -6698,16 +6679,12 @@ theend: void gui_mch_flush(void) { -#ifdef HAVE_GTK_MULTIHEAD -# if GTK_CHECK_VERSION(3,0,0) +#if GTK_CHECK_VERSION(3,0,0) if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin)) -# else - if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin)) -# endif - gdk_display_flush(gtk_widget_get_display(gui.mainwin)); #else - gdk_flush(); /* historical misnomer: calls XSync(), not XFlush() */ + if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin)) #endif + gdk_display_flush(gtk_widget_get_display(gui.mainwin)); } /* @@ -7298,12 +7275,8 @@ mch_set_mouse_shape(int shape) id = mshape_ids[shape]; else return; -# ifdef HAVE_GTK_MULTIHEAD c = gdk_cursor_new_for_display( gtk_widget_get_display(gui.drawarea), (GdkCursorType)id); -# else - c = gdk_cursor_new((GdkCursorType)id); -# endif # if GTK_CHECK_VERSION(3,0,0) gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), c); # else diff --git a/src/mbyte.c b/src/mbyte.c index 7396a7c386..71280bdea4 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -5304,17 +5304,12 @@ im_synthesize_keypress(unsigned int keyval, unsigned int state) { GdkEventKey *event; -# ifdef HAVE_GTK_MULTIHEAD event = (GdkEventKey *)gdk_event_new(GDK_KEY_PRESS); -# if GTK_CHECK_VERSION(3,0,0) +# if GTK_CHECK_VERSION(3,0,0) g_object_ref(gtk_widget_get_window(gui.drawarea)); /* unreffed by gdk_event_free() */ -# else - g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */ -# endif # else - event = (GdkEventKey *)g_malloc0((gulong)sizeof(GdkEvent)); - event->type = GDK_KEY_PRESS; + g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */ # endif # if GTK_CHECK_VERSION(3,0,0) event->window = gtk_widget_get_window(gui.drawarea); @@ -5337,11 +5332,7 @@ im_synthesize_keypress(unsigned int keyval, unsigned int state) event->send_event = FALSE; gtk_im_context_filter_keypress(xic, event); -# ifdef HAVE_GTK_MULTIHEAD gdk_event_free((GdkEvent *)event); -# else - g_free(event); -# endif } void diff --git a/src/version.c b/src/version.c index 3d91495329..6e232dc03f 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 620, /**/ 619, /**/ From 8ad80dea089ffeb1a845199c013e9bb4be1cd22e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 16:01:59 +0200 Subject: [PATCH 19/26] patch 8.0.0621: :stag does not respect 'switchbuf' Problem: The ":stag" command does not respect 'switchbuf'. Solution: Check 'switchbuf' for tag commands that may open a new window. (Ingo Karkat, closes #1681) Define macros for the return values of getfile(). --- src/buffer.c | 4 ++-- src/ex_cmds.c | 23 +++++++++++--------- src/search.c | 14 ++++++------ src/tag.c | 33 +++++++++++++++++++++++----- src/testdir/test_tagjump.vim | 42 ++++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ src/vim.h | 8 +++++++ 7 files changed, 103 insertions(+), 23 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index a57d2f6435..2f574e03d7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2352,8 +2352,8 @@ buflist_getfile( #endif ++RedrawingDisabled; - if (getfile(buf->b_fnum, NULL, NULL, (options & GETF_SETMARK), - lnum, forceit) <= 0) + if (GETFILE_SUCCESS(getfile(buf->b_fnum, NULL, NULL, + (options & GETF_SETMARK), lnum, forceit))) { --RedrawingDisabled; diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 309474ce04..70f01453bd 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3520,11 +3520,14 @@ check_readonly(int *forceit, buf_T *buf) /* * Try to abandon current file and edit a new or existing file. - * 'fnum' is the number of the file, if zero use ffname/sfname. + * "fnum" is the number of the file, if zero use ffname/sfname. + * "lnum" is the line number for the cursor in the new file (if non-zero). * - * Return 1 for "normal" error, 2 for "not written" error, 0 for success - * -1 for successfully opening another file. - * 'lnum' is the line number for the cursor in the new file (if non-zero). + * Return: + * GETFILE_ERROR for "normal" error, + * GETFILE_NOT_WRITTEN for "not written" error, + * GETFILE_SAME_FILE for success + * GETFILE_OPEN_OTHER for successfully opening another file. */ int getfile( @@ -3540,10 +3543,10 @@ getfile( char_u *free_me = NULL; if (text_locked()) - return 1; + return GETFILE_ERROR; #ifdef FEAT_AUTOCMD if (curbuf_locked()) - return 1; + return GETFILE_ERROR; #endif if (fnum == 0) @@ -3570,7 +3573,7 @@ getfile( if (other) --no_wait_return; EMSG(_(e_nowrtmsg)); - retval = 2; /* file has been changed */ + retval = GETFILE_NOT_WRITTEN; /* file has been changed */ goto theend; } } @@ -3584,14 +3587,14 @@ getfile( curwin->w_cursor.lnum = lnum; check_cursor_lnum(); beginline(BL_SOL | BL_FIX); - retval = 0; /* it's in the same file */ + retval = GETFILE_SAME_FILE; /* it's in the same file */ } else if (do_ecmd(fnum, ffname, sfname, NULL, lnum, (P_HID(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0), curwin) == OK) - retval = -1; /* opened another file */ + retval = GETFILE_OPEN_OTHER; /* opened another file */ else - retval = 1; /* error encountered */ + retval = GETFILE_ERROR; /* error encountered */ theend: vim_free(free_me); diff --git a/src/search.c b/src/search.c index 3145e9a099..bd5d08c343 100644 --- a/src/search.c +++ b/src/search.c @@ -1524,9 +1524,9 @@ end_do_search: * search_for_exact_line(buf, pos, dir, pat) * * Search for a line starting with the given pattern (ignoring leading - * white-space), starting from pos and going in direction dir. pos will + * white-space), starting from pos and going in direction "dir". "pos" will * contain the position of the match found. Blank lines match only if - * ADDING is set. if p_ic is set then the pattern must be in lowercase. + * ADDING is set. If p_ic is set then the pattern must be in lowercase. * Return OK for success, or FAIL if no line found. */ int @@ -5397,8 +5397,9 @@ search_line: #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) if (g_do_tagpreview != 0) { - if (getfile(0, curwin_save->w_buffer->b_fname, - NULL, TRUE, lnum, FALSE) > 0) + if (!GETFILE_SUCCESS(getfile( + 0, curwin_save->w_buffer->b_fname, + NULL, TRUE, lnum, FALSE))) break; /* failed to jump to file */ } else @@ -5408,8 +5409,9 @@ search_line: } else { - if (getfile(0, files[depth].name, NULL, TRUE, - files[depth].lnum, FALSE) > 0) + if (!GETFILE_SUCCESS(getfile( + 0, files[depth].name, NULL, TRUE, + files[depth].lnum, FALSE))) break; /* failed to jump to file */ /* autocommands may have changed the lnum, we don't * want that here */ diff --git a/src/tag.c b/src/tag.c index d6d1df2729..ff404748e5 100644 --- a/src/tag.c +++ b/src/tag.c @@ -3088,7 +3088,7 @@ jumpto_tag( char_u *fname; tagptrs_T tagp; int retval = FAIL; - int getfile_result; + int getfile_result = GETFILE_UNUSED; int search_options; #ifdef FEAT_SEARCH_EXTRA int save_no_hlsearch; @@ -3202,7 +3202,29 @@ jumpto_tag( /* If it was a CTRL-W CTRL-] command split window now. For ":tab tag" * open a new tab page. */ - if (postponed_split || cmdmod.tab != 0) + if (postponed_split && (swb_flags & (SWB_USEOPEN | SWB_USETAB))) + { + buf_T *existing_buf = buflist_findname_exp(fname); + + if (existing_buf != NULL) + { + win_T *wp = NULL; + + if (swb_flags & SWB_USEOPEN) + wp = buf_jump_open_win(existing_buf); + + /* If 'switchbuf' contains "usetab": jump to first window in any tab + * page containing "existing_buf" if one exists */ + if (wp == NULL && (swb_flags & SWB_USETAB)) + wp = buf_jump_open_tab(existing_buf); + /* We've switched to the buffer, the usual loading of the file must + * be skipped. */ + if (wp != NULL) + getfile_result = GETFILE_SAME_FILE; + } + } + if (getfile_result == GETFILE_UNUSED + && (postponed_split || cmdmod.tab != 0)) { if (win_split(postponed_split > 0 ? postponed_split : 0, postponed_split_flags) == FAIL) @@ -3225,10 +3247,11 @@ jumpto_tag( #endif keep_help_flag = curbuf->b_help; } - getfile_result = getfile(0, fname, NULL, TRUE, (linenr_T)0, forceit); + if (getfile_result == GETFILE_UNUSED) + getfile_result = getfile(0, fname, NULL, TRUE, (linenr_T)0, forceit); keep_help_flag = FALSE; - if (getfile_result <= 0) /* got to the right file */ + if (GETFILE_SUCCESS(getfile_result)) /* got to the right file */ { curwin->w_set_curswant = TRUE; #ifdef FEAT_WINDOWS @@ -3377,7 +3400,7 @@ jumpto_tag( #endif /* Return OK if jumped to another file (at least we found the file!). */ - if (getfile_result == -1) + if (getfile_result == GETFILE_OPEN_OTHER) retval = OK; if (retval == OK) diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim index 0d697b3f3e..bac413dac8 100644 --- a/src/testdir/test_tagjump.vim +++ b/src/testdir/test_tagjump.vim @@ -65,6 +65,48 @@ func Test_duplicate_tagjump() call delete('Xfile1') endfunc +func Test_tagjump_switchbuf() + set tags=Xtags + call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", + \ "second\tXfile1\t2", + \ "third\tXfile1\t3",], + \ 'Xtags') + call writefile(['first', 'second', 'third'], 'Xfile1') + + enew | only + set switchbuf= + stag second + call assert_equal(2, winnr('$')) + call assert_equal(2, line('.')) + stag third + call assert_equal(3, winnr('$')) + call assert_equal(3, line('.')) + + enew | only + set switchbuf=useopen + stag second + call assert_equal(2, winnr('$')) + call assert_equal(2, line('.')) + stag third + call assert_equal(2, winnr('$')) + call assert_equal(3, line('.')) + + enew | only + set switchbuf=usetab + tab stag second + call assert_equal(2, tabpagenr('$')) + call assert_equal(2, line('.')) + 1tabnext | stag third + call assert_equal(2, tabpagenr('$')) + call assert_equal(3, line('.')) + + tabclose! + enew | only + call delete('Xfile1') + call delete('Xtags') + set switchbuf&vim +endfunc + " Tests for [ CTRL-I and CTRL-W CTRL-I commands function Test_keyword_jump() call writefile(["#include Xinclude", "", diff --git a/src/version.c b/src/version.c index 6e232dc03f..bd02b5a92c 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 621, /**/ 620, /**/ diff --git a/src/vim.h b/src/vim.h index cbe14e5356..caf89d4fd6 100644 --- a/src/vim.h +++ b/src/vim.h @@ -958,6 +958,14 @@ extern int (*dyn_libintl_putenv)(const char *envstring); #define GETF_ALT 0x02 /* jumping to alternate file (not buf num) */ #define GETF_SWITCH 0x04 /* respect 'switchbuf' settings when jumping */ +/* Return values of getfile() */ +#define GETFILE_ERROR 1 /* normal error */ +#define GETFILE_NOT_WRITTEN 2 /* "not written" error */ +#define GETFILE_SAME_FILE 0 /* success, same file */ +#define GETFILE_OPEN_OTHER -1 /* success, opened another file */ +#define GETFILE_UNUSED 8 +#define GETFILE_SUCCESS(x) ((x) <= 0) + /* Values for buflist_new() flags */ #define BLN_CURBUF 1 /* may re-use curbuf for new buffer */ #define BLN_LISTED 2 /* put new buffer in buffer list */ From c5e2b040b490c2f4dd50c945840bc176bfcccb29 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 16:37:07 +0200 Subject: [PATCH 20/26] patch 8.0.0622: selecting quoted text fails with 'selection' "exclusive" Problem: Using a text object to select quoted text fails when 'selection' is set to "exclusive". (Guraga) Solution: Swap cursor and visual start position. (Christian Brabandt, closes #1687) --- src/search.c | 15 +++++++++++++-- src/testdir/test_textobjects.vim | 26 ++++++++++++++++++-------- src/version.c | 2 ++ 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/search.c b/src/search.c index bd5d08c343..c1197160aa 100644 --- a/src/search.c +++ b/src/search.c @@ -4364,7 +4364,7 @@ current_quote( int selected_quote = FALSE; /* Has quote inside selection */ int i; - /* Correct cursor when 'selection' is exclusive */ + /* Correct cursor when 'selection' is "exclusive". */ if (VIsual_active) { /* this only works within one line */ @@ -4372,8 +4372,19 @@ current_quote( return FALSE; vis_bef_curs = LT_POS(VIsual, curwin->w_cursor); - if (*p_sel == 'e' && vis_bef_curs) + if (*p_sel == 'e') + { + if (!vis_bef_curs) + { + /* VIsual needs to be start of Visual selection. */ + pos_T t = curwin->w_cursor; + + curwin->w_cursor = VIsual; + VIsual = t; + vis_bef_curs = TRUE; + } dec_cursor(); + } vis_empty = EQUAL_POS(VIsual, curwin->w_cursor); } diff --git a/src/testdir/test_textobjects.vim b/src/testdir/test_textobjects.vim index 5e67f25286..dca8f6320b 100644 --- a/src/testdir/test_textobjects.vim +++ b/src/testdir/test_textobjects.vim @@ -5,7 +5,7 @@ if !has('textobjects') endif set belloff=all -function! CpoM(line, useM, expected) +func CpoM(line, useM, expected) new if a:useM @@ -29,16 +29,26 @@ function! CpoM(line, useM, expected) call assert_equal(getreg('"'), a:expected[2]) q! -endfunction +endfunc -function! Test_inner_block_without_cpo_M() +func Test_inner_block_without_cpo_M() call CpoM('(red \(blue) green)', 0, ['red \(blue', 'red \(blue', '']) -endfunction +endfunc -function! Test_inner_block_with_cpo_M_left_backslash() +func Test_inner_block_with_cpo_M_left_backslash() call CpoM('(red \(blue) green)', 1, ['red \(blue) green', 'blue', 'red \(blue) green']) -endfunction +endfunc -function! Test_inner_block_with_cpo_M_right_backslash() +func Test_inner_block_with_cpo_M_right_backslash() call CpoM('(red (blue\) green)', 1, ['red (blue\) green', 'blue\', 'red (blue\) green']) -endfunction +endfunc + +func Test_quote_selection_selection_exclusive() + new + call setline(1, "a 'bcde' f") + set selection=exclusive + exe "norm! fdvhi'y" + call assert_equal('bcde', @") + set selection&vim + bw! +endfunc diff --git a/src/version.c b/src/version.c index bd02b5a92c..0304389b33 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 622, /**/ 621, /**/ From 966e58e413ffa88af8d748e697aa2999571fcd7b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 16:54:08 +0200 Subject: [PATCH 21/26] patch 8.0.0623: error for invalid regexp is not very informative Problem: The message "Invalid range" is used for multiple errors. Solution: Add two more specific error messages. (Itchyny, Ken Hamada) --- src/regexp.c | 8 +++++--- src/regexp_nfa.c | 2 +- src/testdir/test_regexp_utf8.vim | 17 +++++++++++++++++ src/version.c | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/regexp.c b/src/regexp.c index e1f6484c00..de066a1015 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -358,6 +358,8 @@ static char_u *regprop(char_u *); static int re_mult_next(char *what); static char_u e_missingbracket[] = N_("E769: Missing ] after %s["); +static char_u e_reverse_range[] = N_("E944: Reverse range in character class"); +static char_u e_large_class[] = N_("E945: Range too large in character class"); static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%("); static char_u e_unmatchedp[] = N_("E54: Unmatched %s("); static char_u e_unmatchedpar[] = N_("E55: Unmatched %s)"); @@ -2426,14 +2428,14 @@ collection: endc = coll_get_char(); if (startc > endc) - EMSG_RET_NULL(_(e_invrange)); + EMSG_RET_NULL(_(e_reverse_range)); #ifdef FEAT_MBYTE if (has_mbyte && ((*mb_char2len)(startc) > 1 || (*mb_char2len)(endc) > 1)) { - /* Limit to a range of 256 chars */ + /* Limit to a range of 256 chars. */ if (endc > startc + 256) - EMSG_RET_NULL(_(e_invrange)); + EMSG_RET_NULL(_(e_large_class)); while (++startc <= endc) regmbc(startc); } diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index c490acb710..4e111f169f 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -1853,7 +1853,7 @@ collection: endc = startc; startc = oldstartc; if (startc > endc) - EMSG_RET_FAIL(_(e_invrange)); + EMSG_RET_FAIL(_(e_reverse_range)); if (endc > startc + 2) { diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim index c54b65081c..bec5e0ed4f 100644 --- a/src/testdir/test_regexp_utf8.vim +++ b/src/testdir/test_regexp_utf8.vim @@ -137,3 +137,20 @@ func Test_classes_re2() call s:classes_test() set re=0 endfunc + +func Test_reversed_range() + for re in range(0, 2) + exe 'set re=' . re + call assert_fails('call match("abc def", "[c-a]")', 'E944:') + endfor + set re=0 +endfunc + +func Test_large_class() + set re=1 + call assert_fails('call match("abc def", "[\u3000-\u4000]")', 'E945:') + set re=2 + call assert_equal(0, 'abc def' =~# '[\u3000-\u4000]') + call assert_equal(1, "\u3042" =~# '[\u3000-\u4000]') + set re=0 +endfunc diff --git a/src/version.c b/src/version.c index 0304389b33..e07d2a8dc9 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 623, /**/ 622, /**/ From 6c95fbc9ae64f3a7619070e830f0c35aa4f0ada9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 17:53:37 +0200 Subject: [PATCH 22/26] patch 8.0.0624: warning for unused variable in tiny build Problem: Warning for unused variable in tiny build. (Tony Mechelynck) Solution: Add an #ifdef. --- src/regexp.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/regexp.c b/src/regexp.c index de066a1015..a27c594c2a 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -359,7 +359,9 @@ static int re_mult_next(char *what); static char_u e_missingbracket[] = N_("E769: Missing ] after %s["); static char_u e_reverse_range[] = N_("E944: Reverse range in character class"); +#ifdef FEAT_MBYTE static char_u e_large_class[] = N_("E945: Range too large in character class"); +#endif static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%("); static char_u e_unmatchedp[] = N_("E54: Unmatched %s("); static char_u e_unmatchedpar[] = N_("E55: Unmatched %s)"); diff --git a/src/version.c b/src/version.c index e07d2a8dc9..c066c81755 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 624, /**/ 623, /**/ From 206155280def51160a9d81d983aed639015ffb44 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 18:46:26 +0200 Subject: [PATCH 23/26] patch 8.0.0625: shellescape() always escapes a newline Problem: shellescape() always escapes a newline, which does not work with some shells. (Harm te Hennepe) Solution: Only escape a newline when the "special" argument is non-zero. (Christian Brabandt, closes #1590) --- src/evalfunc.c | 4 +++- src/testdir/test_functions.vim | 25 +++++++++++++++++++++++++ src/version.c | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/evalfunc.c b/src/evalfunc.c index 60cd344243..c198df13a9 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -10461,8 +10461,10 @@ f_sha256(typval_T *argvars, typval_T *rettv) static void f_shellescape(typval_T *argvars, typval_T *rettv) { + int do_special = non_zero_arg(&argvars[1]); + rettv->vval.v_string = vim_strsave_shellescape( - get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]), TRUE); + get_tv_string(&argvars[0]), do_special, do_special); rettv->v_type = VAR_STRING; } diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index e569ef1dca..f0f656ac85 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -784,3 +784,28 @@ func Test_redo_in_nested_functions() delfunc Operator delfunc Apply endfunc + +func Test_shellescape() + let save_shell = &shell + set shell=bash + call assert_equal("'text'", shellescape('text')) + call assert_equal("'te\"xt'", shellescape('te"xt')) + call assert_equal("'te'\\''xt'", shellescape("te'xt")) + + call assert_equal("'te%xt'", shellescape("te%xt")) + call assert_equal("'te\\%xt'", shellescape("te%xt", 1)) + call assert_equal("'te#xt'", shellescape("te#xt")) + call assert_equal("'te\\#xt'", shellescape("te#xt", 1)) + call assert_equal("'te!xt'", shellescape("te!xt")) + call assert_equal("'te\\!xt'", shellescape("te!xt", 1)) + + call assert_equal("'te\nxt'", shellescape("te\nxt")) + call assert_equal("'te\\\nxt'", shellescape("te\nxt", 1)) + set shell=tcsh + call assert_equal("'te\\!xt'", shellescape("te!xt")) + call assert_equal("'te\\\\!xt'", shellescape("te!xt", 1)) + call assert_equal("'te\\\nxt'", shellescape("te\nxt")) + call assert_equal("'te\\\\\nxt'", shellescape("te\nxt", 1)) + + let &shell = save_shell +endfunc diff --git a/src/version.c b/src/version.c index c066c81755..0280ca810a 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 625, /**/ 624, /**/ From e21d69eec1870a3f4732653aa8ee25d5da10128c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 19:32:32 +0200 Subject: [PATCH 24/26] patch 8.0.0626: in the GUI the cursor may flicker Problem: In the GUI the cursor may flicker. Solution: Check the cmd_silent flag before updating the cursor shape. (Hirohito Higashi, closes #1637) --- src/getchar.c | 12 ++++++++++-- src/version.c | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index 18af2a3740..ab3250aa33 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2913,8 +2913,16 @@ vgetorpeek(int advance) } #ifdef FEAT_GUI /* may unshow different cursor shape */ - if (gui.in_use && shape_changed) - gui_update_cursor(TRUE, FALSE); + if (gui.in_use) + { + if (cmd_silent) + gui_dont_update_cursor(TRUE); + else + gui_can_update_cursor(); + + if (shape_changed) + gui_update_cursor(TRUE, FALSE); + } #endif --vgetc_busy; diff --git a/src/version.c b/src/version.c index 0280ca810a..65dc83f470 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 626, /**/ 625, /**/ From add8dce38de65a0c64e8f54d6bdcadb45a8de2cf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 5 Jun 2017 19:56:04 +0200 Subject: [PATCH 25/26] patch 8.0.0627: "gn" selects only one character with 'nowrapscan' Problem: When 'wrapscan' is off "gn" does not select the whole pattern when it's the last one in the text. (KeyboardFire) Solution: Check if the search fails. (Christian Brabandt, closes #1683) --- src/search.c | 17 ++++++++++------- src/testdir/test_gn.vim | 27 ++++++++++++++++++++++++++- src/version.c | 2 ++ 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/search.c b/src/search.c index c1197160aa..9470073417 100644 --- a/src/search.c +++ b/src/search.c @@ -4599,7 +4599,7 @@ current_quote( #endif /* FEAT_TEXTOBJ */ -static int is_one_char(char_u *pattern, int move); +static int is_one_char(char_u *pattern, int move, pos_T *cur); /* * Find next search match under cursor, cursor at end. @@ -4647,7 +4647,7 @@ current_search( orig_pos = pos = curwin->w_cursor; /* Is the pattern is zero-width? */ - one_char = is_one_char(spats[last_idx].pat, TRUE); + one_char = is_one_char(spats[last_idx].pat, TRUE, &curwin->w_cursor); if (one_char == -1) { p_ws = old_p_ws; @@ -4710,7 +4710,10 @@ current_search( /* Check again from the current cursor position, * since the next match might actually by only one char wide */ - one_char = is_one_char(spats[last_idx].pat, FALSE); + one_char = is_one_char(spats[last_idx].pat, FALSE, &pos); + if (one_char < 0) + /* search failed, abort */ + return FAIL; /* move to match, except for zero-width matches, in which case, we are * already on the next match */ @@ -4761,12 +4764,12 @@ current_search( /* * Check if the pattern is one character long or zero-width. - * If move is TRUE, check from the beginning of the buffer, else from the - * current cursor position. + * If move is TRUE, check from the beginning of the buffer, else from position + * "cur". * Returns TRUE, FALSE or -1 for failure. */ static int -is_one_char(char_u *pattern, int move) +is_one_char(char_u *pattern, int move, pos_T *cur) { regmmatch_T regmatch; int nmatched = 0; @@ -4791,7 +4794,7 @@ is_one_char(char_u *pattern, int move) } else { - pos = curwin->w_cursor; + pos = *cur; /* accept a match at the cursor position */ flag = SEARCH_START; } diff --git a/src/testdir/test_gn.vim b/src/testdir/test_gn.vim index 7a5cdabaa3..b2a2937d88 100644 --- a/src/testdir/test_gn.vim +++ b/src/testdir/test_gn.vim @@ -1,43 +1,50 @@ " Test for gn command func Test_gn_command() - noa new + set belloff=all + noautocmd new " replace a single char by itsself quoted: call setline('.', 'abc x def x ghi x jkl') let @/='x' exe "norm! cgn'x'\.." call assert_equal("abc 'x' def 'x' ghi 'x' jkl", getline('.')) sil! %d_ + " simple search match call setline('.', 'foobar') let @/='foobar' exe "norm! gncsearchmatch" call assert_equal('searchmatch', getline('.')) sil! %d _ + " replace a multi-line match call setline('.', ['', 'one', 'two']) let @/='one\_s*two\_s' exe "norm! gnceins\zwei" call assert_equal(['','eins','zwei'], getline(1,'$')) sil! %d _ + " test count argument call setline('.', ['', 'abcdx | abcdx | abcdx']) let @/='[a]bcdx' exe "norm! 2gnd" call assert_equal(['','abcdx | | abcdx'], getline(1,'$')) sil! %d _ + " join lines call setline('.', ['join ', 'lines']) let @/='$' exe "norm! 0gnd" call assert_equal(['join lines'], getline(1,'$')) sil! %d _ + " zero-width match call setline('.', ['', 'zero width pattern']) let @/='\>\zs' exe "norm! 0gnd" call assert_equal(['', 'zerowidth pattern'], getline(1,'$')) sil! %d _ + " delete first and last chars call setline('.', ['delete first and last chars']) let @/='^' @@ -46,23 +53,27 @@ func Test_gn_command() exe "norm! gnd" call assert_equal(['elete first and last char'], getline(1,'$')) sil! %d _ + " using visual mode call setline('.', ['', 'uniquepattern uniquepattern']) exe "norm! /[u]niquepattern/s\vlgnd" call assert_equal(['', ' uniquepattern'], getline(1,'$')) sil! %d _ + " backwards search call setline('.', ['my very excellent mother just served us nachos']) let @/='mother' exe "norm! $cgNmongoose" call assert_equal(['my very excellent mongoose just served us nachos'], getline(1,'$')) sil! %d _ + " search for single char call setline('.', ['','for (i=0; i<=10; i++)']) let @/='i' exe "norm! cgnj" call assert_equal(['','for (j=0; i<=10; i++)'], getline(1,'$')) sil! %d _ + " search hex char call setline('.', ['','Y']) set noignorecase @@ -70,24 +81,38 @@ func Test_gn_command() exe "norm! gnd" call assert_equal(['',''], getline(1,'$')) sil! %d _ + " test repeating gdn call setline('.', ['', '1', 'Johnny', '2', 'Johnny', '3']) let @/='Johnny' exe "norm! dgn." call assert_equal(['','1', '', '2', '', '3'], getline(1,'$')) sil! %d _ + " test repeating gUgn call setline('.', ['', '1', 'Depp', '2', 'Depp', '3']) let @/='Depp' exe "norm! gUgn." call assert_equal(['', '1', 'DEPP', '2', 'DEPP', '3'], getline(1,'$')) sil! %d _ + " test using look-ahead assertions call setline('.', ['a:10', '', 'a:1', '', 'a:20']) let @/='a:0\@!\zs\d\+' exe "norm! 2nygno\p" call assert_equal(['a:10', '', 'a:1', '1', '', 'a:20'], getline(1,'$')) sil! %d _ + + " test using nowrapscan + set nowrapscan + call setline(1, 'foo bar baz') + exe "norm! /bar/e\" + exe "norm! gnd" + call assert_equal(['foo baz'], getline(1,'$')) + sil! %d_ + + set wrapscan&vim + set belloff&vim endfu " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 65dc83f470..7a9b21c5df 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 627, /**/ 626, /**/ From f085f4266e07b36279c56d43fd0d73ed080046ae Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 7 Jun 2017 20:39:47 +0200 Subject: [PATCH 26/26] patch 8.0.0628: cursor disappears after silent mapping Problem: Cursor disappears after silent mapping. (Ramel Eshed) Solution: Do restore the cursor when it was changed, but don't change it in the first place for a silent mapping. --- src/getchar.c | 18 +++++------------- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index ab3250aa33..44b246de63 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2583,7 +2583,7 @@ vgetorpeek(int advance) * get a character: 3. from the user - handle in Insert mode */ /* - * special case: if we get an in insert mode and there + * Special case: if we get an in insert mode and there * are no more characters at once, we pretend to go out of * insert mode. This prevents the one second delay after * typing an . If we get something after all, we may @@ -2617,8 +2617,8 @@ vgetorpeek(int advance) mode_deleted = TRUE; } #ifdef FEAT_GUI - /* may show different cursor shape */ - if (gui.in_use) + /* may show a different cursor shape */ + if (gui.in_use && State != NORMAL && !cmd_silent) { int save_State; @@ -2913,16 +2913,8 @@ vgetorpeek(int advance) } #ifdef FEAT_GUI /* may unshow different cursor shape */ - if (gui.in_use) - { - if (cmd_silent) - gui_dont_update_cursor(TRUE); - else - gui_can_update_cursor(); - - if (shape_changed) - gui_update_cursor(TRUE, FALSE); - } + if (gui.in_use && shape_changed) + gui_update_cursor(TRUE, FALSE); #endif --vgetc_busy; diff --git a/src/version.c b/src/version.c index 7a9b21c5df..4b98f44573 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 628, /**/ 627, /**/