aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
Commit message (Collapse)AuthorAge
* vim-patch:8750e3cf81f1 (#26163)zeertzjq2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* vim-patch:cb0c113ddc01 (#26147)zeertzjq2023-11-22
| | | | | | | | | | | | | | | | 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>
* vim-patch:67abf1592c83Christian Clason2023-11-14
| | | | | | | | runtime(tar): comment out strange error condition check https://github.com/vim/vim/commit/67abf1592c83c910c7815478f67e0a8989d51417 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:3d37231437fcChristian Clason2023-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* vim-patch:b2a4c110a5d1Christian Clason2023-11-05
| | | | | | | | | | | | | | | 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>
* vim-patch:4f174f0de90bChristian Clason2023-11-05
| | | | | | | | | | | | | 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>
* vim-patch:cd8a3eaf5348Christian Clason2023-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* vim-patch:650dcfc8d12eChristian Clason2023-10-28
| | | | | | | | runtime(netrw): don't echo empty lines (vim/vim#13431) https://github.com/vim/vim/commit/650dcfc8d12e68aa05a358301ec15f9e6dbd03ba Co-authored-by: nwounkn <nwounkn@gmail.com>
* vim-patch:dbf749bd5aae (#25665)zeertzjq2023-10-16
| | | | | | | | | | | runtime: Fix more typos (vim/vim#13354) * Fix more typos * Fix typos in ignored runtime/ directory https://github.com/vim/vim/commit/dbf749bd5aaef6ea2d28bce081349785d174d96a Co-authored-by: Viktor Szépe <viktor@szepe.net>
* vim-patch:0e958410046aChristian Clason2023-10-06
| | | | | | | | | | runtime(netrw): diff (`df`) may open the wrong window (vim/vim#13275) closes: vim/vim#11359 https://github.com/vim/vim/commit/0e958410046aa764ec73b14b1d2839053b31d242 Co-authored-by: KSR-Yasuda <31273423+KSR-Yasuda@users.noreply.github.com>
* vim-patch:f449825ae238Christian Clason2023-10-06
| | | | | | | | | | runtime(netrw): Update `.netrwbook` immediately on bookmark change (vim/vim#13276) closes: vim/vim#9738 https://github.com/vim/vim/commit/f449825ae23865437a74ea4140fd32780c02ce43 Co-authored-by: KSR-Yasuda <31273423+KSR-Yasuda@users.noreply.github.com>
* vim-patch:4dbb2669e9edChristian Clason2023-10-05
| | | | | | | | | | | runtime(netrw): error when trying to :bd unloaded buffer closes: vim/vim#13215 closes: vim/vim#13082 https://github.com/vim/vim/commit/4dbb2669e9ed9ec6864705dcb569715e417e1303 Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
* fix(clipboard): don't pass --foreground to wl-copy (#25481)zeertzjq2023-10-03
| | | Fix #25466
* refactor(tutor): cleanupJustin M. Keyes2023-09-26
|
* fix(tutor): Tutor steps don't work on Windows #25251Leonardo Mello2023-09-26
| | | | | | | | | Problem: Some steps in :Tutor don't work on Windows. Solution: Add support for `{unix:...,win:...}` format and transform the Tutor contents depending on the platform. Fix https://github.com/neovim/neovim/issues/24166
* fix(provider/pythonx): import the correct module (#25342)zeertzjq2023-09-24
|
* fix(provider): cannot detect python3.12 #25316Jongwook Choi2023-09-23
| | | | | | | | | | | | | | | | | | | PROBLEM: The builtin python3 provider cannot auto-detect python3.12 when g:python3_host_prog is not set. As a result, when python3 on $PATH is currently python 3.12, neovim will fail to load python3 provider and result in `has("python3") == 0`, e.g., "Failed to load python3 host. You can try to see what happened by ..." ROOT CAUSE: the `system()` call from `provider#pythonx#DetectByModule` does not ignore python warnings, and `pkgutil.get_loader` will print a warning message in the very first line: ``` <string>:1: DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead ``` SOLUTION: - Use `importlib.util.find_spec` instead (python >= 3.4) - Use `-W ignore` option to prevent any potential warning messages
* vim-patch:d8b86c937a41Christian Clason2023-09-17
| | | | | | | | | | | | | | runtime(netrw): fix filetype detection for remote editing files closes: vim/vim#12990 closes: vim/vim#12992 this partially reverses commit 71badf9 by commenting out the line that intentionally sets the filetype to an empty string. https://github.com/vim/vim/commit/d8b86c937a419db69239a8bb879f0050be0f8e1d Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:fc93594d562dChristian Clason2023-09-13
| | | | | | | | runtime(rust): sync rust runtime files with upstream (vim/vim#13075) https://github.com/vim/vim/commit/fc93594d562dbbd9da03c89754538f91efd0c7ca Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* vim-patch:86cfb39030ebChristian Clason2023-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(tohtml): Update TOhtml to version 9.0v2 (vim/vim#13050) Modified behavior: - Change default value of g:html_use_input_for_pc from "fallback" to "none". This means with default settings, only the standards-based method to make special text unselectable is used. The old method relying on unspecified browser behavior for <input> tags is now only used if a user specifically enables it. - Officially deprecate g:use_xhtml option (in favor of g:html_use_xhtml) by issuing a warning message when used. Bugfixes: - Fix issue vim/vim#8547: LineNr and other special highlight groups did not get proper style rules defined when using "hi link". - Fix that diff filler was not properly added for deleted lines at the end of a buffer. Other: - Refactored function definitions from long lists of strings to use :let-heredoc variable assignment instead. - Corrected deprecated "." string concatenation operator to ".." operator in more places. https://github.com/vim/vim/commit/86cfb39030eb557e1a1c7804f9c147556ca5dbf1 Co-authored-by: fritzophrenic <fritzophrenic@gmail.com>
* vim-patch:67c951df4c95Christian Clason2023-09-07
| | | | | | | | | | | | | | | | | runtime(ftplugin): allow to exec if curdir is in PATH In case the current directory is present as valid $PATH entry, it is OK to call the program from it, even if vim curdir is in that same directory. (Without that patch, for instance, you will not be able to open .zip files while your current directory is /bin) closes: vim/vim#13027 https://github.com/vim/vim/commit/67c951df4c95981c716eeedb1b102d9668549e65 Co-authored-by: Anton Sharonov <anton.sharonov@gmail.com>
* vim-patch:9.0.1833: [security] runtime file fixes (#24969)zeertzjq2023-09-01
| | | | | | | | | | | | | | | | | | | | | | Problem: runtime files may execute code in current dir Solution: only execute, if not run from current directory The perl, zig and ruby filetype plugins and the zip and gzip autoload plugins may try to load malicious executable files from the current working directory. This is especially a problem on windows, where the current directory is implicitly in your $PATH and windows may even run a file with the extension `.bat` because of $PATHEXT. So make sure that we are not trying to execute a file from the current directory. If this would be the case, error out (for the zip and gzip) plugins or silently do not run those commands (for the ftplugins). This assumes, that only the current working directory is bad. For all other directories, it is assumed that those directories were intentionally set to the $PATH by the user. https://github.com/vim/vim/commit/816fbcc262687b81fc46f82f7bbeb1453addfe0c Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(runtime/tutor): don't try to close fold when there is none (#24953)David Moberg2023-08-31
| | | | | | Problem: When double clicking a line starting with a #, the code assumes there is a fold there and tries to close it, resulting in an error if there isn't a fold. Solution: Check foldlevel before performing "zc".
* vim-patch:a0fddaa2f4b7Christian Clason2023-08-21
| | | | | | | | | | Runtime(javascript): add new document properties to completion file closes: vim/vim#6536 https://github.com/vim/vim/commit/a0fddaa2f4b7358484eb54ccdd1b7433d18a9039 Co-authored-by: Jay Sitter <jay@diameterstudios.com>
* vim-patch:e978b4534a5e (#24697)Sean Dewar2023-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Farewell to Bram and dedicate upcoming Vim 9.1 to him (vim/vim#12749) https://github.com/vim/vim/commit/e978b4534a5e10471108259118c0ef791106fd92 Also update the header for the following files that were converted to Vim9 script upstream: - autoload/ccomplete.lua (vim9jitted) - ftplugin.vim - ftplugof.vim - indent.vim - indent/vim.vim - makemenu.vim This also updates the "Last Change" dates, even if some changes (due to rewrites to Vim9 script) were not ported. There's still a few other places where Bram is still mentioned as a maintainer in the files we and Vim have: - ftplugin/bash.vim - indent/bash.vim - indent/html.vim - indent/mail.vim - macros/accents.vim - macros/editexisting.vim - syntax/bash.vim - syntax/shared/typescriptcommon.vim - syntax/tar.vim - syntax/typescript.vim - syntax/typescriptreact.vim - syntax/zimbu.vim Maybe future patches will address that. Also exclude changes to .po files that didn't apply automatically (the `:messages` maintainer string isn't used in Nvim anyway). Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:21aaff3faa82Christian Clason2023-08-11
| | | | | | | | Update my name and email in runtime files (vim/vim#12763) https://github.com/vim/vim/commit/21aaff3faa828c5c2677a0a9f1b90a0b780d57f6 Co-authored-by: Lily Ballard <lily@ballards.net>
* fix(clipboard): ignore exit caused by signal #23378Kai Ting2023-07-16
| | | | | | | | | | | | | Problem: If clipboard job exits by signal, the exit code is >=128: https://github.com/neovim/neovim/commit/939d9053bdf2f56286640c581eb4e2ff5a856540 xclip 0.13 often exits with code 143, which spams unhelpful messages: clipboard: error invoking xclip: Waiting for selection requests, Control-C to quit Waiting for selection request number 1 Solution: Don't show a warning if the clipboard tool exit code is >=128. Fixes: #7054
* feat(defaults): set g:netrw_use_errorwindow = 0 #24179Frede2023-06-29
| | | | | | | Problem: netrw uses a bespoke window to show messages. Solution: change the default so that netrw uses normal vim :echoerr
* fix(messages): use "Vimscript" instead of "VimL" #24111Justin M. Keyes2023-06-22
| | | | followup to #24109 fix #16150
* vim-patch:b7398fe41c9e (#23627)Christian Clason2023-05-15
| | | | | | | Update runtime files https://github.com/vim/vim/commit/b7398fe41c9e1e731d058105a34158871ee83e3f Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:71badf9547e8 (#23285)Christian Clason2023-04-23
| | | | | | | Update runtime files https://github.com/vim/vim/commit/71badf9547e8f89571b9a095183671cbb333d528 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(checkhealth): fix crash due to incorrect argument typedundargoc2023-04-16
|
* refactor: deprecate checkhealth functionsdundargoc2023-04-15
| | | | | | | | | | | | | | | | | | | | | | | The following functions are deprecated and will be removed in Nvim v0.11: - health#report_start() - health#report_info() - health#report_ok() - health#report_warn() - health#report_error() - vim.health.report_start() - vim.health.report_info() - vim.health.report_ok() - vim.health.report_warn() - vim.health.report_error() Users should instead use these: - vim.health.start() - vim.health.info() - vim.health.ok() - vim.health.warn() - vim.health.error()
* feat!: remove vimballs (#22402)dundargoc2023-04-11
| | | | | | | | Vimball is an outdated feature that is rarely used these days. It is not a maintenance burden on its own, but it is nonetheless dead weight and something we'd need to tell users to ignore when they inevitably ask what it is. See: https://github.com/neovim/neovim/pull/21369#issuecomment-1347615173
* refactor: rewrite perl healthcheck in luadundargoc2023-04-10
| | | This is required to remove the vimscript checkhealth functions.
* refactor: rewrite node healthcheck in luadundargoc2023-04-10
| | | This is required to remove the vimscript checkhealth functions.
* refactor: rewrite ruby healthcheck in luadundargoc2023-04-10
| | | This is required to remove the vimscript checkhealth functions.
* refactor: rewrite virtualenv healthcheck in luadundargoc2023-04-10
| | | This is required to remove the vimscript checkhealth functions.
* refactor: rewrite python provider healthcheck in Luadundargoc2023-04-09
| | | This is required to remove the vimscript checkhealth functions.
* refactor: rewrite clipboard provider healthchecks in Luadundargoc2023-04-09
| | | This is required to remove the vimscript checkhealth functions.
* docs: fix typosdundargoc2023-04-04
| | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com> Co-authored-by: himanoa <matsunoappy@gmail.com>
* feat(vim.version): more coercion with strict=falseJustin M. Keyes2023-03-20
| | | | | | | | | | | | | Problem: "tmux 3.2a" (output from "tmux -V") is not parsed easily. Solution: With `strict=false`, discard everything before the first digit. - rename Semver => Version - rename vim.version.version() => vim.version._version() - rename matches() => has() - remove `opts` from cmp()
* refactor(runtime): use vim.version to compare versions #22550Justin M. Keyes2023-03-07
| | | | | | | TODO: Unfortunately, cannot (yet) use vim.version for tmux version comparison, because `vim.version.parse(…,{strict=false})` does not coerce tmux's funny "tmux 3.3a" version string. https://github.com/neovim/neovim/blob/6969d3d7491fc2f10d80309b26dd0c26d211b1b3/runtime/autoload/provider/clipboard.vim#L148
* vim-patch:partial:dd60c365cd26 (#22437)Christian Clason2023-02-28
| | | | | | | | | | | vim-patch:partial:dd60c365cd26 Update runtime files https://github.com/vim/vim/commit/dd60c365cd2630794be84d63c4fe287124a30b97 Co-authored-by: Bram Moolenaar <Bram@vim.org> Skip: eval.txt, repeat.txt (needs `getscriptinfo()`)
* vim-patch:be4e01637e71 (#22103)Christian Clason2023-02-03
| | | | | | | Update runtime files. https://github.com/vim/vim/commit/be4e01637e71c8d5095c33b9861fd70b41476732 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* dist: generated version of ccomplete.vim (#21623)TJ DeVries2023-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first PR featuring a conversion of an upstream vim9script file into a Lua file. The generated file can be found in `runtime/autoload/ccomplete.vim` in the vim repository. Below is a limited history of the changes of that file at the time of conversion. ``` ❯ git log --format=oneline runtime/autoload/ccomplete.vim c4573eb12dba6a062af28ee0b8938d1521934ce4 Update runtime files a4d131d11052cafcc5baad2273ef48e0dd4d09c5 Update runtime files 4466ad6baa22485abb1147aca3340cced4778a66 Update runtime files d1caa941d876181aae0ebebc6ea954045bf0da24 Update runtime files 20aac6c1126988339611576d425965a25a777658 Update runtime files. 30b658179962cc3c9f0a98f071b36b09a36c2b94 Updated runtime files. b6b046b281fac168a78b3eafdea9274bef06882f Updated runtime files. 00a927d62b68a3523cb1c4f9aa3f7683345c8182 Updated runtime files. 8c8de839325eda0bed68917d18179d2003b344d1 (tag: v7.2a) updated for version 7.2a ... ``` The file runtime/lua/_vim9script.lua only needs to be updated when vim9jit is updated (for any bug fixes or new features, like implementing class and interface, the latest in vim9script). Further PRs will improve the DX of generated the converted lua and tracking which files in the neovim's code base have been generated.
* feat!: remove hardcopyLewis Russell2023-01-03
| | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:86b4816766d9 (#21314)Christian Clason2022-12-08
| | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/86b4816766d976a7ecd4403eca1f8bf6b4105800 vim-patch:9.0.1029: autoload directory missing from distribution Problem: Autoload directory missing from distribution. Solution: Add the autoload/zig directory to the list of distributed files. https://github.com/vim/vim/commit/84dbf855fb2d883481f74ad0ccf3df3f8837e6bf Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(provider): add support for Yarn node modules on Windows (#21246)Charles Nguyen2022-12-01
|
* feat(clipboard): added wayclip support (#21091)XDream82022-11-18
|