aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml20
-rwxr-xr-x.github/workflows/env.sh2
-rw-r--r--.github/workflows/release.yml6
-rw-r--r--.gitignore3
-rw-r--r--src/nvim/CMakeLists.txt2
-rw-r--r--src/nvim/api/vim.c10
-rw-r--r--test/functional/api/vim_spec.lua38
-rw-r--r--third-party/CMakeLists.txt6
8 files changed, 65 insertions, 22 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bd90aeb932..2f2b3f102f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,7 +13,7 @@ jobs:
matrix:
include:
- flavor: asan
- cc: clang-11
+ cc: clang-12
runner: ubuntu-20.04
os: linux
- flavor: lint
@@ -38,12 +38,6 @@ jobs:
- name: Setup commom environment variables
run: ./.github/workflows/env.sh ${{ matrix.flavor }}
- - name: Setup clang repository
- if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
- run: |
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
-
- name: Install apt packages
if: matrix.os == 'linux'
run: |
@@ -52,7 +46,11 @@ jobs:
- name: Install new clang
if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
- run: sudo apt-get install -y clang-11
+ run: |
+ wget https://apt.llvm.org/llvm.sh
+ chmod a+x llvm.sh
+ sudo ./llvm.sh 12
+ rm llvm.sh
- name: Install brew packages
if: matrix.os == 'osx'
@@ -91,8 +89,8 @@ jobs:
runs-on: windows-2016
if: github.event.pull_request.draft == false
env:
- DEPS_BUILD_DIR: "C:/projects/nvim-deps"
- DEPS_PREFIX: "C:/projects/nvim-deps/usr"
+ DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
+ DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
strategy:
fail-fast: false
@@ -104,7 +102,7 @@ jobs:
- uses: actions/cache@v2
with:
- path: C:\projects\nvim-deps
+ path: ${{ env.DEPS_BUILD_DIR }}
key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }}
- name: Run CI
diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh
index cc1cef5cc4..459ed669eb 100755
--- a/.github/workflows/env.sh
+++ b/.github/workflows/env.sh
@@ -34,7 +34,7 @@ case "$FLAVOR" in
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
cat <<EOF >> "$GITHUB_ENV"
CLANG_SANITIZER=ASAN_UBSAN
-SYMBOLIZER=asan_symbolize-11
+SYMBOLIZER=asan_symbolize-12
ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan
UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan
EOF
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 43fe1d5101..e5064760d2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -110,8 +110,8 @@ jobs:
windows:
runs-on: windows-2016
env:
- DEPS_BUILD_DIR: "C:/projects/nvim-deps"
- DEPS_PREFIX: "C:/projects/nvim-deps/usr"
+ DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
+ DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
strategy:
matrix:
include:
@@ -137,6 +137,8 @@ jobs:
publish:
needs: [linux, appimage, macOS, windows]
runs-on: ubuntu-20.04
+ permissions:
+ contents: write
steps:
- uses: actions/download-artifact@v2
- if: github.event_name == 'workflow_dispatch'
diff --git a/.gitignore b/.gitignore
index 1eb382424b..c1726ede14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,3 +66,6 @@ tags
# Generated by gen_vimdoc.py:
/runtime/doc/*.mpack
/tmp-*-doc
+
+# vim patches
+/vim-*.patch
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 2c9d655a15..8b422b3abe 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -506,11 +506,9 @@ if(WIN32)
"file(MAKE_DIRECTORY \"${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms\")")
foreach(DEP_FILE IN ITEMS
ca-bundle.crt
- cat.exe
curl.exe
diff.exe
tee.exe
- tidy.exe
win32yank.exe
winpty-agent.exe
winpty.dll
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index b5e53beabe..75592ae3a7 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -104,10 +104,14 @@ String nvim_exec(String src, Boolean output, Error *err)
}
try_start();
- msg_silent++;
+ if (output) {
+ msg_silent++;
+ }
do_source_str(src.data, "nvim_exec()");
- capture_ga = save_capture_ga;
- msg_silent = save_msg_silent;
+ if (output) {
+ capture_ga = save_capture_ga;
+ msg_silent = save_msg_silent;
+ }
try_end(err);
if (ERROR_SET(err)) {
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 3db44f3f11..6926022ee3 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -193,6 +193,44 @@ describe('API', function()
eq('', nvim('exec', 'echo', true))
eq('foo 42', nvim('exec', 'echo "foo" 42', true))
end)
+
+ it('displays messages when output=false', function()
+ local screen = Screen.new(40, 8)
+ screen:attach()
+ screen:set_default_attr_ids({
+ [0] = {bold=true, foreground=Screen.colors.Blue},
+ })
+ meths.exec("echo 'hello'", false)
+ screen:expect{grid=[[
+ ^ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ hello |
+ ]]}
+ end)
+
+ it('does\'t display messages when output=true', function()
+ local screen = Screen.new(40, 8)
+ screen:attach()
+ screen:set_default_attr_ids({
+ [0] = {bold=true, foreground=Screen.colors.Blue},
+ })
+ meths.exec("echo 'hello'", true)
+ screen:expect{grid=[[
+ ^ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ |
+ ]]}
+ end)
end)
describe('nvim_command', function()
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index d0e7cdc9e3..351f517945 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -175,9 +175,9 @@ set(LUA_COMPAT53_SHA256 bec3a23114a3d9b3218038309657f0f506ad10dfbc03bb54e91da7e5
set(GPERF_URL https://github.com/neovim/deps/raw/ff5b4b18a87397a8564016071ae64f64bcd8c635/opt/gperf-3.1.tar.gz)
set(GPERF_SHA256 588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2)
-# 7za.exe cat.exe curl.exe ca-bundle.crt diff.exe tee.exe tidy.exe xxd.exe
-set(WINTOOLS_URL https://github.com/neovim/deps/raw/2f9acbecf06365c10baa3c0087f34a54c9c6f949/opt/win32tools.zip)
-set(WINTOOLS_SHA256 8bfce7e3a365721a027ce842f2ec1cf878f1726233c215c05964aac07300798c)
+# cat.exe curl.exe ca-bundle.crt diff.exe tee.exe xxd.exe
+set(WINTOOLS_URL https://github.com/neovim/deps/raw/da3520b568054ce057e6168243ff50eea223bfa0/opt/win32tools.zip)
+set(WINTOOLS_SHA256 190149d369ae1cd266bc39bceb2d1c061833a23640dfabd4089082c1a7824421)
set(WINGUI_URL https://github.com/equalsraf/neovim-qt/releases/download/v0.2.16/neovim-qt.zip)
set(WINGUI_SHA256 aad95a1f8413a9ebf36fc0298d0dfd7d786abf88cb0f4ae9f7ec895b70c7b312)