From 7af6e753ff252f096ce157db642fe3eedcf3fc59 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Wed, 23 Sep 2020 21:27:16 +0100 Subject: [PATCH] Fix uris in workspace edit --- plugins/default/src/Ide/Plugin/Retrie.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/default/src/Ide/Plugin/Retrie.hs b/plugins/default/src/Ide/Plugin/Retrie.hs index 9e62335aa6..6ee0cda7e5 100644 --- a/plugins/default/src/Ide/Plugin/Retrie.hs +++ b/plugins/default/src/Ide/Plugin/Retrie.hs @@ -468,10 +468,10 @@ asEditMap = coerce . HM.fromListWith (++) . concatMap (map (second pure)) asTextEdits :: Change -> [(Uri, TextEdit)] asTextEdits NoChange = [] asTextEdits (Change reps _imports) = - [ (Uri spanLoc, edit) + [ (filePathToUri spanLoc, edit) | Replacement {..} <- nubOrdOn replLocation reps, (RealSrcSpan rspan) <- [replLocation], - let spanLoc = T.pack $ unpackFS $ srcSpanFile rspan, + let spanLoc = unpackFS $ srcSpanFile rspan, let edit = TextEdit (realSrcSpanToRange rspan) (T.pack replReplacement) ]