Skip to content

Commit f51d4e8

Browse files
committed
Ormolu RegionIndices should be 1-based
1 parent 679e0ec commit f51d4e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ide/Plugin/Ormolu.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ provider _lf ideState typ contents fp _ = do
5757

5858
let
5959
fullRegion = RegionIndices Nothing Nothing
60-
rangeRegion s e = RegionIndices (Just s) (Just e)
60+
rangeRegion s e = RegionIndices (Just $ s + 1) (Just $ e + 1)
6161
mkConf o region = defaultConfig { cfgDynOptions = o, cfgRegion = region }
6262
fmt :: T.Text -> Config RegionIndices -> IO (Either OrmoluException T.Text)
6363
fmt cont conf =

0 commit comments

Comments
 (0)