From 7315b3232ed835a50e93de084f2dd3fdb41f3109 Mon Sep 17 00:00:00 2001 From: glepnir Date: Sat, 24 Aug 2024 20:24:21 +0800 Subject: [PATCH] test(ci): change to luajit-openresty --- .github/workflows/ci.yml | 14 +++++++------- lua/indentmini/init.lua | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae7e62f..1641ee2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,14 +32,14 @@ jobs: - name: luajit uses: leafo/gh-actions-lua@v10 with: - luaVersion: "luajit-2.1.0-beta3" + luaVersion: "luajit-openresty" - name: luarocks uses: leafo/gh-actions-luarocks@v4 - # - name: run test - # shell: bash - # run: | - # luarocks install luacheck - # luarocks install vusted - # vusted ./test + - name: run test + shell: bash + run: | + luarocks install luacheck + luarocks install vusted + vusted ./test diff --git a/lua/indentmini/init.lua b/lua/indentmini/init.lua index 8dccd26..d475187 100644 --- a/lua/indentmini/init.lua +++ b/lua/indentmini/init.lua @@ -96,6 +96,7 @@ end local function out_current_range(row) return opt.only_current and cache.range_srow + and cache.range_erow and (row < cache.range_srow or row > cache.range_erow) end @@ -112,6 +113,9 @@ local function update_cache_range(currow_indent) end range_in_snapshot(cache.currow - 1, UP, range_fn) range_in_snapshot(cache.currow + 1, DOWN, range_fn) + if cache.range_srow and not cache.range_erow then + cache.range_erow = cache.count - 1 + end cache.cur_inlevel = math.floor(currow_indent / cache.step) end