Skip to content

Short-circuit completion if line is NULL#703

Merged
flying-sheep merged 3 commits intoIRkernel:masterfrom
krassowski:fix-completion-exception
Jun 24, 2022
Merged

Short-circuit completion if line is NULL#703
flying-sheep merged 3 commits intoIRkernel:masterfrom
krassowski:fix-completion-exception

Conversation

@krassowski
Copy link
Contributor

Fixes #702

@krassowski krassowski force-pushed the fix-completion-exception branch from 729c9e7 to 62853bc Compare December 8, 2021 14:29
@krassowski krassowski force-pushed the fix-completion-exception branch from 62853bc to 1b56916 Compare December 8, 2021 14:29
@flying-sheep
Copy link
Member

Sorry for the enormously late reply. Wouldn’t if (is.null(line)) line <- ''work better? That way I’d assume you’d get a list of defined variables or so instead of nothing …

@krassowski
Copy link
Contributor Author

Done, though I don't think that this would be the intended course of action for most cases. Currently it predominantly arises due to a race condition after notebook having changed its structure, as in the standard notebook implementation Tab on an empty cell just gives you an indent (rather than a completion) - so returning a list of all completions did not seem important to me. But I am happy with propose solution as well (now comitted), I can see that it could be useful in certain cases.

@flying-sheep flying-sheep enabled auto-merge (squash) June 24, 2022 09:03
@flying-sheep
Copy link
Member

OK!, thank you for your PR!

@flying-sheep flying-sheep merged commit c674f3c into IRkernel:master Jun 24, 2022
@li1311139481
Copy link

hello, i'm stupid and can you tell me how to use
the "Re-assign null line to empty string" ? is run it in jupyterlab'R every time when i want use R in jupyterlab? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kernel restarting due to an exception in completions (in core R)

3 participants