Skip to content

Commit

Permalink
handle content when it's an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
augustfengd committed Apr 12, 2023
1 parent 37648cb commit 19c74a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,9 @@ 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

0 comments on commit 19c74a2

Please sign in to comment.