Only exclude the current command from autocompletion (#14367)
GitOrigin-RevId: 1f1dc0f2c3bcd19b12e06ec56d2d82181b0b5c6d
This commit is contained in:
+19
@@ -1064,4 +1064,23 @@ describe('autocomplete', { scrollBehavior: false }, function () {
|
||||
cy.findAllByRole('option').contains('sometext.txt').click()
|
||||
activeEditorLine().should('have.text', '\\input{sometext.txt}')
|
||||
})
|
||||
|
||||
it('excludes the current command from completions', function () {
|
||||
const scope = mockScope(mockDocContent(''))
|
||||
|
||||
cy.mount(
|
||||
<Container>
|
||||
<EditorProviders scope={scope}>
|
||||
<CodeMirrorEditor />
|
||||
</EditorProviders>
|
||||
</Container>
|
||||
)
|
||||
|
||||
cy.get('.cm-line').eq(21).type('\\fff \\ff')
|
||||
|
||||
cy.findAllByRole('listbox').should('have.length', 1)
|
||||
cy.findAllByRole('option').contains('\\fff').click()
|
||||
|
||||
cy.get('.cm-line').eq(21).should('have.text', '\\fff \\fff')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user