File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
plugins/hls-eval-plugin/src/Ide/Plugin/Eval Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ import qualified Development.IDE.GHC.Compat.Core as SrcLoc (unLoc)
8585import Development.IDE.Types.HscEnvEq (HscEnvEq (hscEnv ))
8686import qualified GHC.LanguageExtensions.Type as LangExt (Extension (.. ))
8787
88+ import Data.List.Extra (unsnoc )
8889import Development.IDE.Core.FileStore (setSomethingModified )
8990import Development.IDE.Core.PluginUtils
9091import Development.IDE.Types.Shake (toKey )
@@ -317,7 +318,7 @@ finalReturn :: Text -> TextEdit
317318finalReturn txt =
318319 let ls = T. lines txt
319320 l = fromIntegral $ length ls - 1
320- c = fromIntegral $ T. length . last $ ls
321+ c = fromIntegral $ T. length $ maybe T. empty snd (unsnoc ls)
321322 p = Position l c
322323 in TextEdit (Range p p) " \n "
323324
You can’t perform that action at this time.
0 commit comments