Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot committed Jan 24, 2020
1 parent 5da9daa commit 8ee2f4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Migrate_ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ module Location = struct
Comparable.lexicographic [compare_start; descending compare_end; compare]

let is_single_line x margin =
(* The last character of a line can exceed the margin if it is not
preceded by a break. Adding 1 here is a workaround for this bug. *)
width x <= margin + 1 && x.loc_start.pos_lnum = x.loc_end.pos_lnum

let smallest loc stack =
Expand Down

0 comments on commit 8ee2f4e

Please sign in to comment.