Skip to content

Commit 62366c7

Browse files
fix(nightly): fix checkbox issues with nightly (#908)
1 parent 9ec211c commit 62366c7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/tests.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
version:
28-
- v0.10.0
2928
- v0.10.1
3029
- v0.10.2
3130
- v0.10.3
31+
- v0.10.4
32+
- nightly
3233
runs-on: ubuntu-latest
3334
steps:
3435
- uses: actions/checkout@v4

lua/orgmode/files/init.lua

+3
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ end
230230
function OrgFiles:get_closest_listitem()
231231
local get_listitem_node = function()
232232
local node_at_cursor = ts_utils.get_node_at_cursor()
233+
if node_at_cursor and node_at_cursor:type() == 'list' then
234+
return node_at_cursor:named_child(0)
235+
end
233236
return ts_utils.closest_node(node_at_cursor, 'listitem')
234237
end
235238

tests/plenary/utils_spec.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ describe('Util', function()
120120
local ok, err = pcall(promise.wait, promise)
121121
assert.is.False(ok)
122122
assert(err)
123-
local expected = 'E5560: Vimscript function must not be called in a lua loop callback'
124-
local msg = err:sub(#err - #expected)
123+
local expected = 'E5560: Vimscript function'
124+
local msg = err:sub(1, #expected)
125125
assert.are.equal(expected, msg)
126126
end)
127127

0 commit comments

Comments
 (0)