OCamlPro / ocp-indent

Indentation tool for OCaml, to be used from editors like Emacs and Vim.
http://www.typerex.org/ocp-indent.html
Other
200 stars 63 forks source link

--lines doesn't respect the indentation of 1st line after #291

Closed aecepoglu closed 1 year ago

aecepoglu commented 5 years ago

Given test.ml

let f1 x =
  let y = 4 in
x + y

cat test.ml | tail -2 | ocp-indent --config="in=3" --lines=2- should output

  let y = 4 in
     x + y

But it produces:

  let y = 4 in
   x + y

When --lines statement is given, shouldn't (x + y) line be indented with respect to let y = 4 ?


For reference:

cat test.ml | ocp-indent --config="in=3" outputs following correctly :heavy_check_mark:

let f1 x =
  let y = 4 in
     x + y