Commit Graph

753 Commits

Author SHA1 Message Date
Christian Clason
423176db56 vim-patch:be551da: runtime(netrw): remove extraneous closing bracket
fixes: vim/vim#15717
closes: vim/vim#15718

be551dacb8

Co-authored-by: Peter Aronoff <peter@aronoff.org>
2024-09-23 09:30:49 +02:00
zeertzjq
881a58787d
vim-patch:e6b01cf: runtime(dist): do not output a message if executable is not found (#30451)
closes: vim/vim#15705

e6b01cfe01

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-09-21 12:16:28 +00:00
Christian Clason
82f329a41d vim-patch:c18a9d5: runtime(netrw): using inefficient highlight pattern for 'mf'
Fixes E872 too many '(' in highlight pattern for `mf` selection

fixup for vim/vim#15551
closes: vim/vim#15700

c18a9d5835

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
2024-09-21 11:25:41 +02:00
Christian Clason
5e7933693b vim-patch:0f5effb: runtime(netrw): delete confirmation not strict enough
fixes: vim/vim#15680

0f5effbd1f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-09-16 08:16:20 +02:00
Gregory Anders
51088b67cb
vim-patch:150b507: runtime(hcl,terraform): Add runtime files for HCL and Terraform (#30266)
closes: vim/vim#15618

150b5078ac
2024-09-04 19:32:52 -05:00
wzy
60ea046741
feat(clipboard): try cygutils, clip on Windows #30215 2024-09-02 05:43:23 -07:00
Christian Clason
8db8793503 vim-patch:c75dad0: runtime(netrw): Change line on mx if command output exists
closes: vim/vim#15550

c75dad0177

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
2024-08-22 23:45:48 +02:00
Christian Clason
916237d9b5 vim-patch:38cfa2b: runtime(netrw): Fix mf-selected entry highlighting
closes: vim/vim#15551

38cfa2b662

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
2024-08-22 23:45:48 +02:00
zeertzjq
3bd7492a69
vim-patch:bc29ea6: runtime(zip): simplify condition to detect MS-Windows (#30115)
related: vim/vim#15519

bc29ea6286

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-22 05:58:22 +08:00
zeertzjq
6f7bb02e7f
vim-patch:9.1.0686: zip-plugin has problems with special characters (#30108)
Problem:  zip-plugin has problems with special characters
          (user202729)
Solution: escape '*?[\' on Unix and handle those chars
          a bit differently on MS-Windows, add a test, check
          before overwriting files

runtime(zip): small fixes for zip plugin

This does the following:
- verify the unzip plugin is executable when loading the autoload plugin
- handle extracting file names with '[*?\' in its name correctly by
  escaping those characters for the unzip command (and handle those
  characters a bit differently on MS-Windows, since the quoting is different)
- verify, that the extract plugin is not overwriting a file (could cause
  a hang, because unzip asking for confirmation)
- add a test zip file which contains those special file names

fixes: vim/vim#15505
closes: vim/vim#15519

7790ea0c68

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-20 23:35:27 +00:00
Christian Clason
d1bdeacb00 vim-patch:8e25d91: runtime(dist): verify that executable is in $PATH
Otherwise, if the executable to be verified does not exist,
this would cause a false-positive in the 'IsSafeExecutable()' check,
because 'exepath(executable)' returns an empty string and
'fnamemodify('', ':p:h')' returns the current directory and as a result
the 'IsSafeExecutable()' returns false (for the wrong reason).

8e25d91cb7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-18 01:19:01 +02:00
Christian Clason
550ddef366 vim-patch:1fbccc1: runtime(netrw): Drop committed trace lines
closes: vim/vim#15501

1fbccc1e96

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-08-17 13:03:13 +02:00
Christian Clason
68eceb8058 vim-patch:b4d1164: runtime(netrw): Error popup not always used
Problem:  g:netrw_use_errorwindow=2 does not work
          without +balloon_eval.
Solution: Check for popup_atcursor().

related: vim/vim#15501

b4d1164425

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-08-17 13:03:13 +02:00
Christian Clason
de68077545 vim-patch:7c75411: runtime(netrw): ErrorMsg() may throw E121
Move variables declaration

related: vim/vim#15501

7c754110ff

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-08-17 13:03:13 +02:00
zeertzjq
450d49660f vim-patch:afea6b9: runtime(zip): use defer to restore old settings
Problem:  RestoreOpts() plugin called too often
Solution: use :defer to have the RestoreOpts() function
          called when the function returns automatically

afea6b9468

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:16:26 +08:00
zeertzjq
221c489edd vim-patch:8d52926: runtime(zip): add a generic Message function
Problem:  the zip plugin duplicates a lot of code for displaying
          warnings/errors
Solution: refactor common code into a generic Mess() function

8d52926857

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:16:26 +08:00
zeertzjq
025920b330 vim-patch:a336d8f: runtime(zip): increment base version of zip plugin
Problem:  the zip plugin version is still v33
Solution: increment the version to v34

a336d8f21e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:16:26 +08:00
zeertzjq
92981c8e0b vim-patch:19636be: runtime(zip): refactor save and restore of options
Problem:  zip plugin has no way to set/restore option values
Solution: Add the SetSaneOpts() and RestoreOpts() functions,
          so options that cause issues are set to sane values
          and restored back to their initial values later on.
          (this affects the 'shellslash' option on windows, which also
          changes how the shellescape() function works)

19636be55e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:07:34 +08:00
zeertzjq
11c57c25ef vim-patch:33836d3: runtime(zip): remove test for fnameescape
Problem:  zip plugin tests for fnameescape() function
Solution: Remove the check, fnameescape() has been available since
          7.1.299, it should nowadays always be available

33836d38b8

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:07:07 +08:00
zeertzjq
303b3e153d vim-patch:120c0dd: runtime(zip): use :echomsg instead of :echo
Problem:  zip plugin uses :echo which does not store messages
Solution: use :echomsg instead of :echo so that messages are stored in
          the message history

120c0dd815

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:06:35 +08:00
zeertzjq
0bf9a574b5 vim-patch:a63f66e: runtime(zip): clean up and remove comments
Problem:  zip plugin contains a lot of comments from the decho plugin
Solution: Clean up and remove un-used comments

a63f66e953

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-07 07:06:03 +08:00
zeertzjq
6f5b904fb2 vim-patch:f0e9b72: runtime(zip): Fix for FreeBSD's unzip command
Problem:  Cannot browse zipfiles with the unzip program found
	  on FreeBSD.
Solution: Adjust command arguments.

Unzip found on FreeBSD complain about missing argument with the
zipinfo modifier '-Z -1'. Joining arguments seems to work
for both implementations.

Also change `:sil!` to `:sil` so that error messages are properly
reported (per review of Christian Brabandt).

related: vim/vim#15411

f0e9b72c8f

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-08-06 06:47:53 +08:00
Christian Clason
be9eaac7e8 vim-patch:c5bdd66: runtime(zip): escape '[' on Unix as well
Problem:  After 6f1cbfc9ab fnameescape()
          is no longer called on the name of the file to be extracted.
          However, while spaces indeed don't need to be escaped, unzip
          treats '[' as a wildcard character, so it need to be escaped.
Solution: Escape '[' on both MS-Windows and Unix.

From the docs it seems '*' and '?' also need escaping, but they seem to
actually work without escaping.

fixes: neovim/neovim#29977
closes: vim/vim#15427

c5bdd66558

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-08-04 18:59:38 +02:00
Christian Clason
a90b1b7c6f vim-patch:c527d90: runtime(netrw): honor g:netrw_alt{o,v} for :{S,H,V}explore
Make `:Sexplore` / `:Hexplore` / `:Vexplore` commands honor the user
`&split{right,below}` settings (or netrw-specific `g:netrw_alt{o,v}`)
instead of hardcoding a split direction. Similarly, update banged
variants of the two latter commands to follow the inverted preference.

closes: vim/vim#15417

c527d90fae

Co-authored-by: Ivan Shapovalov <intelfx@intelfx.name>
2024-08-03 00:16:09 +02:00
Christian Clason
617810d72d vim-patch:e34d0e3: runtime(netrw): removing trailing slash when copying files in same directory
closes: vim/vim#14756

e34d0e37e3

Co-authored-by: Travis Shelton <tshelton.mail@gmail.com>
2024-07-31 00:19:03 +02:00
Christian Clason
34fa34e720 vim-patch:c4be066: runtime(zip): Opening a remote zipfile don't work
Problem:  Opening a zipfile from HTTP gives an empty buffer.
Solution: Ensure that the magic bytes check does not
          skip protocol processing.

Also use readblob() and remove commented out lines.

closes: vim/vim#15396

c4be066817

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-07-31 00:18:43 +02:00
Christian Clason
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

2cad941dc0

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-07-25 10:01:35 +02:00
Christian Clason
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

38ce71c1c3

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

581d4a7b35

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-24 07:33:44 +08:00
Christian Clason
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

9d57ea5cd3

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

1cc4cae961

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

closes: vim/vim#15114

3146d63267

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
zeertzjq
295e223a28
vim-patch:62f7b55: runtime(netrw): save and restore register 0-9, a and unnamed (#29479)
fixes: vim/vim#15077

62f7b55c1a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-25 09:38:50 +08:00
zeertzjq
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 :/

52f2ff0363

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-16 05:52:13 +08:00
zeertzjq
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

1c67342912

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-16 05:51:53 +08:00
zeertzjq
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.

440746158c

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

1487947fb6

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

98b73eb645

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-04 23:15:50 +02:00
zeertzjq
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

35dfe58a54

Co-authored-by: Amelia Clarke <selene@perilune.dev>
2024-05-26 07:11:50 +08:00
Gregory Anders
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

d1d9316c66

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 Clason
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

43f2edc096

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

closes: vim/vim#14742

c16c4a21eb

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

closes: vim/vim#14739

ce2ad9ffd7

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

closes: vim/vim#14732

1e34b95e44

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

fixes: vim/vim#14400

08d2401fbc

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-04 10:29:58 +02:00
dundargoc
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 Clason
665d5d3969 vim-patch:4b715bdaf4ca
runtime(netrw): Fix typo in netrw#NetWrite (vim/vim#14283)

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

4b715bdaf4

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-24 23:00:43 +01:00
Christian Clason
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.

8fad5d5887

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-02-29 22:54:57 +01:00