diff options
-rw-r--r-- | .github/scripts/reviews.js (renamed from ci/reviews.js) | 0 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 6 | ||||
-rw-r--r-- | .github/workflows/labeler.yml | 2 | ||||
-rw-r--r-- | .github/workflows/reviews.yml | 2 | ||||
-rw-r--r-- | runtime/filetype.vim | 7 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | src/nvim/highlight.c | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 1 | ||||
-rw-r--r-- | test/functional/api/highlight_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/api/server_requests_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/core/job_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/ex_cmds/ctrl_c_spec.lua | 3 | ||||
-rw-r--r-- | test/helpers.lua | 6 |
13 files changed, 23 insertions, 27 deletions
diff --git a/ci/reviews.js b/.github/scripts/reviews.js index 25ef08be36..25ef08be36 100644 --- a/ci/reviews.js +++ b/.github/scripts/reviews.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c84c9f0bbd..aa77689d9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,7 @@ jobs: - name: Install apt packages run: | sudo apt-get update - sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip flake8 - - - name: Setup interpreter packages - run: | - ./ci/install.sh + sudo apt-get install -y autoconf automake build-essential ccache cmake gettext gperf libtool-bin locales ninja-build pkg-config flake8 - name: Cache dependencies uses: actions/cache@v2 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index d16b382ca7..e252906cb4 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -38,7 +38,7 @@ jobs: permissions: pull-requests: write steps: - - run: wget https://raw.githubusercontent.com/neovim/neovim/master/ci/reviews.js + - run: wget https://raw.githubusercontent.com/neovim/neovim/master/.github/scripts/reviews.js - name: 'Request reviewers' uses: actions/github-script@v6 with: diff --git a/.github/workflows/reviews.yml b/.github/workflows/reviews.yml index 2da7365821..5731ab9be8 100644 --- a/.github/workflows/reviews.yml +++ b/.github/workflows/reviews.yml @@ -9,7 +9,7 @@ jobs: permissions: pull-requests: write steps: - - run: wget https://raw.githubusercontent.com/neovim/neovim/master/ci/reviews.js + - run: wget https://raw.githubusercontent.com/neovim/neovim/master/.github/scripts/reviews.js - name: 'Request reviewers' uses: actions/github-script@v6 with: diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 35f4b25120..60be03d708 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -44,7 +44,7 @@ endif " file name matches ft_ignore_pat. " When using this, the entry should probably be further down below with the " other StarSetf() calls. -func! s:StarSetf(ft) +func s:StarSetf(ft) if expand("<amatch>") !~ g:ft_ignore_pat exe 'setf ' . a:ft endif @@ -225,6 +225,9 @@ au BufNewFile,BufRead *.bib setf bib " BibTeX Bibliography Style au BufNewFile,BufRead *.bst setf bst +" Bicep +au BufNewFile,BufRead *.bicep setf bicep + " BIND configuration " sudoedit uses namedXXXX.conf au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named @@ -2517,7 +2520,7 @@ endif " Function called for testing all functions defined here. These are " script-local, thus need to be executed here. " Returns a string with error messages (hopefully empty). -func! TestFiletypeFuncs(testlist) +func TestFiletypeFuncs(testlist) let output = '' for f in a:testlist try diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 2fe4aa3d32..399e1c7f60 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -65,6 +65,7 @@ local extension = { bdf = "bdf", beancount = "beancount", bib = "bib", + bicep = "bicep", bl = "blank", bsdl = "bsdl", bst = "bst", diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index e8a22ce6a8..8b998ff62e 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -876,6 +876,10 @@ HlAttrs dict2hlattrs(Dict(highlight) *dict, bool use_rgb, int *link_id, Error *e CHECK_FLAG(cterm, cterm_mask, strikethrough, , HL_STRIKETHROUGH); CHECK_FLAG(cterm, cterm_mask, nocombine, , HL_NOCOMBINE); + } else if (dict->cterm.type == kObjectTypeArray && dict->cterm.data.array.size == 0) { + // empty list from Lua API should clear all cterm attributes + // TODO(clason): handle via gen_api_dispatch + cterm_mask_provided = true; } else if (HAS_KEY(dict->cterm)) { api_set_error(err, kErrorTypeValidation, "'cterm' must be a Dictionary."); } diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index b663032c24..dd14aa3e6f 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -81,6 +81,7 @@ let s:filename_checks = { \ 'bc': ['file.bc'], \ 'bdf': ['file.bdf'], \ 'bib': ['file.bib'], + \ 'bicep': ['file.bicep'], \ 'beancount': ['file.beancount'], \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'], \ 'blank': ['file.bl'], diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua index 416945f379..03b407f4e0 100644 --- a/test/functional/api/highlight_spec.lua +++ b/test/functional/api/highlight_spec.lua @@ -242,6 +242,12 @@ describe("API: set highlight", function() eq(highlight2_result, meths.get_hl_by_name('Test_hl', false)) end) + it ("can set emtpy cterm attr", function() + local ns = get_ns() + meths.set_hl(ns, 'Test_hl', { cterm = {} }) + eq({}, meths.get_hl_by_name('Test_hl', false)) + end) + it ("cterm attr defaults to gui attr", function() local ns = get_ns() meths.set_hl(ns, 'Test_hl', highlight1) diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua index 309d9084c8..cdcf08c348 100644 --- a/test/functional/api/server_requests_spec.lua +++ b/test/functional/api/server_requests_spec.lua @@ -181,12 +181,6 @@ describe('server -> client', function() end) describe('recursive (child) nvim client', function() - if helpers.isCI('travis') and helpers.is_os('mac') then - -- XXX: Hangs Travis macOS since e9061117a5b8f195c3f26a5cb94e18ddd7752d86. - pending("[Hangs on Travis macOS. #5002]", function() end) - return - end - before_each(function() command("let vim = rpcstart('"..nvim_prog.."', ['-u', 'NONE', '-i', 'NONE', '--cmd', 'set noswapfile', '--embed', '--headless'])") neq(0, eval('vim')) diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 5e127bce26..0a69660871 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -295,12 +295,6 @@ describe('jobs', function() end) it("will not buffer data if it doesn't end in newlines", function() - if helpers.isCI('travis') and os.getenv('CC') == 'gcc-4.9' - and helpers.is_os('mac') then - -- XXX: Hangs Travis macOS since e9061117a5b8f195c3f26a5cb94e18ddd7752d86. - pending("[Hangs on Travis macOS. #5002]") - end - nvim('command', "let j = jobstart(['cat', '-'], g:job_opts)") nvim('command', 'call jobsend(j, "abc\\nxyz")') eq({'notification', 'stdout', {0, {'abc', 'xyz'}}}, next_msg()) diff --git a/test/functional/ex_cmds/ctrl_c_spec.lua b/test/functional/ex_cmds/ctrl_c_spec.lua index f65d9f0d01..f19fab5550 100644 --- a/test/functional/ex_cmds/ctrl_c_spec.lua +++ b/test/functional/ex_cmds/ctrl_c_spec.lua @@ -10,8 +10,7 @@ describe("CTRL-C (mapped)", function() it("interrupts :global", function() -- Crashes luajit. - if helpers.skip_fragile(pending, - helpers.isCI('travis') or helpers.isCI('appveyor')) then + if helpers.skip_fragile(pending) then return end diff --git a/test/helpers.lua b/test/helpers.lua index 522714c8be..333e98d495 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -801,12 +801,10 @@ end function module.isCI(name) local any = (name == nil) - assert(any or name == 'appveyor' or name == 'travis' or name == 'sourcehut' or name == 'github') - local av = ((any or name == 'appveyor') and nil ~= os.getenv('APPVEYOR')) - local tr = ((any or name == 'travis') and nil ~= os.getenv('TRAVIS')) + assert(any or name == 'sourcehut' or name == 'github') local sh = ((any or name == 'sourcehut') and nil ~= os.getenv('SOURCEHUT')) local gh = ((any or name == 'github') and nil ~= os.getenv('GITHUB_ACTIONS')) - return tr or av or sh or gh + return sh or gh end |