mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-14 05:14:28 -08:00
fix calltree nav
This commit is contained in:
@@ -339,7 +339,11 @@ const arrow_down = state => {
|
||||
}
|
||||
|
||||
if(next_node?.id == 'async_calls') {
|
||||
next_node = next_node.children[0]
|
||||
if(next_node.children == null) {
|
||||
next_node = null
|
||||
} else {
|
||||
next_node = next_node.children[0]
|
||||
}
|
||||
}
|
||||
|
||||
return next_node == null
|
||||
|
||||
@@ -2363,6 +2363,15 @@ const y = x()`
|
||||
|
||||
const {state: i, on_async_call} = test_async_calls_state(code)
|
||||
|
||||
// When there are no async calls, and we press arrow down, nothing should
|
||||
// happen
|
||||
const no_async_down =
|
||||
COMMANDS.calltree.arrow_down(
|
||||
COMMANDS.calltree.arrow_down(i).state
|
||||
)
|
||||
|
||||
assert_equal(no_async_down.current_calltree_node.fn.name, 'normal_call')
|
||||
|
||||
const after_async_calls = [1, 2, 3].reduce(
|
||||
(s, a) => {
|
||||
// Make async calls
|
||||
|
||||
Reference in New Issue
Block a user