Commit Graph

17262 Commits

Author SHA1 Message Date
Santos Gallegos
947f9a04d4 treesitter: small fixes
Mostly typos I found while reading the code.
2021-02-07 01:27:38 -05:00
Jan Edmund Lazo
b894fbcbe8
Merge pull request #13892 from janlazo/vim-8.1.2285
vim-patch:8.1.2285
2021-02-06 22:11:02 -05:00
Jan Edmund Lazo
f9c0af0180
eval: ll_range,ll_empty2 members are bool 2021-02-06 17:40:40 -05:00
Jan Edmund Lazo
bea99729dd
vim-patch:8.1.2285: padding in structures wastes memory
Problem:    Padding in structures wastes memory.
Solution:   Move fields to avoid padding. (Dominique Pelle, closes vim/vim#5202)
d6beab0248

Skip "ml_line_len" member of "struct memline".
Patch v8.1.0579 was not ported.
2021-02-06 17:30:47 -05:00
Jan Edmund Lazo
336eb70822
vim-patch:8.2.2469: confusing error if :winsize has a wrong argument (#13889)
Problem:    Confusing error if :winsize has a wrong argument.
Solution:   Quote the argument in the error. (closes vim/vim#2523)
f5a5116a96

Cherry-pick Test_winsize_cmd() from patch v8.2.0243.
2021-02-06 12:24:24 -05:00
James McCoy
e455f0ba2d
Merge pull request #13876 from jamessan/pty-term
fix(pty): Always use $TERM from the job's env dict
2021-02-06 09:06:34 -05:00
James McCoy
33f92fe025
fix(pty): Always use $TERM from the job's env dict
Before #12937, the only way to specify the `$TERM` for a pty job was
through the `TERM` key in the job's opts dict.  This was shuttled to the
child process throug a special field on the PtyProcess object and
injected into the environment after forking.

Now that we have a proper way to specify the environment for a job, we
can simply ensure that the env dict has a proper `TERM` set and avoid
the extra shuttling of data around.

This deprecates the use of the `TERM` option, but will still honor it if
present, although at a lower priority than a `TERM` present in the env
dict.

This also fixes #13874 because we're no longer trying to overwrite
`TERM` in the env dict with the special pty `term_name`.  Doing so
raises an internal error because of the existing key which, under
certain circumstances, would cause the "hit enter" prompt.  However,
since the child process had already forked, there was no way for the
user to acknowledge the prompt and we would just hang there.
2021-02-06 07:12:33 -05:00
James McCoy
f4f6cce952
Merge pull request #13888 from jamessan/win-ci
ci(gha/win): Do not rename python.exe to python3.exe if it exists
2021-02-06 07:10:58 -05:00
erw7
02a9663869
Merge pull request #13701 from erw7/fix-checkhealth
Fix checkhealth problems
2021-02-06 13:01:37 +09:00
erw7
957ac9442c
Merge pull request #13702 from erw7/fix-build_stl_str_hl
buffer.c: fix problem of memory allocation
2021-02-06 12:56:20 +09:00
erw7
787339892d
Merge pull request #12080 from erw7/feature-bracketed-paste-on-term
terminal: add bracketed pasting feature
2021-02-06 12:51:24 +09:00
James McCoy
8f24199490
ci(gha/win): Do not rename python.exe to python3.exe if it exists
GHA now provides python3.exe by default -- actions/python-versions#78

Ensure Python 2 directory is earlier in $PATH so bare python always
invokes Python 2.
2021-02-05 22:39:10 -05:00
Björn Linse
c95e797b83
Merge pull request #13878 from bfredl/incmark
inccommand: preserve extmarks when undoing preview substitution
2021-02-05 08:50:53 +01:00
Björn Linse
209fb35acd tests: clean up lua/buffer_updates_spec.lua 2021-02-04 14:35:30 +01:00
Björn Linse
aa50369897 inccommand: preserve extmarks when undoing preview substitution 2021-02-04 14:33:37 +01:00
runiq
94cf7bba00
lsp: Fix pumvisible() check introduced in #12900 (#13866)
`pumvisible()` returns a number, and numbers are always `true` in Lua,
so the return value needs to be checked explicitly.

Using https://github.com/neovim/neovim/pull/12900 as context, it appears
the intention was to move into the `if` branch when the completion popup
is not shown (i.e. `vim.fn.pumvisible() == 0`).
2021-02-04 12:35:17 +01:00
erw7
4dc41c0516 Change default for tpf option
Change the default of tpf to the same value as the default of xterm's
disallowedPasteControls, because it may be a security risk.
2021-02-04 15:20:05 +09:00
erw7
1e3fadb419 Add termpastefilter option
Change to specify a character to be filtered as an option when pasting on
the terminal.
2021-02-04 15:20:05 +09:00
erw7
14158e8d47 Change to filter control characters when pasting a terminal window
Change to filter the following control characters in the same way as
xterm.

\x00-\x07, \x0b-\x0c, \x0e-\x1f
2021-02-04 15:20:05 +09:00
erw7
81a30f4367 Add support for bracketed paste mode in terminal windows 2021-02-04 15:20:05 +09:00
Jan Edmund Lazo
b96db38af1
Merge pull request #13865 from janlazo/vim-8.2.2437
vim-patch:8.2.{2437,2439,2442,2446,2447,2448,2457,2458,2462,2464}
2021-02-03 22:36:52 -05:00
Jan Edmund Lazo
4a1a86a2be
vim-patch.sh: remove unsupported files (#13570)
Add files listed in https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim#na-not-applicable-patches.
2021-02-03 18:53:27 -05:00
Jan Edmund Lazo
da3f9778af
vim-patch:8.2.2464: using freed memory if window closed in autocommand
Problem:    Using freed memory if window closed in autocommand. (houyunsong)
Solution:   Check the window still exists.
8ab375706e
2021-02-03 18:46:53 -05:00
Jan Edmund Lazo
02cda35cf7
vim-patch:8.2.2462: Coverity warns for not checking for fseek() error
Problem:    Coverity warns for not checking for fseek() error.
Solution:   Give an error message if fseek() fails.
2c363a2e95
2021-02-03 18:37:32 -05:00
Jan Edmund Lazo
8d3baf0791
vim-patch:8.2.2458: Coverity warns for :retab using freed memory
Problem:    Coverity warns for :retab using freed memory.
Solution:   Use the updated line pointer when moving text properties.
0dcd39bad5

N/A patches for version.c:

vim-patch:8.2.2457: Coverity warns for memory leak

Problem:    Coverity warns for memory leak.
Solution:   Free memory when out of memory.
4dba04256b
2021-02-03 18:33:52 -05:00
Jan Edmund Lazo
65e51fca0e
vim-patch:8.2.2447: 'foldlevel' not applied to folds restored from session
Problem:    'foldlevel' not applied to folds restored from session.
Solution:   Set 'foldlevel' after creaiting the folds. (closes vim/vim#7767)
f9547eb6ef
2021-02-01 21:42:26 -05:00
Jan Edmund Lazo
2a6580a8e2
vim-patch:8.2.2446: setting 'term' empty has different error if compiled with GUI
Problem:    Setting 'term' empty has different error if compiled with GUI.
Solution:   Insert "else". (closes vim/vim#7766)
5daa911626

N/A patches for version.c:

vim-patch:8.2.2437: deprecation warnings with default configuration

Problem:    Deprecation warnings with default configuration.
Solution:   Add -Wno-deprecated-declarations.
4d8479b335

vim-patch:8.2.2439: not easy to figure out what packages to get

Problem:    Not easy to figure out what packages to get when installing Vim on
            a new Ubuntu system.
Solution:   Mention explicit commands that are easy to follow.
3d2bb8b6f1

vim-patch:8.2.2442: automatic GUI selection does not check for GTK 3

Problem:    Automatic GUI selection does not check for GTK 3.
Solution:   Make SKIP_GTK3 empty for automatic GUI support.  Set SKIP_GTK3 to
            YES when checking for GTK2.
f272ae12ac

vim-patch:8.2.2448: compilation error with Ruby 3.0

Problem:    Compilation error with Ruby 3.0.
Solution:   Adjust #ifdefs and declaration. (Ken Takata, closes vim/vim#7761)
9d20daffc2
2021-02-01 21:34:12 -05:00
Volodymyr Kot
cc1851c9fd
Add clangd cache to ignore (#13856)
While standard library is cached to a user's directory such as
$XDG_CACHE_HOME, directory-specific clangd indexes are stored to .cache
subdirectory.
https://github.com/llvm/clangd-www/blob/main/design/indexing.md#backgroundindex
2021-01-31 23:03:35 -05:00
James McCoy
e85c8dff69
Merge pull request #12937 from jamessan/term-env 2021-01-31 13:25:16 -05:00
James McCoy
81794204ce
ci(sr.ht): Use RelWithDebInfo builds
Many compiler checks rely on optimizations being enabled, so we want
these to show up in CI.  Use RelWithDebInfo instead of Release so that
assert() statements aren't compiled out.
2021-01-31 11:28:52 -05:00
James McCoy
27a7a4d384
Use abort() instead of assert(false) for things that should never happen
assert() is compiled out for release builds, but we don't want to
continue running in these impossible situations.

This also resolves the "implicit fallthrough" warnings for the asserts
in switch cases.
2021-01-31 11:28:52 -05:00
Jan Edmund Lazo
b2713f11b4
vim-patch:8.2.2430: :vimgrep expands wildcards twice (#13853)
Problem:    :vimgrep expands wildcards twice.
Solution:   Do not expand wildcards a second time.
f8c6a17180
2021-01-31 10:10:22 -05:00
James McCoy
035ee868ae
fix(pty_proc/macOS): Properly set the environment for the child
Binding _NSGetEnviron()'s return value to a local variable and then
re-binding that is incorrect.  We need to directly update what
_NSGetEnviron() refers to.
2021-01-31 07:54:22 -05:00
James McCoy
db734ae994
test(job): Ensure job-specific env var overrides global env var 2021-01-31 07:54:21 -05:00
James McCoy
a199363be2
Pass environment on to pty processes on Windows
vim-patch:8.2.0239: MS-Windows: 'env' job option does not override existing vars

Problem:  MS-Windows: 'env' job option does not override existing
          environment variables.  (Tim Pope)
Solution: Set the environment variables later. (Yasuhiro Matsumoto,
          closes vim/vim#5485, closes vim/vim#5608)
355757aed6

Co-authored-by: erw7 <erw7.github@gmail.com>
2021-01-31 07:54:21 -05:00
James McCoy
a54ac073fb
eval/environ: Prefer the last definition of an env var
It's possible for the environment variable block given to nvim to
contain multiple definitions for the same env var.  In this case, nvim
should preserve the last one defined.
2021-01-31 07:54:21 -05:00
James McCoy
8eec9c7d5b
Common handling of required/ignored env vars
When starting a pty job, there are certain env vars that we need to
either add or remove.  Currently, there are two relevant scenarios.

* Removing irrelevant env vars on Unix, mostly related to the terminal
  hosting nvim since they do not apply to a libvterm-hosted terminal.

* Adding required env vars for Windows jobs.
2021-01-31 07:54:20 -05:00
James McCoy
ef7c6b972a
Support specifying "env" option for termopen()
Co-authored-by: erw7 <erw7.github@gmail.com>
2021-01-31 07:54:20 -05:00
James McCoy
7f50c69268
Use dict_T to pass env vars to process spawning code
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
2021-01-31 07:54:20 -05:00
Jan Edmund Lazo
55add1c1c8
version.c: update [ci skip] (#13705)
vim-patch:8.2.2307: a shell command in the vimrc causes terminal output
vim-patch:8.2.2312: build failure with Ruby 3.0 and 32 bits
vim-patch:8.2.2326: build error with +eval feature but without +spell
vim-patch:8.2.2337: configure test for GTK only says "no"
vim-patch:8.2.2346: Codecov reports every little coverage drop
vim-patch:8.2.2347: build failure without GUI
vim-patch:8.2.2348: no check for modified files after focus gained
vim-patch:8.2.2352: if focus lost/gained is received twice code is not ignored
vim-patch:8.2.2358: wrong #ifdef for use_xterm_like_mouse()
vim-patch:8.2.2383: focus escape sequences are not named
vim-patch:8.2.2407: old jumplist code is never used
vim-patch:8.2.2408: MinGW: "--preprocessor" flag no longer supported
vim-patch:8.2.2431: warning for -fno-strength-reduce with Clang 11
vim-patch:8.2.2432: libvterm tests are executed even when libtool doesn't work
2021-01-30 20:48:49 -05:00
Jan Edmund Lazo
4e8a01a306
Merge pull request #13835 from saadparwaiz1/runtime/zsh
Update Runtime Files For Zsh
2021-01-30 18:34:16 -05:00
Saad Parwaiz
55fed9a2b0 runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh compiler only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
bf1da7424d runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh ftplugin only.
2021-01-30 20:50:04 +00:00
Saad Parwaiz
7722eb0953 runtime/zsh: b17893aa940dc7d45421f875f5d90855880aad27
port zsh ftplugin only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
da61cca9f7 runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh syntax file only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
d89cbb62ab runtime/zsh: b17893aa940dc7d45421f875f5d90855880aad27
port zsh syntax file only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
44802202be runtime/zsh: 96f45c0b6fc9e9d404e6805593ed1e0e6795e470
Port zsh syntax file only
2021-01-30 20:50:04 +00:00
Matthieu Coudron
c4d0211fea
Merge pull request #13852 from janlazo/vim-8.2.2037
vim-patch:8.2.{2037,2038}
2021-01-30 21:31:20 +01:00
Jan Edmund Lazo
150859d717
test/old: rewrite method code in test_compiler.vim
Patch v8.1.1803 and related method patches are not ported yet.
Revert this commit when those patches are ported.
2021-01-30 13:40:28 -05:00
Jan Edmund Lazo
647c9c558b
vim-patch:8.2.2038: compiler test fails on MS-Windows
Problem:    Compiler test fails on MS-Windows.
Solution:   Sort the found compiler plugin names.
142f23544c
2021-01-30 13:37:26 -05:00