Commit Graph
727 Commits
Author SHA1 Message Date
Christian ClasonandDamien 90d40c68dc vim-patch:2cad941: runtime(zip): Use delete() for deleting directory
This is safer because we don't invoke the shell.

closes: vim/vim#15335

https://github.com/vim/vim/commit/2cad941dc0cb57bca577160eb3a349de2e667bcd

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-07-25 10:01:35 +02:00
Christian ClasonandDamien 64727ac012 vim-patch:38ce71c: runtime(zip): correctly extract file from zip browser
Problem:  Enter 'x' in zip browser fail with E121
Solution: Fix typo in zip#Extract()

closes: vim/vim#15321

https://github.com/vim/vim/commit/38ce71c1c323716cc4b130dbb3e8837a8b9a710b

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-07-24 09:14:26 +02:00
Nikita RudakovandChristian Brabandt c025c049a4 vim-patch:581d4a7: runtime(netrw): escape filename before trying to delete it (#29838)
fixes: vim/vim#15330

https://github.com/vim/vim/commit/581d4a7b356395bcb8606c1717ded65d47d26c68

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-24 07:33:44 +08:00
Christian ClasonandDamien 9322b7e059 vim-patch:9d57ea5: runtime(netrw): Fix endless recursion in netrw#Explore()
Problem:  ':E /etc BOOM' give E132 error.
Solution: Avoid recursion call with same arguments.

fixes: vim/vim#5723
closes: vim/vim#15318

https://github.com/vim/vim/commit/9d57ea5cd3a23af02c72c0e86fe24b7bba57189a

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-07-23 00:30:30 +02:00
Christian ClasonandGregory Anders a0fd51c1e2 vim-patch:1cc4cae: runtime(typst): Add typst runtime files
closes: vim/vim#15234

https://github.com/vim/vim/commit/1cc4cae961a7b49608ef7bd56837cc723d49db4d

Co-authored-by: Gregory Anders <greg@gpanders.com>
2024-07-16 09:43:57 +02:00
Christian ClasonandEnno 71c50edceb vim-patch:3146d63: runtime(netrw): fix remaining case of register clobber
complements 62f7b55c1a4564f8744af9446bc7af47fe16a245

closes: vim/vim#15114

https://github.com/vim/vim/commit/3146d63267664e0a0afdbe14be0cec30e7168a04

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-07-04 23:01:35 +02:00
bfredl bda63d5b97 refactor(typval)!: remove distinction of binary and nonbinary strings
This is a breaking change which will make refactor of typval and shada
code a lot easier. In particular, code that would use or check for
v:msgpack_types.binary in the wild would be broken. This appears to be
rarely used in existing plugins.

Also some cases where v:msgpack_type.string would be used to represent a
binary string of "string" type, we use a BLOB instead, which is
vimscripts native type for binary blobs, and already was used for BIN
formats when necessary.

msgpackdump(msgpackparse(data)) no longer preserves the distinction
of BIN and STR strings. This is very common behavior for
language-specific msgpack bindings. Nvim uses msgpack as a tool to
serialize its data. Nvim is not a tool to bit-perfectly manipulate
arbitrary msgpack data out in the wild.

The changed tests should indicate how behavior changes in various edge
cases.
2024-06-27 11:04:04 +02:00
zeertzjqandChristian Brabandt 295e223a28 vim-patch:62f7b55: runtime(netrw): save and restore register 0-9, a and unnamed (#29479)
fixes: vim/vim#15077

https://github.com/vim/vim/commit/62f7b55c1a4564f8744af9446bc7af47fe16a245

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-25 09:38:50 +08:00
zeertzjqandChristian Brabandt c1d463fcaf vim-patch:52f2ff0: runtime(zip): revert unintended change to zip#Write()
This was wrongly included as of patch 1c6734291295bf8aa39577840b40bb
because apparently I messed up the use of git apply :/

https://github.com/vim/vim/commit/52f2ff03636fe120f3c9d00e9b3cdc1da251bd73

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-16 05:52:13 +08:00
zeertzjqandChristian Brabandt 6f1cbfc9ab vim-patch:1c67342: runtime(zip): MS-Windows: handle files with spaces properly
This change does the following 3 things:

1) non need to quote the file to be extracted

The zipfile plugin used to quote and fnameescape() the path to the
file to be extracted. However testing with unzip showed, that while this
works on Linux on Windows you shall not escape the blanks in filenames.

As long as the pathname is properly quoted, this words on Linux and
Windows.

2) reset shellslash (MS-Windows only)

When shellslash is set, filenames to the zip archive will be forward
quoted. However since the filename is eventually handed over to the
unzip command, we need to make sure to use native paths so that the
command will understand what file to open. Therefore, if shellslash is
set (and the shell is cmd.exe), replace any forward slashes by the
expected backslashes

3) style:
Use tabs for the Header, remove a few comments in the s:Escape() and
zip#read() functions

fixes: vim/vim#14998

https://github.com/vim/vim/commit/1c6734291295bf8aa39577840b40bb21a7f27120

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-16 05:51:53 +08:00
zeertzjqandChristian Brabandt 874869321a vim-patch:4407461: runtime(netrw): correctly test for windows in NetrwGlob() (#29330)
use has("win32") instead of has("win64") otherwise it
won't work on x86 systems.

https://github.com/vim/vim/commit/440746158ce0fec2880ccacc03f39dbc954c5543

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-14 16:28:55 +08:00
zeertzjqandChristian Brabandt 4a24940980 vim-patch:1487947: runtime(netrw): glob() on windows fails with [] in directory name (#29324)
fixes: vim/vim#14952
closes: vim/vim#14991

https://github.com/vim/vim/commit/1487947fb625d44ed02382ea6b0d5bf72b12583a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-14 05:48:37 +08:00
Christian ClasonandChristian Brabandt 946a839aa9 vim-patch:98b73eb: runtime(netrw): prevent accidental data loss
fixes: vim/vim#14915

https://github.com/vim/vim/commit/98b73eb645b68b6e197b63bbbae777b388d47612

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-04 23:15:50 +02:00
zeertzjqandAmelia Clarke 3d39ea3ea9 vim-patch:9.1.0442: hare runtime files outdated (#29011)
Problem:  hare runtime files outdated
Solution: runtime(hare): update hare.vim to match upstream
          (Amelia Clarke)

closes: vim/vim#14836

https://github.com/vim/vim/commit/35dfe58a540e2fb0eff953630f8e4fcbf4bc26ca

Co-authored-by: Amelia Clarke <selene@perilune.dev>
2024-05-26 07:11:50 +08:00
Gregory AndersandTiseno d6be78cc98 vim-patch:d1d9316: runtime(zig): refactor zig ftplugin, remove auto format (#28904)
Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.

closes: vim/vim#13803

https://github.com/vim/vim/commit/d1d9316c6621d275593f58664975faf0fc23985f

Co-authored-by: Tiseno <mathias.lindgren@stabelo.se>
2024-05-21 18:51:51 -05:00
dundargoc a664246171 feat: remove deprecated features
Remove following functions:
- vim.lsp.util.extract_completion_items
- vim.lsp.util.get_progress_messages
- vim.lsp.util.parse_snippet()
- vim.lsp.util.text_document_completion_list_to_complete_items
- LanguageTree:for_each_child
- health#report_error
- health#report_info
- health#report_ok
- health#report_start
- health#report_warn
- vim.health.report_error
- vim.health.report_info
- vim.health.report_ok
- vim.health.report_start
- vim.health.report_warn
2024-05-16 18:30:59 +02:00
Christian ClasonandChristian Brabandt ccc0b750b7 vim-patch:43f2edc096cb
runtime(netrw): prefer scp over pscp

regression introduced in ce2ad9ffd79fe6b2307cd46b9

The current logic is a bit funny, in that it checks for an executable of
scp, then pscp and if neither exists, it uses: scp :/
Anyway, let's fall back to the logic used before the above commit.

related: vim/vim#14739

https://github.com/vim/vim/commit/43f2edc096cbf9c67095b301a1f4325866eeba36

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-14 08:27:17 +02:00
Christian ClasonandNir Lichtman 6ec6fafd66 vim-patch:c16c4a21eb39
runtime(netrw): Recursively delete directories by default with netrw delete command

closes: vim/vim#14742

https://github.com/vim/vim/commit/c16c4a21eb397634309f1f574811461d6154118d

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2024-05-11 09:52:03 +02:00
Christian ClasonandNir Lichtman a7a9b205b5 vim-patch:ce2ad9ffd79f
runtime(netrw): Remove hardcoded private.ppk logic from netrw

closes: vim/vim#14739

https://github.com/vim/vim/commit/ce2ad9ffd79fe6b2307cd46b96af7d99c0dd646e

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2024-05-10 00:05:52 +02:00
Christian ClasonandNir Lichtman 9b1628da98 vim-patch:1e34b95e4402
runtime(netrw): Remove and cleanup Win9x legacy from netrw

closes: vim/vim#14732

https://github.com/vim/vim/commit/1e34b95e4402fd8964ea4bcee0d2b6ffa6677aab

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2024-05-09 00:15:08 +02:00
Christian ClasonandChristian Brabandt 56701cd21e vim-patch:08d2401fbc6d
runtime(netrw): filetype not detected when editing remote files

fixes: vim/vim#14400

https://github.com/vim/vim/commit/08d2401fbc6de2606aca69add401e2ffca772aa2

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-04 10:29:58 +02:00
dundargocandGregory Anders 0ebc4de0ff feat: allow opting in to builtin clipboard providers (#28083)
Setting `vim.g.clipboard = false` will use the builtin clipboard
providers.

Closes https://github.com/neovim/neovim/issues/27698.

Co-authored-by: Gregory Anders <greg@gpanders.com>
2024-03-28 15:17:08 -05:00
Christian Clasonanddkearns 665d5d3969 vim-patch:4b715bdaf4ca
runtime(netrw): Fix typo in netrw#NetWrite (vim/vim#14283)

Fix typo in netrw#NetWrite (http) error message call.

https://github.com/vim/vim/commit/4b715bdaf4ca08ba0f64475e250c0fe799ab6d9b

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-24 23:00:43 +01:00
Christian ClasonandChristian Brabandt 41f2cbe171 vim-patch:8fad5d58874e
runtime(doc,netrw): update "Last Change header", remove trailing whitespace

Update Last-Change Header for netrw and doc/indent.txt, fix a trailing
whitespace in indent.txt and make CI happy.

https://github.com/vim/vim/commit/8fad5d58874ed724f673ac8a83739164cead3961

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-02-29 22:54:57 +01:00
Christian ClasonandChristian Brabandt bfcf5666cc vim-patch:56b7da3c051f
runtime(netrw): handle file/dir symlinks specifically in tree mode

fixes: vim/vim#2386
related: vim/vim#3609

https://github.com/vim/vim/commit/56b7da3c051fe1a5fd76534998c17b22d83c0899

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-02-29 22:54:57 +01:00
2f85bbe615 feat!: rewrite TOhtml in lua
Co-authored-by: wookayin <wookayin@gmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: Lewis Russell <me@lewisr.dev>
2024-02-28 16:26:00 +00:00
zeertzjqandChristian Brabandt 9bb046d1be vim-patch:f9ca139e3aa1 (#27554)
runtime(misc): announce adoption of various runtime files

https://github.com/vim/vim/commit/f9ca139e3aa12dd03177ebba5eedcee4f0836f27

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-02-21 06:30:18 +08:00
dundargoc 2e982f1aad refactor: create function for deferred loading
The benefit of this is that users only pay for what they use. If e.g.
only `vim.lsp.buf_get_clients()` is called then they don't need to load
all modules under `vim.lsp` which could lead to significant startuptime
saving.

Also `vim.lsp.module` is a bit nicer to user compared to
`require("vim.lsp.module")`.

This isn't used for some nested modules such as `filetype` as it breaks
tests with error messages such as "attempt to index field 'detect'".
It's not entirely certain the reason for this, but it is likely it is
due to filetype being precompiled which would imply deferred loading
isn't needed for performance reasons.
2024-02-03 16:53:41 +01:00
Christian ClasonandMiguelBarro 0da18ae5ce vim-patch:c46c21b4ca47
runtime(netrw): fixing remote file removal via ssh (vim/vim#13942)

Make pattern, which retrieves the path component from e.g.
`scp://user@host//opt/program/file.ext` non-greedy.

https://github.com/vim/vim/commit/c46c21b4ca476c0846a410d7c4d8c6e3e930f167

Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
2024-02-01 10:04:32 +01:00
Christian Clasonanduser202729 f4b3636f24 vim-patch:bdb9d9afba97
runtime(netrw): Use :exec norm! <leftmouse> before :call mapping in netrw (vim/vim#12180)

fixes: vim/vim#12143

https://github.com/vim/vim/commit/bdb9d9afba9769b1cb9c0b320086142d99034c9a

Co-authored-by: user202729 <25191436+user202729@users.noreply.github.com>
2024-01-31 09:55:08 +01:00
Christian ClasonandK.Takata f7bda77f9e vim-patch:a262d3f41bc5
runtime(netrw): Don't change global options (vim/vim#13910)

Originally reported at: https://github.com/vim-jp/issues/issues/1428
'isk' was unintentionally changed by netrw, regression
introduced in Commit: 71badf9547e8f89571b9a095183671cbb333d528

https://github.com/vim/vim/commit/a262d3f41bc51be697ddebbf04f186e7d193fd6f

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-01-24 23:23:23 +01:00
dundargoc b280d57db9 refactor: rewrite ruby provider in lua 2024-01-24 19:26:53 +01:00
dundargoc 576db141be refactor: rewrite perl provider in lua 2024-01-24 11:55:28 +01:00
dundargoc eb5d15e383 refactor: rewrite python provider in lua 2024-01-22 22:36:40 +01:00
Christian ClasonandMiguelBarro 223a6afd8f vim-patch:6e5a6c9965f6
runtime(netrw): minor changes to fix move cmd on windows (vim/vim#13823)

https://github.com/vim/vim/commit/6e5a6c9965f667712494ae0a9df8a407267cc72f

Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
2024-01-18 08:42:00 +01:00
Sean DewarandDoug Kearns 91dc04a5e1 vim-patch:9.1.0013: Modula2 filetype support lacking (#27020)
Problem:  Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
          dialects, add compiler plugin, update syntax highlighting,
          include syntax tests, update Makefiles (Doug Kearns)

closes: vim/vim#6796
closes: vim/vim#8115

https://github.com/vim/vim/commit/68a89470693c7687d4e736ca056c05de632e3ac7

- Luaify the detection script:

  - Split the `(*!m2foo*)` and `(*!m2foo+bar*)` detection into two Lua patterns,
    as Lua capture groups cannot be used with `?` and friends (as they only work
    on character classes).

  - Use `vim.api.nvim_buf_call()` (ew) to call `modula2#SetDialect()` to ensure
    `b:modula2` is set for the given bufnr.

- Skip the syntax screendump tests. (A shame as they test some of the detection
  from `(*!m2foo+bar*)` tags, but I tested this locally and it seems to work)

- Port the synmenu.vim changes from Vim9 script. (Also tested this locally)

- (And also add the missing comma for `b:browsefilter` from earlier.)

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-01-16 17:45:57 +00:00
Christian ClasonandK.Takata 7f249936a9 vim-patch:2357765304e4
runtime(netrw): Decode multibyte percent-encoding filename correctly (vim/vim#13842)

Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.

Close vim/vim#13787

https://github.com/vim/vim/commit/2357765304e4c55935b5cc853ffb98ae82d64a01

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-01-12 19:45:15 +01:00
Christian ClasonandK.Takata 595f684c5b vim-patch:71d0ba07a33a
runtime(netrw): Sync with netrw 174b (vim/vim#13836)

* Import netrw v174b
* Revert unwanted changes
* Fix indent
* Revert some changes
* Update tags
* Break long line

https://github.com/vim/vim/commit/71d0ba07a33a750e9834cd42b7acc619043dedb1

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-01-09 23:22:48 +01:00
501cf32357 vim-patch:3a5b3df7764d (#26956)
runtime(tar): fix a few problems with the tar plugin

From: vim/vim#138331:
  - Updating .tar.zst files was broken. Fixes vim/vim#12639.
  - Extracting files from .tar.zst / .tzs files was also broken and
    works now.
From: vim/vim#12637:
  - Fixes variable assignment and typo
From: vim/vim#8109:
  - Rename .tzs to the more standard .tzst

fixes: vim/vim#12639
fixes: vim/vim#8105
closes: vim/vim#8109
closes: vim/vim#12637
closes: vim/vim#13831

https://github.com/vim/vim/commit/3a5b3df7764daa058a3e779183e8f38a8418b164

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
2024-01-10 06:03:09 +08:00
Christian Clasonanddkearns 99f1530a4f vim-patch:d08059ab48b8
runtime(ruby): Update ftplugin and omni-complete (vim/vim#13805)

https://github.com/vim/vim/commit/d08059ab48b822a25060b8a486085371ddeebcf7

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-01-02 11:43:18 +01:00
Christian ClasonandChristian Brabandt 18933fc47f vim-patch:fbd72d2d4725
runtime(netrw): prevent E11 on FocusGained autocommand (vim/vim#13718)

https://github.com/vim/vim/commit/fbd72d2d47257267bc6e3fe093ef8c225369ab79

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-19 23:44:20 +01:00
zeertzjqandChristian Brabandt 0d26d192d8 vim-patch:9a775b4a2ae6 (#26588)
runtime(netrw): escape curdir in BrowseUpDir (vim/vim#13681)

 fixes vim/vim#13678

https://github.com/vim/vim/commit/9a775b4a2ae658e61f9d6582de72ea7a1b241aaa

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 05:28:57 +08:00
Christian ClasonandKSR-Yasuda 7e717805be vim-patch:b52e7ac7c61c
runtime(netrw): Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2` (vim/vim#13659)

* NetRW: Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2`
* NetRW: Fix wrong `w:netrw_bannercnt` setting

closes: vim/vim#13640

https://github.com/vim/vim/commit/b52e7ac7c61cd88d04ee6b7b1808c361dd4a7640

Co-authored-by: KSR-Yasuda <31273423+KSR-Yasuda@users.noreply.github.com>
2023-12-15 10:30:13 +01:00
zeertzjqandK.Takata 62dc1f2663 vim-patch:8750e3cf81f1 (#26163)
runtime(netrw): Fix handling of very long filename on longlist style (vim/vim#12150)

If there is a file with a very long filename (longer than
g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space
is inserted between the filename and the filesize and the file cannot be
opened because of this.

E.g.:
```
$ echo hello > 12345678901234567890123456789012	  # 32 bytes: OK
$ echo hello > 123456789012345678901234567890123  # 33 bytes: not OK
$ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK
$ echo hello > こんにちは                         # multibyte filename
$ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1"
```

Then, it will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                              0 Mon Mar 13 19:25:16 2023
./                               0 Mon Mar 13 19:44:58 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023
こんにちは                  6 Mon Mar 13 19:30:41 2023
```

If the length of the filename is 32 bytes, there is a space between the
filename and the filesize. However, when it is longer than 32 bytes, no
space is shown.

Also, you may find that the filesize of the multibyte named file is not
aligned.

After this patch is applied, the filelist will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                                             0 Mon Mar 13 20:49:22 2023
./                                              0 Mon Mar 13 21:12:14 2023
1234567890123456789012345678901             10000 Mon Mar 13 20:57:55 2023
12345678901234567890123456789012                6 Mon Mar 13 19:29:43 2023
123456789012345678901234567890123               6 Mon Mar 13 19:29:49 2023
1234567890123456789012345678901234              6 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901234567       10000 Mon Mar 13 21:03:23 2023
1234567890123456789012345678901234567890    10000 Mon Mar 13 21:03:36 2023
123456789012345678901234567890123456789012  10000 Mon Mar 13 21:03:59 2023
1234567890123456789012345678901234567890123  10000 Mon Mar 13 21:03:45 2023
1234567890123456789012345678901234567890123456  5 Mon Mar 13 21:08:15 2023
12345678901234567890123456789012345678901234567  10 Mon Mar 13 21:05:21 2023
こんにちは                                      6 Mon Mar 13 19:30:41 2023
```

Now we have 32 + 2 + 15 = 49 characters for filename and filesize.
It tries to align the filesize as much as possible.
The last line that has multibyte filename is also aligned.

Also fixed the issue that the file list is not shown correctly when
g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or
'H'.

https://github.com/vim/vim/commit/8750e3cf81f12132e7b4141501feba586b1ae11d

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-11-23 17:02:53 +08:00
zeertzjqandChristian Brabandt 059dc3f4a6 vim-patch:cb0c113ddc01 (#26147)
runtime(netrw): expand $COMSPEC without applying 'wildignore' (vim/vim#13542)

When expanding $COMSPEC and a user has set :set wildignore=*.exe
netrw won't be able to properly cmd.exe, because it does not ignore the
wildignore setting.

So let's explicitly use expand() without applying the 'wildignore' and
'suffixes' settings to the result

closes: vim/vim#13426

https://github.com/vim/vim/commit/cb0c113ddc0101b05a27c040774cb7106fc74cd4

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-22 11:06:46 +08:00
Christian ClasonandChristian Brabandt c37f7bdba5 vim-patch:67abf1592c83
runtime(tar): comment out strange error condition check

https://github.com/vim/vim/commit/67abf1592c83c910c7815478f67e0a8989d51417

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-14 23:29:09 +01:00
Christian ClasonandChristian Brabandt b329a21bd3 vim-patch:3d37231437fc
runtime(tar): improve the error detection

Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.

So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.

The whole if condition seems however slightly dubious.  In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.

There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.

related: vim/vim#6425
fixes: vim/vim#13489

https://github.com/vim/vim/commit/3d37231437fc0f761664a7cabc8f7b927b468767

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-05 21:56:56 +01:00
Christian ClasonandSean Dewar dcf5999fcd vim-patch:b2a4c110a5d1
runtime(dist): Make dist/vim.vim work properly when lacking vim9script support (vim/vim#13487)

`:return` cannot be used outside of `:function` (or `:def`) in older Vims
lacking Vim9script support or in Neovim, even when evaluation is being skipped
in the dead `:else` branch.

Instead, use the pattern described in `:h vim9-mix`, which uses `:finish` to end
script processing before it reaches the vim9script stuff.

https://github.com/vim/vim/commit/b2a4c110a5d13bc794f4eddb2e88a4e8fe9dfbea

Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-11-05 21:52:02 +01:00
Christian ClasonandChristian Brabandt 2a47dbe228 vim-patch:4f174f0de90b
runtime(dist): add legacy version for central vim library

Also, enable the zip and gzip plugins by default, unless those variables
were not explicitly set by the user.

related: vim/vim#13413

https://github.com/vim/vim/commit/4f174f0de90b52937ddaf1e6db98e9731930ff7c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-05 21:52:02 +01:00
Christian ClasonandD. Ben Knoble 26cdff0e92 vim-patch:cd8a3eaf5348
runtime(dist): centralize safe executable check and add vim library (vim/vim#13413)

Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes,
2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when
loading ftplugins, 2023-09-06).

This puts the logic for safe executable checks in a single place, by introducing
a central vim library, so all filetypes benefit from consistency.

Notable changes:
- dist#vim because the (autoload) namespace for a new runtime support
  library. Supporting functions should get documentation. It might make
  life easier for NeoVim devs to make the documentation a new file
  rather than cram it into existing files, though we may want
  cross-references to it somewhere…
- The gzip and zip plugins need to be opted into by enabling execution
  of those programs (or the global plugin_exec). This needs
  documentation or discussion.
- This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed
  in f7ac0ef50 (runtime: don't execute external commands when loading
  ftplugins, 2023-09-06), but the variable was still referenced. Since
  the new function takes care of that automatically, the variable is no
  longer needed.

https://github.com/vim/vim/commit/cd8a3eaf5348feacfecab4b374b7ea4ce6a97422

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2023-11-05 21:52:02 +01:00