Fix column numbers used when highlighting :list output
authorIan Lynagh <igloo@earth.li>
Thu, 3 Dec 2009 13:03:28 +0000 (13:03 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 3 Dec 2009 13:03:28 +0000 (13:03 +0000)
ghc/InteractiveUI.hs

index b99b332..05f61d1 100644 (file)
@@ -2164,9 +2164,9 @@ listAround span do_highlight = do
   where
         file  = GHC.srcSpanFile span
         line1 = GHC.srcSpanStartLine span
-        col1  = GHC.srcSpanStartCol span
+        col1  = GHC.srcSpanStartCol span - 1
         line2 = GHC.srcSpanEndLine span
-        col2  = GHC.srcSpanEndCol span
+        col2  = GHC.srcSpanEndCol span - 1
 
         pad_before | line1 == 1 = 0
                    | otherwise  = 1