Skip to content

Commit c7e05f7

Browse files
committed
Fix order
1 parent b440621 commit c7e05f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ghcide/src/Development/IDE/Plugin/CodeAction.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ suggestNewImport packageExportsMap ps@(L _ HsModule {..}) Diagnostic{_message}
11861186
, Just (range, indent) <- newImportInsertRange ps
11871187
, extendImportSuggestions <- matchRegexUnifySpaces msg
11881188
"Perhaps you want to add ‘[^’]*’ to the import list in the import of ‘([^’]*)’"
1189-
= [(imp, TextEdit range (imp <> "\n" <> T.replicate indent " "))
1189+
= sortOn fst [(imp, TextEdit range (imp <> "\n" <> T.replicate indent " "))
11901190
| (unNewImport -> imp) <- constructNewImportSuggestions packageExportsMap (qual <|> qual', thingMissing) extendImportSuggestions
11911191
]
11921192
suggestNewImport _ _ _ = []

0 commit comments

Comments
 (0)