Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle content when it's an empty string #1100

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,13 @@ type FSharpLspServer(state: State, lspClient: FSharpLspClient) =
match change.Range with
| None -> // replace entire content
NamedText(filePath, change.Text)
| Some rangeToReplace when
rangeToReplace.Start.Line = 0
&& rangeToReplace.Start.Character = 0
&& rangeToReplace.End.Line = 0
&& rangeToReplace.End.Character = 0
->
NamedText(filePath, change.Text)
| Some rangeToReplace ->
// replace just this slice
let fcsRangeToReplace = protocolRangeToRange (UMX.untag filePath) rangeToReplace
Expand Down