defunkt / coffee-mode

Emacs Major Mode for CoffeeScript
http://ozmm.org/posts/coffee_mode.html
574 stars 147 forks source link

coffee-newline-and-indent modifies long lines #341

Closed taylorzane closed 8 years ago

taylorzane commented 8 years ago

When pressing return/enter on a long line, the line is automatically modified to some pseudo-unpredictable format.

Example:

funReallyLongFunctionNameThatShouldBreakCoffeeMode = (a, b, c, d, e, f, g, h, u, j, k, l) ->

With cursor at the end of the line (C-e), pressing return/enter yields this:

funReallyLongFunctionNameThatShouldBreakCoffeeMode = (a, b, c, d, e,
f, g, h, u, j, k, l) ->

I'm unsure what the process is behind determining what line needs highlighting and what doesn't.

I would just like an easy way to disable this feature/bug while still being able to use the "newline then indent" feature.

syohex commented 8 years ago

I have fixed at #342. Please check latest version.

taylorzane commented 8 years ago

Thanks @syohex! That worked perfectly.