learn-ocaml
learn-ocaml copied to clipboard
Unexpected editing behaviour on "struct" keyword
trafficstars
On v. 0.12 the editor cut the struct keyword into stru and ct, concatenated with the next word.
It still works if we replace the end keyword of my examples by anything.
It doesn't work if it's the first or the last token (nothing else than blank before or after), and in some other cases like on my third example.
- Press Enter in the place of the symbol
Ø:module Mod = structØ endmodule Mod = stru ctend - Press the spacebar selecting the newline after
struct:module Mod = struct¶ endmodule Mod = stru ctend - In this configuration the bug doesn't occur:
let f = function | [] -> struct end | a::b -> g
Looks like the automatic reindentation taking place at the wrong time, and messing up the cursor position before the character is inserted. It might be a bug in the indentation code or in Ace itself.