aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | | | | | | | | | perf: tv_clear(): Cache gettext() result. (#6519)Justin M. Keyes2017-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #6437
* | | | | | | | | | | win: os_shell_is_cmdexe() + testsJustin M. Keyes2017-04-12
| | | | | | | | | | |
* | | | | | | | | | | win: default shellxescape, shellxquote to emptyRui Abreu Ferreira2017-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling cmd.exe in Windows follows a very different pattern from Vim. The primary difference is that Vim does a nested call to cmd.exe, e.g. the following call in Vim system('echo a 2>&1') spawns the following processes "C:\Program Files (x86)\Vim\vim80\vimrun" -s C:\Windows\system32\cmd.exe /c (echo a 2^>^&1 ^>C:\Users\dummy\AppData\Local\Temp\VIoC169.tmp 2^>^&1) C:\Windows\system32\cmd.exe /c C:\Windows\system32\cmd.exe /c (echo a 2^>^&1 ^>C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2^>^&1) C:\Windows\system32\cmd.exe /c (echo a 2>&1 >C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2>&1) The escaping with ^ is needed because cmd.exe calls itself and needs to preserve the special metacharacters for the last call. However in nvim no nested call is made, system('') spawns a single cmd.exe process. Setting shellxescape to "" disables escaping with ^. The previous default for shellxquote=( wrapped any command in parenthesis, in Vim this is more meaningful due to the use of tempfiles to store the output and redirection (also see &shellquote). There is a slight benefit in having the default be empty because some expressions that run in console will not run within parens e.g. due to unbalanced double quotes system('echo "a b')
* | | | | | | | | | | win: libuv_process_spawn(): special-case cmd.exeRui Abreu Ferreira2017-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable CommandLineToArgvW-standard quoting for cmd.exe. libuv assumes spawned processes follow the convention expected by CommandLineToArgvW(). But cmd.exe is non-conformant, so for cmd.exe: - With system([]), the caller has full control (and responsibility) to quote arguments correctly. - With system(''), shell* options are used. libuv quoting is disabled if argv[0] is: - cmd.exe - cmd - $COMSPEC resolving to a path with filename cmd.exe Closes #6329 References #6387
* | | | | | | | | | | win: vim_strsave_shellescape: Handle 'shellslash'.Justin M. Keyes2017-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Vim, misc2.c:vim_strsave_shellescape
* | | | | | | | | | | win: defaults: 'shellredir', 'shellxquote', 'shellxescape'Justin M. Keyes2017-04-12
| | | | | | | | | | |
* | | | | | | | | | | refactor: pos_T macros to functions (#6496)Felipe Oliveira Carvalho2017-04-11
| | | | | | | | | | |
* | | | | | | | | | | win: mch_open_rw: specify S_IWRITE #6487erw72017-04-11
| |_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, `mch_open_rw` is not actually doing what it claims. This manifests as "E301: Oops, lost the swap file !!!" when filename is changed with :file {name}. Steps to reproduce (covered by test/functional/ex_cmds/file_spec.lua): nvim -u NONE :edit test :file test2 E301 Oops, lost the swap file!!! From libuv/src/win/fs.c: void fs__open(uv_fs_t* req) { ... attributes |= FILE_ATTRIBUTE_NORMAL; if (flags & _O_CREAT) { if (!((req->fs.info.mode & ~current_umask) & _S_IWRITE)) { attributes |= FILE_ATTRIBUTE_READONLY; } }
* | | | | | | | | | Merge #6479 from bfredl/tolowerJustin M. Keyes2017-04-10
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | remove vim_tolower/etc functions with broken locale-dependent behavior
| * | | | | | | | | | lint: fix clint errors around mb_tolower callsBjörn Linse2017-04-10
| | | | | | | | | | |
| * | | | | | | | | | vim-patch:8.0.0552Björn Linse2017-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Toupper and tolower don't work properly for Turkish when 'casemap' is empty. (Bjorn Linse) Solution: Check the 'casemap' options when deciding how to upper/lower case. https://github.com/vim/vim/commit/3317d5ebbe8304da82b8088446060afcae0012af vim-patch:8.0.0553 Problem: Toupper/tolower test with Turkish locale fails on Mac. Solution: Skip the test on Mac. https://github.com/vim/vim/commit/9f4de1f5435b900e43e19766da1a5bed4686cf44 vim-patch:8.0.0554 Problem: Toupper and tolower don't work properly for Turkish when 'casemap' contains "keepascii". (Bjorn Linse) Solution: When 'casemap' contains "keepascii" use ASCII toupper/tolower. https://github.com/vim/vim/commit/1cc482069a3407132aeb43a55d6dc284153e79c7 vim-patch:8.0.0555 Problem: Toupper/tolower test fails on OSX without Darwin. Solution: Skip that part of the test also for OSX. (Kazunobu Kuriyama) https://github.com/vim/vim/commit/d2381a2cadb9ef359ad5efb916734c635b29bd13
| * | | | | | | | | | vim-patch:8.0.0243Björn Linse2017-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When making a character lower case with tolower() changes the byte cound, it is not made lower case. Solution: Add strlow_save(). (Dominique Pelle, closes vim/vim#1406) https://github.com/vim/vim/commit/cc5b22b3bfdc0e9e835cf7871166badda31447bd Join almost identical strup_save and strlow_save functions to one Function.
| * | | | | | | | | | mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
| | | | | | | | | | |
* | | | | | | | | | | Merge #6488 from ZyX-I/coverity-fixesJustin M. Keyes2017-04-10
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
| * | | | | | | | | | spellfile: Fix SAL sections readingZyX2017-04-09
| | | | | | | | | | |
| * | | | | | | | | | coverity/56795: Fix NULL dereference in :syn keyword non-printableZyX2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug was introduced 3 years earlier, in 13848aa: NULL keyword_copy was incorrectly treated as an indicator of OOM.
| * | | | | | | | | | spellfile: Fix clint errorsZyX2017-04-09
| | | | | | | | | | |
| * | | | | | | | | | spellfile: Fix memory leakZyX2017-04-09
| | | | | | | | | | |
| * | | | | | | | | | coverity/13689: Check file header with memcmpZyX2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not that it is actually useful (would fail in any case), but should fix coverity report.
| * | | | | | | | | | coverity/13688: Check for NUL bytes in salfromZyX2017-04-09
| | | | | | | | | | |
| * | | | | | | | | | coverity/13687: Do not allow NUL byte in region namesZyX2017-04-09
| | | | | | | | | | |
| * | | | | | | | | | spellfile: Use old errorZyX2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes first test not actually show any change in behaviour.
| * | | | | | | | | | coverity/13686: Do not allow NUL byte in precondition regexZyX2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit it emitted e_spell_trunc in the first case and treated file as completely valid on the second. While first is fine (both errors are actually valid, though old error is probably better), second results in incorrect regex used.
* | | | | | | | | | | cmake: Do not forget to actually create a touch file for errors.tar.gzZyX2017-04-10
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #6485 from jamessan/vim-8.0.0377James McCoy2017-04-09
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | vim-patch:8.0.0377,8.0.0378,8.0.0322,8.0.0376
| * | | | | | | | | lintJames McCoy2017-04-09
| | | | | | | | | |
| * | | | | | | | | vim-patch:8.0.0376James McCoy2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Size computations in spell file reading are not exactly right. Solution: Make "len" a "long" and check with LONG_MAX. https://github.com/vim/vim/commit/6d3c8586fc81b022e9f06c611b9926108fb878c7
| * | | | | | | | | vim-patch:8.0.0322James McCoy2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Possible overflow with spell file where the tree length is corrupted. Solution: Check for an invalid length (suggested by shqking) https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d CVE-2017-5953
| * | | | | | | | | vim-patch:8.0.0378James McCoy2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Another possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King) https://github.com/vim/vim/commit/0c8485f0e4931463c0f7986e1ea84a7d79f10c75 CVE-2017-6350
| * | | | | | | | | vim-patch:8.0.0377James McCoy2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King) https://github.com/vim/vim/commit/3eb1637b1bba19519885dd6d377bd5596e91d22c CVE-2017-6349
* | | | | | | | | | cmake: Do not use ExternalProjectZyX2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Necessary argument (EXCLUDE_FROM_ALL) only appears in 3.1.0.
* | | | | | | | | | cmake: Do not build clint-error-files by defaultZyX2017-04-09
|/ / / / / / / / /
* | | | | | | | | Merge #6439 from ZyX-I/fix-gc-failuresJustin M. Keyes2017-04-09
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | unittests: Force GC, fix GC failures in typval_spec
| * | | | | | | | | vim.h: Remove strange commentsZyX2017-04-09
| | | | | | | | | |
| * | | | | | | | | headers: Remove useless HAVE_CONFIG_H macrosZyX2017-04-09
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | We do not have non-cmake build options, cmake always does configure_file.
* | | | | | | | | Merge #6478 from ZyX-I/conv-fixesJustin M. Keyes2017-04-09
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove conversions which are not needed when &encoding is UTF-8
| * | | | | | | | | *: Remove useless assertsZyX2017-04-08
| | | | | | | | | |
| * | | | | | | | | *: Fix linter errorsZyX2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drops comments `// for …` that do not pass linter for them being unmaintainable and fast to becoming incomplete or even incorrect. Mention @dedmass
| * | | | | | | | | eval/*code,shada: Drop support for converting UTF-8 from/to p_encZyX2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not needed any longer since p_enc is always utf-8.
| * | | | | | | | | eval/decode: Omit calling convert_setup for each stringZyX2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses the same trick eval/encode does.
| * | | | | | | | | shada: Initialize vimconv_TZyX2017-04-08
| | | | | | | | | |
| * | | | | | | | | eval/decode,shada: Do not forget to clean up convertersZyX2017-04-08
| | | | | | | | | |
* | | | | | | | | | cmake: Use archive instead of downloading *.json files (#6482)Nikolai Aleksandrovich Pavlov2017-04-09
| | | | | | | | | |
* | | | | | | | | | refactor/single-includededmass2017-04-08
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #6463 refactor/single-include: file_search.h Closes #6455 refactor/single-include: hardcopy.h Closes #6457 refactor/single-include: if_cscope.h Closes #6458 refactor/single-include: mark.h Closes #6461 refactor/single-include: mbyte.h Closes #6462 refactor/single-include: memline.h Closes #6464 refactor/single-include: menu.h Closes #6468 refactor/single-include: ops.h Closes #6470
* | | | | | | | | refactor/single-include: fold.h #6456dedmass2017-04-08
| | | | | | | | |
* | | | | | | | | refactor/single-include: ex_getln.h #6454dedmass2017-04-08
| | | | | | | | |
* | | | | | | | | refactor/single-include: memline_defs.h #6465dedmass2017-04-08
| | | | | | | | |
* | | | | | | | | refactor/single-include: move.h #6469dedmass2017-04-08
| | | | | | | | |
* | | | | | | | | refactor/single-include: ex_cmds.h #6453dedmass2017-04-08
| | | | | | | | |
* | | | | | | | | refactor/single-include: digraph.h #6444dedmass2017-04-08
| | | | | | | | |