idris-hackers / idris-vim

Idris mode for vim
221 stars 52 forks source link

Doc comments are not formatted correctly #65

Open stephen-smith opened 7 years ago

stephen-smith commented 7 years ago

When trying to use :'<,'>gq to wrap doc comments (||| leader) the comment leader is not created on new lines, and may actually be treated as a word and joined into a previous, short line.

In addition, when pressing <Enter> in insert mode when inside a doc comment, the comment lead isn't inserted.

This seems related to e8563c43d5709436f88bcb2cd263b89f8aa66dee which overwrites comments and formatoptions that are set in the main ftplugin/idris.vim with clearly inferior versions. But, based on the commit message was meant to help limit the surface area of a security issue.

case Has the underlying security issue been addressed completely? Yes good -> Would a patch removing comments and formatoptions from the after script be accepted? No still_vulnerable -> Anyone have a sketch of what needs to change to address the vulnerability? Do we need more shellescape calls somewhere? <|> Left (still_vulnerable ?exploit)

@raichoo

stephen-smith commented 7 years ago

4702dd347d1a2c1552ce91494d76931ce9f05039 is the fix I am proposing; works for me.