jlebon / textern

A Firefox add-on for editing text in your favourite external editor!
GNU General Public License v3.0
140 stars 21 forks source link

Neovim/Vim invocation fixes #90

Open Roy-Orbison opened 10 months ago

Roy-Orbison commented 10 months ago

Add set nofixeol option command. Without it, these editors will return content with a line feed character at the end of text, when it was sent without one. Content sent with a final LF will be unaffected.

Change cursor() which works on bytes, to setcursorcharpos() which is equivalent but works correctly on multi-byte characters. Verify with the string 🌲🌲🌲⛳ in a textarea and the cursor on the green. The former function will put you in the woods.