File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
plugins/hls-code-range-plugin/src/Ide/Plugin Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,7 @@ createFoldingRange (CodeRange (Range (Position lineStart charStart) (Position li
171
171
-- because it is already single line, so omiting it.
172
172
if lineStart == lineEnd
173
173
then Nothing
174
- else case frk of
175
- Just _ -> Just (FoldingRange lineStart (Just charStart) lineEnd (Just charEnd) frk)
176
- Nothing -> Nothing
174
+ else Just (FoldingRange lineStart (Just charStart) lineEnd (Just charEnd) (Just frk))
177
175
178
176
-- | Removes all small foldings that start from the same line.
179
177
--
Original file line number Diff line number Diff line change @@ -193,9 +193,8 @@ handleError recorder action' = do
193
193
Right value -> pure $ toIdeResult (Right value)
194
194
195
195
-- | Maps type CodeRangeKind to FoldingRangeKind
196
- crkToFrk :: CodeRangeKind -> Maybe FoldingRangeKind
196
+ crkToFrk :: CodeRangeKind -> FoldingRangeKind
197
197
crkToFrk crk = case crk of
198
- CodeKindComment -> Just FoldingRangeComment
199
- CodeKindImports -> Just FoldingRangeImports
200
- CodeKindRegion -> Just FoldingRangeRegion
201
- _ -> Nothing
198
+ CodeKindComment -> FoldingRangeComment
199
+ CodeKindImports -> FoldingRangeImports
200
+ CodeKindRegion -> FoldingRangeRegion
You can’t perform that action at this time.
0 commit comments