projects
/
opengl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix VFS when receiving plain document changes (not versioned)
[opengl.git]
/
src
/
Language
/
Haskell
/
LSP
/
Test.hs
diff --git
a/src/Language/Haskell/LSP/Test.hs
b/src/Language/Haskell/LSP/Test.hs
index eb09d826a82f05d5015dfabecd5c85ce4e35cb5c..1b8c2a8c20a297af751b96497fd200700fe1b22f 100644
(file)
--- a/
src/Language/Haskell/LSP/Test.hs
+++ b/
src/Language/Haskell/LSP/Test.hs
@@
-159,14
+159,8
@@
listenServer serverOut = do
-- | The current text contents of a document.
documentContents :: TextDocumentIdentifier -> Session T.Text
documentContents doc = do
-- | The current text contents of a document.
documentContents :: TextDocumentIdentifier -> Session T.Text
documentContents doc = do
- vfs' <- vfs <$> get
- let docUri = doc ^. uri
- file <- case Map.lookup docUri vfs' of
- Just file -> return file
- Nothing -> do
- openDoc (fromJust (uriToFilePath docUri)) ""
- newVfs <- vfs <$> get
- return $ newVfs Map.! docUri
+ vfs <- vfs <$> get
+ let file = vfs Map.! (doc ^. uri)
return $ Rope.toText $ Language.Haskell.LSP.VFS._text file
-- | Parses an ApplyEditRequest, checks that it is for the passed document
return $ Rope.toText $ Language.Haskell.LSP.VFS._text file
-- | Parses an ApplyEditRequest, checks that it is for the passed document