Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

amend cursor position decrement logic & create language service command kernel test#3281

Merged
colombod merged 4 commits into
dotnet:mainfrom
cartercanedy:create-tests
Oct 19, 2023
Merged

amend cursor position decrement logic & create language service command kernel test#3281
colombod merged 4 commits into
dotnet:mainfrom
cartercanedy:create-tests

Conversation

@cartercanedy

Copy link
Copy Markdown
Contributor

Changes:

  • Refactored the logic around cursor position decrement to skip conditionals altogether if cursor position is at pos 0
  • Added a test to catch a kernel crash on submission of a language service command where the cursor position is set to 0 in a 0-length buffer

@colombod

Copy link
Copy Markdown
Member

Thank you for this contribution

@colombod
colombod merged commit 87f66a3 into dotnet:main Oct 19, 2023
@colombod colombod added the Area-Language Services IntelliSense, LSP, and related label Oct 19, 2023
@shyamnamboodiripad

Copy link
Copy Markdown
Contributor

Thanks for the contribution @cartercanedy! Could you please clarify why the test was excluded from netfx? I see that some other tests in the file were already excluded - but I don't remember why.

@cartercanedy

Copy link
Copy Markdown
Contributor Author

It looks like the test case is available for both netcore and netfx through Microsoft.DotNet.Interactive.Tests Microsoft.DotNet.Interactive.VisualStudio.Tests. The test uses a CSharpKernel nested in a CompositeKernel, which is unavailable in the latter.

@shyamnamboodiripad

Copy link
Copy Markdown
Contributor

Ah indeed - that makes sense. I was wondering if there was some other reason why the test fails on netfx. Thanks for clarifying.

@cartercanedy
cartercanedy deleted the create-tests branch February 7, 2024 14:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Area-Language Services IntelliSense, LSP, and related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants