mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Compare commits
1 Commits
marvim/ci-
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2290350177 |
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
- name: Create failed backport label
|
||||
if: ${{ steps.backport.outputs.was_successful == 'false' }}
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
|
2
.github/workflows/labeler_issue.yml
vendored
2
.github/workflows/labeler_issue.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check issue title
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const title = context.payload.issue.title;
|
||||
|
2
.github/workflows/labeler_pr.yml
vendored
2
.github/workflows/labeler_pr.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- if: startsWith(github.base_ref, 'release')
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
|
4
.github/workflows/response.yml
vendored
4
.github/workflows/response.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/close_unresponsive.js')
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/remove_response_label.js')
|
||||
|
2
.github/workflows/reviewers_add.yml
vendored
2
.github/workflows/reviewers_add.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: 'Request reviewers'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviewers_add.js')
|
||||
|
2
.github/workflows/reviewers_remove.yml
vendored
2
.github/workflows/reviewers_remove.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: 'Remove reviewers'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviewers_remove.js')
|
||||
|
@@ -2,8 +2,7 @@
|
||||
" Description: Perform Ada specific completion & tagging.
|
||||
" Language: Ada (2005)
|
||||
" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" Taylor Venable <taylor@metasyntax.net>
|
||||
" Neil Bird <neil@fnxweb.com>
|
||||
" $Author: krischik $
|
||||
@@ -20,10 +19,6 @@
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" 08.07.2007 TV fix default compiler problems.
|
||||
" 05.09.2025 do not globally set 'ignorecase'/'smartcase' option
|
||||
" set undo_ftplugin
|
||||
" mark as unmaintained
|
||||
" use buffer-local abbreviation
|
||||
" Help Page: ft-ada-plugin
|
||||
"------------------------------------------------------------------------------
|
||||
" Provides mapping overrides for tag jumping that figure out the current
|
||||
@@ -53,8 +48,8 @@ setlocal complete=.,w,b,u,t,i
|
||||
|
||||
" Section: case {{{1
|
||||
"
|
||||
" setlocal nosmartcase
|
||||
" setlocal ignorecase
|
||||
setlocal nosmartcase
|
||||
setlocal ignorecase
|
||||
|
||||
" Section: formatoptions {{{1
|
||||
"
|
||||
@@ -120,6 +115,7 @@ if !exists ("b:match_words") &&
|
||||
\ s:notend . '\<record\>:\<end\>\s\+\<record\>'
|
||||
endif
|
||||
|
||||
|
||||
" Section: Compiler {{{1
|
||||
"
|
||||
if ! exists("g:ada_default_compiler")
|
||||
@@ -152,10 +148,10 @@ endif
|
||||
" Section: Abbrev {{{1
|
||||
"
|
||||
if exists("g:ada_abbrev")
|
||||
iabbrev <buffer> ret return
|
||||
iabbrev <buffer> proc procedure
|
||||
iabbrev <buffer> pack package
|
||||
iabbrev <buffer> func function
|
||||
iabbrev ret return
|
||||
iabbrev proc procedure
|
||||
iabbrev pack package
|
||||
iabbrev func function
|
||||
endif
|
||||
|
||||
" Section: Commands, Mapping, Menus {{{1
|
||||
@@ -194,12 +190,6 @@ if !exists(':AdaTagFile')
|
||||
\ ':AdaTypes',
|
||||
\'call ada#Switch_Syntax_Option (''standard_types'')')
|
||||
endif
|
||||
"
|
||||
" Section: b:undo_ftplugin {{{1
|
||||
let b:undo_ftplugin = "setl fo< comments< tw< commentstring< complete< "
|
||||
\ . "| setl completefunc< omnifunc< ts< sts< sw< fdm< fde< fdi< "
|
||||
\ . "| setl fdm< fde< fdi< fdn< "
|
||||
\ . "| unlet! b:match_words "
|
||||
|
||||
" 1}}}
|
||||
" Reset cpoptions
|
||||
|
@@ -4,7 +4,6 @@
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Last Change: 2021 Jan 19
|
||||
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" 2025 Sep 05 by Vim Project, disable setting global ignorecase
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -58,7 +57,7 @@ if exists("loaded_matchit")
|
||||
" \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"'
|
||||
endif
|
||||
|
||||
" setlocal ignorecase
|
||||
setlocal ignorecase
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
@@ -368,16 +368,35 @@ local function trigger_event(p, event_name, kind)
|
||||
api.nvim_exec_autocmds(event_name, { pattern = p.path, data = data })
|
||||
end
|
||||
|
||||
--- @param action string
|
||||
--- @param title string
|
||||
--- @return fun(kind: 'begin'|'report'|'end', percent: integer, fmt: string, ...:any): nil
|
||||
local function new_progress_report(action)
|
||||
local progress = { kind = 'progress', title = 'vim.pack' }
|
||||
local function new_progress_report(title)
|
||||
-- TODO(echasnovski): currently print directly in command line because
|
||||
-- there is no robust built-in way of showing progress:
|
||||
-- - `vim.ui.progress()` is planned and is a good candidate to use here.
|
||||
-- - Use `'$/progress'` implementation in 'vim.pack._lsp' if there is
|
||||
-- a working built-in '$/progress' handler. Something like this:
|
||||
-- ```lua
|
||||
-- local progress_token_count = 0
|
||||
-- function M.new_progress_report(title)
|
||||
-- progress_token_count = progress_token_count + 1
|
||||
-- return vim.schedule_wrap(function(kind, msg, percent)
|
||||
-- local value = { kind = kind, message = msg, percentage = percent }
|
||||
-- dispatchers.notification(
|
||||
-- '$/progress',
|
||||
-- { token = progress_token_count, value = value }
|
||||
-- )
|
||||
-- end
|
||||
-- end
|
||||
-- ```
|
||||
-- Any of these choices is better as users can tweak how progress is shown.
|
||||
|
||||
return vim.schedule_wrap(function(kind, percent, fmt, ...)
|
||||
progress.status = kind == 'end' and 'success' or 'running'
|
||||
progress.percent = percent
|
||||
local msg = ('%s %s'):format(action, fmt:format(...))
|
||||
progress.id = api.nvim_echo({ { msg } }, kind ~= 'report', progress)
|
||||
local progress = kind == 'end' and 'done' or ('%3d%%'):format(percent)
|
||||
local details = (' %s %s'):format(title, fmt:format(...))
|
||||
local chunks = { { 'vim.pack', 'ModeMsg' }, { ': ' }, { progress, 'WarningMsg' }, { details } }
|
||||
-- TODO: need to add support for progress-messages api
|
||||
api.nvim_echo(chunks, true, {})
|
||||
-- Force redraw to show installation progress during startup
|
||||
vim.cmd.redraw({ bang = true })
|
||||
end)
|
||||
@@ -389,9 +408,9 @@ local copcall = package.loaded.jit and pcall or require('coxpcall').pcall
|
||||
--- Execute function in parallel for each non-errored plugin in the list
|
||||
--- @param plug_list vim.pack.Plug[]
|
||||
--- @param f async fun(p: vim.pack.Plug)
|
||||
--- @param progress_action string
|
||||
local function run_list(plug_list, f, progress_action)
|
||||
local report_progress = new_progress_report(progress_action)
|
||||
--- @param progress_title string
|
||||
local function run_list(plug_list, f, progress_title)
|
||||
local report_progress = new_progress_report(progress_title)
|
||||
|
||||
-- Construct array of functions to execute in parallel
|
||||
local n_finished = 0
|
||||
|
@@ -3,7 +3,6 @@
|
||||
" Maintainer: Claudio Fleiner (claudio@fleiner.com)
|
||||
" Last Change: 2022 Jun 12
|
||||
" 2025 Sep 2 by Vim project: fix a few syntax issues #18192
|
||||
" 2025 Sep 5 by Vim project: introduce m4Disabled region #18200
|
||||
|
||||
" This file will highlight user function calls if they use only
|
||||
" capital letters and have at least one argument (i.e. the '('
|
||||
@@ -25,7 +24,7 @@ endif
|
||||
" – Quotes are nestable;
|
||||
" – The delimiters can be redefined with changequote(); here we only handle
|
||||
" the default pair: ` ... ';
|
||||
" – Quoted text in M4 is rescanned, not treated as a literal string.
|
||||
" – Quoted text in M4 is rescanned, not treated as a literal string;
|
||||
" Therefore the region is marked transparent so contained items retain
|
||||
" their normal highlighting.
|
||||
syn region m4Quoted
|
||||
@@ -35,20 +34,11 @@ syn region m4Quoted
|
||||
\ contains=@m4Top
|
||||
\ transparent
|
||||
|
||||
" Comments in M4:
|
||||
" – According to the Open Group Base Specification, comments start with
|
||||
" a <number-sign> (#) and end at <newline>, unless redefined with changecom().
|
||||
" We only handle the default here.
|
||||
" – Comments in M4 are not like in most languages: they do not remove the text,
|
||||
" they simply prevent any macros from being expanded, while the text remains
|
||||
" in the output. This region therefore disables any other matches.
|
||||
" – Comments themselves are disabled when quoted.
|
||||
syn region m4Disabled start=+#+ end=+$+ containedin=ALLBUT,m4Quoted
|
||||
|
||||
" define the m4 syntax
|
||||
syn match m4Variable contained "\$\d\+"
|
||||
syn match m4Special contained "$[@*#]"
|
||||
syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors
|
||||
syn match m4Comment "#.*" contains=SpellErrors
|
||||
syn match m4Constants "\<\(m4_\)\=__file__"
|
||||
syn match m4Constants "\<\(m4_\)\=__line__"
|
||||
syn keyword m4Constants divnum sysval m4_divnum m4_sysval
|
||||
|
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2025 Sep 05
|
||||
" Last Change: 2025 Aug 23
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
" Rob B
|
||||
@@ -218,24 +218,21 @@ syn region pythonRawBytes
|
||||
|
||||
" F-string replacement fields
|
||||
"
|
||||
" - Matched parentheses, brackets and braces are skipped
|
||||
" - A bare = (followed by optional whitespace) enables debugging
|
||||
" - A bare ! prefixes a conversion field (followed by optional whitespace)
|
||||
" - Matched parentheses, brackets and braces are ignored
|
||||
" - A bare # is ignored to end of line
|
||||
" - A bare = (surrounded by optional whitespace) enables debugging
|
||||
" - A bare ! prefixes a conversion field
|
||||
" - A bare : begins a format specification
|
||||
" - Matched braces inside a format specification are skipped
|
||||
" - Matched braces inside a format specification are ignored
|
||||
"
|
||||
syn region pythonFStringField
|
||||
\ matchgroup=pythonFStringDelimiter
|
||||
\ start=/{/
|
||||
\ end=/\%(=\s*\)\=\%(!\a\s*\)\=\%(:\%({\_[^}]*}\|[^{}]*\)\+\)\=}/
|
||||
\ skip=/([^)]*)\|\[[^]]*]\|{[^}]*}\|#.*$/
|
||||
\ end=/\%(\s*=\s*\)\=\%(!\a\)\=\%(:\%({[^}]*}\|[^}]*\)\+\)\=}/
|
||||
\ contained
|
||||
\ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonType,pythonDoctest,pythonDoctestValue,@Spell
|
||||
syn match pythonFStringFieldSkip /(\_[^()]*)\|\[\_[^][]*]\|{\_[^{}]*}/
|
||||
\ contained
|
||||
\ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonType,pythonDoctest,pythonDoctestValue,@Spell
|
||||
|
||||
" Doubled braces are not replacement fields
|
||||
syn match pythonFStringSkip /{{/ transparent contained contains=NONE
|
||||
" Doubled braces and Unicode escapes are not replacement fields
|
||||
syn match pythonFStringSkip /{{\|\\N{/ transparent contained contains=NONE
|
||||
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match pythonEscape "\\\o\{1,3}" contained
|
||||
|
@@ -46,7 +46,7 @@ static const char *e_invalwindow = N_("E957: Invalid window number");
|
||||
/// Add match to the match list of window "wp".
|
||||
/// If "pat" is not NULL the pattern will be highlighted with the group "grp"
|
||||
/// with priority "prio".
|
||||
/// If "pos_list" is not NULL the list of positions defines the highlights.
|
||||
/// If "pos_list" is not NULL the list of posisions defines the highlights.
|
||||
/// Optionally, a desired ID "id" can be specified (greater than or equal to 1).
|
||||
/// If no particular ID is desired, -1 must be specified for "id".
|
||||
///
|
||||
@@ -214,7 +214,6 @@ static int match_add(win_T *wp, const char *const grp, const char *const pat, in
|
||||
return id;
|
||||
|
||||
fail:
|
||||
vim_regfree(regprog);
|
||||
xfree(m->mit_pattern);
|
||||
xfree(m->mit_pos_array);
|
||||
xfree(m);
|
||||
|
@@ -61,7 +61,7 @@ static const int included_patches[] = {
|
||||
2423,
|
||||
2422,
|
||||
2421,
|
||||
2420,
|
||||
// 2420,
|
||||
2419,
|
||||
// 2418,
|
||||
2417,
|
||||
@@ -147,7 +147,7 @@ static const int included_patches[] = {
|
||||
2337,
|
||||
2336,
|
||||
2335,
|
||||
2334,
|
||||
// 2334,
|
||||
2333,
|
||||
2332,
|
||||
2331,
|
||||
@@ -174,14 +174,14 @@ static const int included_patches[] = {
|
||||
2310,
|
||||
2309,
|
||||
2308,
|
||||
2307,
|
||||
// 2307,
|
||||
2306,
|
||||
2305,
|
||||
2304,
|
||||
2303,
|
||||
2302,
|
||||
2301,
|
||||
2300,
|
||||
// 2300,
|
||||
2299,
|
||||
2298,
|
||||
2297,
|
||||
@@ -193,9 +193,9 @@ static const int included_patches[] = {
|
||||
2291,
|
||||
2290,
|
||||
2289,
|
||||
2288,
|
||||
2287,
|
||||
2286,
|
||||
// 2288,
|
||||
// 2287,
|
||||
// 2286,
|
||||
2285,
|
||||
2284,
|
||||
2283,
|
||||
@@ -204,7 +204,7 @@ static const int included_patches[] = {
|
||||
2280,
|
||||
// 2279,
|
||||
2278,
|
||||
2277,
|
||||
// 2277,
|
||||
2276,
|
||||
2275,
|
||||
2274,
|
||||
@@ -241,7 +241,7 @@ static const int included_patches[] = {
|
||||
2243,
|
||||
2242,
|
||||
// 2241,
|
||||
2240,
|
||||
// 2240,
|
||||
2239,
|
||||
2238,
|
||||
2237,
|
||||
@@ -268,10 +268,10 @@ static const int included_patches[] = {
|
||||
2216,
|
||||
2215,
|
||||
2214,
|
||||
2213,
|
||||
// 2213,
|
||||
2212,
|
||||
2211,
|
||||
2210,
|
||||
// 2210,
|
||||
2209,
|
||||
// 2208,
|
||||
2207,
|
||||
@@ -317,7 +317,7 @@ static const int included_patches[] = {
|
||||
2167,
|
||||
2166,
|
||||
2165,
|
||||
2164,
|
||||
// 2164,
|
||||
2163,
|
||||
2162,
|
||||
2161,
|
||||
@@ -367,12 +367,12 @@ static const int included_patches[] = {
|
||||
2117,
|
||||
2116,
|
||||
2115,
|
||||
2114,
|
||||
// 2114,
|
||||
2113,
|
||||
2112,
|
||||
2111,
|
||||
2110,
|
||||
2109,
|
||||
// 2110,
|
||||
// 2109,
|
||||
2108,
|
||||
2107,
|
||||
2106,
|
||||
@@ -449,7 +449,7 @@ static const int included_patches[] = {
|
||||
2035,
|
||||
2034,
|
||||
2033,
|
||||
2032,
|
||||
// 2032,
|
||||
2031,
|
||||
2030,
|
||||
2029,
|
||||
@@ -472,7 +472,7 @@ static const int included_patches[] = {
|
||||
2012,
|
||||
2011,
|
||||
2010,
|
||||
2009,
|
||||
// 2009,
|
||||
2008,
|
||||
2007,
|
||||
2006,
|
||||
@@ -483,8 +483,8 @@ static const int included_patches[] = {
|
||||
2001,
|
||||
2000,
|
||||
// 1999,
|
||||
1998,
|
||||
1997,
|
||||
// 1998,
|
||||
// 1997,
|
||||
// 1996,
|
||||
1995,
|
||||
1994,
|
||||
@@ -518,11 +518,11 @@ static const int included_patches[] = {
|
||||
1966,
|
||||
1965,
|
||||
// 1964,
|
||||
1963,
|
||||
// 1963,
|
||||
1962,
|
||||
1961,
|
||||
1960,
|
||||
1959,
|
||||
// 1959,
|
||||
1958,
|
||||
// 1957,
|
||||
1956,
|
||||
@@ -536,7 +536,7 @@ static const int included_patches[] = {
|
||||
1948,
|
||||
1947,
|
||||
1946,
|
||||
1945,
|
||||
// 1945,
|
||||
// 1944,
|
||||
// 1943,
|
||||
1942,
|
||||
@@ -545,14 +545,14 @@ static const int included_patches[] = {
|
||||
// 1939,
|
||||
1938,
|
||||
1937,
|
||||
1936,
|
||||
// 1936,
|
||||
1935,
|
||||
1934,
|
||||
// 1934,
|
||||
1933,
|
||||
1932,
|
||||
1931,
|
||||
1930,
|
||||
1929,
|
||||
// 1929,
|
||||
// 1928,
|
||||
1927,
|
||||
1926,
|
||||
@@ -563,8 +563,8 @@ static const int included_patches[] = {
|
||||
1921,
|
||||
// 1920,
|
||||
// 1919,
|
||||
1918,
|
||||
1917,
|
||||
// 1918,
|
||||
// 1917,
|
||||
1916,
|
||||
1915,
|
||||
1914,
|
||||
@@ -574,12 +574,12 @@ static const int included_patches[] = {
|
||||
1910,
|
||||
1909,
|
||||
// 1908,
|
||||
1907,
|
||||
// 1907,
|
||||
// 1906,
|
||||
// 1905,
|
||||
// 1904,
|
||||
1903,
|
||||
1902,
|
||||
// 1902,
|
||||
1901,
|
||||
1900,
|
||||
1899,
|
||||
@@ -607,7 +607,7 @@ static const int included_patches[] = {
|
||||
1877,
|
||||
1876,
|
||||
1875,
|
||||
1874,
|
||||
// 1874,
|
||||
1873,
|
||||
1872,
|
||||
1871,
|
||||
@@ -631,12 +631,12 @@ static const int included_patches[] = {
|
||||
1853,
|
||||
1852,
|
||||
// 1851,
|
||||
1850,
|
||||
// 1850,
|
||||
1849,
|
||||
1848,
|
||||
1847,
|
||||
1846,
|
||||
1845,
|
||||
// 1845,
|
||||
1844,
|
||||
1843,
|
||||
1842,
|
||||
@@ -667,7 +667,7 @@ static const int included_patches[] = {
|
||||
1817,
|
||||
1816,
|
||||
1815,
|
||||
1814,
|
||||
// 1814,
|
||||
// 1813,
|
||||
1812,
|
||||
// 1811,
|
||||
@@ -692,28 +692,28 @@ static const int included_patches[] = {
|
||||
1792,
|
||||
1791,
|
||||
1790,
|
||||
1789,
|
||||
// 1789,
|
||||
1788,
|
||||
// 1787,
|
||||
1786,
|
||||
// 1786,
|
||||
1785,
|
||||
// 1784,
|
||||
1783,
|
||||
1782,
|
||||
1781,
|
||||
1780,
|
||||
1779,
|
||||
1778,
|
||||
// 1779,
|
||||
// 1778,
|
||||
1777,
|
||||
1776,
|
||||
1775,
|
||||
1774,
|
||||
1773,
|
||||
// 1773,
|
||||
1772,
|
||||
1771,
|
||||
// 1770,
|
||||
1769,
|
||||
1768,
|
||||
// 1768,
|
||||
1767,
|
||||
1766,
|
||||
1765,
|
||||
@@ -726,10 +726,10 @@ static const int included_patches[] = {
|
||||
1758,
|
||||
1757,
|
||||
1756,
|
||||
1755,
|
||||
1754,
|
||||
1753,
|
||||
1752,
|
||||
// 1755,
|
||||
// 1754,
|
||||
// 1753,
|
||||
// 1752,
|
||||
// 1751,
|
||||
1750,
|
||||
1749,
|
||||
@@ -748,7 +748,7 @@ static const int included_patches[] = {
|
||||
1736,
|
||||
1735,
|
||||
1734,
|
||||
1733,
|
||||
// 1733,
|
||||
1732,
|
||||
1731,
|
||||
1730,
|
||||
@@ -762,7 +762,7 @@ static const int included_patches[] = {
|
||||
1722,
|
||||
1721,
|
||||
1720,
|
||||
1719,
|
||||
// 1719,
|
||||
// 1718,
|
||||
1717,
|
||||
1716,
|
||||
@@ -772,9 +772,9 @@ static const int included_patches[] = {
|
||||
1712,
|
||||
1711,
|
||||
1710,
|
||||
1709,
|
||||
// 1709,
|
||||
1708,
|
||||
1707,
|
||||
// 1707,
|
||||
1706,
|
||||
1705,
|
||||
1704,
|
||||
@@ -803,9 +803,9 @@ static const int included_patches[] = {
|
||||
1681,
|
||||
1680,
|
||||
1679,
|
||||
1678,
|
||||
// 1678,
|
||||
1677,
|
||||
1676,
|
||||
// 1676,
|
||||
1675,
|
||||
1674,
|
||||
// 1673,
|
||||
@@ -815,8 +815,8 @@ static const int included_patches[] = {
|
||||
1669,
|
||||
1668,
|
||||
1667,
|
||||
1666,
|
||||
1665,
|
||||
// 1666,
|
||||
// 1665,
|
||||
1664,
|
||||
1663,
|
||||
1662,
|
||||
@@ -825,17 +825,17 @@ static const int included_patches[] = {
|
||||
// 1659,
|
||||
1658,
|
||||
1657,
|
||||
1656,
|
||||
// 1656,
|
||||
1655,
|
||||
1654,
|
||||
1653,
|
||||
1652,
|
||||
1651,
|
||||
1650,
|
||||
1649,
|
||||
// 1649,
|
||||
1648,
|
||||
1647,
|
||||
1646,
|
||||
// 1646,
|
||||
1645,
|
||||
1644,
|
||||
1643,
|
||||
@@ -845,7 +845,7 @@ static const int included_patches[] = {
|
||||
1639,
|
||||
1638,
|
||||
1637,
|
||||
1636,
|
||||
// 1636,
|
||||
1635,
|
||||
1634,
|
||||
1633,
|
||||
@@ -859,14 +859,14 @@ static const int included_patches[] = {
|
||||
1625,
|
||||
1624,
|
||||
1623,
|
||||
1622,
|
||||
// 1622,
|
||||
1621,
|
||||
1620,
|
||||
// 1620,
|
||||
1619,
|
||||
1618,
|
||||
1617,
|
||||
// 1617,
|
||||
1616,
|
||||
1615,
|
||||
// 1615,
|
||||
1614,
|
||||
1613,
|
||||
// 1612,
|
||||
@@ -879,13 +879,13 @@ static const int included_patches[] = {
|
||||
1605,
|
||||
1604,
|
||||
1603,
|
||||
1602,
|
||||
// 1602,
|
||||
1601,
|
||||
// 1600,
|
||||
1599,
|
||||
1598,
|
||||
// 1597,
|
||||
1596,
|
||||
// 1596,
|
||||
1595,
|
||||
1594,
|
||||
1593,
|
||||
@@ -919,7 +919,7 @@ static const int included_patches[] = {
|
||||
1565,
|
||||
1564,
|
||||
1563,
|
||||
1562,
|
||||
// 1562,
|
||||
// 1561,
|
||||
// 1560,
|
||||
// 1559,
|
||||
@@ -931,7 +931,7 @@ static const int included_patches[] = {
|
||||
// 1553,
|
||||
1552,
|
||||
1551,
|
||||
1550,
|
||||
// 1550,
|
||||
1549,
|
||||
// 1548,
|
||||
1547,
|
||||
@@ -954,7 +954,7 @@ static const int included_patches[] = {
|
||||
1530,
|
||||
1529,
|
||||
1528,
|
||||
1527,
|
||||
// 1527,
|
||||
1526,
|
||||
// 1525,
|
||||
1524,
|
||||
@@ -1398,7 +1398,7 @@ static const int included_patches[] = {
|
||||
1086,
|
||||
1085,
|
||||
1084,
|
||||
1083,
|
||||
// 1083,
|
||||
1082,
|
||||
1081,
|
||||
1080,
|
||||
|
@@ -243,55 +243,32 @@ local function find_in_log(log, event, kind, repo_name, version)
|
||||
return res
|
||||
end
|
||||
|
||||
local function track_nvim_echo()
|
||||
exec_lua(function()
|
||||
_G.echo_log = {}
|
||||
local nvim_echo_orig = vim.api.nvim_echo
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.api.nvim_echo = function(...)
|
||||
table.insert(_G.echo_log, vim.deepcopy({ ... }))
|
||||
return nvim_echo_orig(...)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function validate_progress_report(action, step_names)
|
||||
-- NOTE: Assume that `nvim_echo` mocked log has only progress report messages
|
||||
local echo_log = exec_lua('return _G.echo_log') ---@type table[]
|
||||
local function validate_progress_report(title, step_names)
|
||||
-- NOTE: Assumes that message history contains only progress report messages
|
||||
local messages = vim.split(n.exec_capture('messages'), '\n')
|
||||
local n_steps = #step_names
|
||||
eq(n_steps + 2, #echo_log)
|
||||
eq(n_steps + 2, #messages)
|
||||
|
||||
local progress = { kind = 'progress', title = 'vim.pack', status = 'running', percent = 0 }
|
||||
local init_step = { { { ('%s (0/%d)'):format(action, n_steps) } }, true, progress }
|
||||
eq(init_step, echo_log[1])
|
||||
local init_msg = ('vim.pack: 0%% %s (0/%d)'):format(title, n_steps)
|
||||
eq(init_msg, messages[1])
|
||||
|
||||
local steps_seen = {} --- @type table<string,boolean>
|
||||
for i = 1, n_steps do
|
||||
local echo_args = echo_log[i + 1]
|
||||
|
||||
local percent = math.floor(100 * i / n_steps)
|
||||
local msg = ('vim.pack: %3d%% %s (%d/%d)'):format(percent, title, i, n_steps)
|
||||
-- NOTE: There is no guaranteed order (as it is async), so check that some
|
||||
-- expected step name is used in the message
|
||||
local msg = ('%s (%d/%d)'):format(action, i, n_steps)
|
||||
-- expected step name is used
|
||||
local pattern = '^' .. vim.pesc(msg) .. ' %- (%S+)$'
|
||||
local step = echo_args[1][1][1]:match(pattern) ---@type string
|
||||
local step = messages[i + 1]:match(pattern)
|
||||
eq(true, vim.tbl_contains(step_names, step))
|
||||
steps_seen[step] = true
|
||||
|
||||
-- Should not add intermediate progress report to history
|
||||
eq(echo_args[2], false)
|
||||
|
||||
-- Should update a single message by its id (computed after first call)
|
||||
progress.id = progress.id or echo_args[3].id ---@type integer
|
||||
progress.percent = math.floor(100 * i / n_steps)
|
||||
eq(echo_args[3], progress)
|
||||
end
|
||||
|
||||
-- Should report all steps
|
||||
eq(n_steps, vim.tbl_count(steps_seen))
|
||||
|
||||
progress.percent, progress.status = 100, 'success'
|
||||
local final_step = { { { ('%s (%d/%d)'):format(action, n_steps, n_steps) } }, true, progress }
|
||||
eq(final_step, echo_log[n_steps + 2])
|
||||
local final_msg = ('vim.pack: done %s (%d/%d)'):format(title, n_steps, n_steps)
|
||||
eq(final_msg, messages[n_steps + 2])
|
||||
end
|
||||
|
||||
local function is_jit()
|
||||
@@ -454,7 +431,6 @@ describe('vim.pack', function()
|
||||
end)
|
||||
|
||||
it('shows progress report during installation', function()
|
||||
track_nvim_echo()
|
||||
exec_lua(function()
|
||||
vim.pack.add({ repos_src.basic, repos_src.defbranch })
|
||||
end)
|
||||
@@ -1104,7 +1080,6 @@ describe('vim.pack', function()
|
||||
end)
|
||||
|
||||
it('shows progress report', function()
|
||||
track_nvim_echo()
|
||||
exec_lua(function()
|
||||
vim.pack.add({ repos_src.fetch, repos_src.defbranch })
|
||||
vim.pack.update()
|
||||
@@ -1112,7 +1087,7 @@ describe('vim.pack', function()
|
||||
|
||||
-- During initial download
|
||||
validate_progress_report('Downloading updates', { 'fetch', 'defbranch' })
|
||||
exec_lua('_G.echo_log = {}')
|
||||
n.exec('messages clear')
|
||||
|
||||
-- During application (only for plugins that have updates)
|
||||
n.exec('write')
|
||||
@@ -1120,7 +1095,6 @@ describe('vim.pack', function()
|
||||
|
||||
-- During force update
|
||||
n.clear()
|
||||
track_nvim_echo()
|
||||
repo_write_file('fetch', 'lua/fetch.lua', 'return "fetch new 3"')
|
||||
git_add_commit('Commit to be added 3', 'fetch')
|
||||
|
||||
|
Reference in New Issue
Block a user