Skip to content

Commit

Permalink
Merge pull request #2162 from mauricioszabo/remove-version-detect
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Jan 10, 2023
2 parents 0408e10 + fa86d2e commit e081319
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,12 @@ export function rowRangeForCodeFoldAtBufferRow(
editor: TextEditor,
row: number
) {
if (parseFloat(atom.getVersion()) < 1.22) {
return editor.languageMode.rowRangeForCodeFoldAtBufferRow(row);
} else {
// $FlowFixMe
const range = editor.tokenizedBuffer.getFoldableRangeContainingPoint(
new Point(row, Infinity),
editor.getTabLength()
);
return range ? [range.start.row, range.end.row] : null;
}
// $FlowFixMe
const range = editor.tokenizedBuffer.getFoldableRangeContainingPoint(
new Point(row, Infinity),
editor.getTabLength()
);
return range ? [range.start.row, range.end.row] : null;
}
export const EmptyMessage = () => {
return (
Expand Down

0 comments on commit e081319

Please sign in to comment.