visually select function call when navigate calltree

This commit is contained in:
Dmitry Vasilev
2023-06-11 22:25:54 +03:00
parent b9e9a4bf3e
commit a48bdd63e6
2 changed files with 29 additions and 11 deletions

View File

@@ -1861,6 +1861,18 @@ const y = x()`
}),
test('jump_calltree select callsite', () => {
const code = `
function x(y) {}
x()
`
const i = test_initial_state(code)
const call_selected = COMMANDS.calltree.arrow_right(i)
const node = call_selected.selection_state.node
assert_equal(node.index, code.indexOf('x()'))
assert_equal(node.length, 'x()'.length)
}),
// Test very specific case
test('jump_calltree_location after error', () => {
const code = `