fix calltree nav

This commit is contained in:
Dmitry Vasilev
2022-11-29 04:46:26 +08:00
parent 6ea107d057
commit 75088bc3f5
2 changed files with 14 additions and 1 deletions

View File

@@ -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

View File

@@ -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