acode-plugin-prettier icon indicating copy to clipboard operation
acode-plugin-prettier copied to clipboard

Jumping Cursor

Open de-facto opened this issue 1 year ago • 1 comments

Hi, I'm scripting with JavaScript using Acode Version 1.8.1 (274). I find that Prettier jumps to a line of code above the line that was edited, or may move back to its starting position on a line, after the same line has been edited, or is in the process of being edited.

Editor set to, Format on save Formatter - Prettier

Editing a functioning script tag: place cursor a third of the way into a line of code; add an attribute, say crossorigin="anonymous" at the end of the opening tag; if one is able to complete the edit, the cursor will jump back to its starting position, or it might jump up one line.

Investigating further, breaking Prettier formatting rule by further indenting a function block, using SHFT-DWN to select the block; this would leave the cursor at the bottom of the block, at the end of the closing brace. After Prettier has taken effect, the cursor jumps up a line, or as in my last test, two lines.

Other issues: • Prettier does not automatically register changes made to the editor (increasing autosave time). • Prettier does not always format a .js file using Format from the Edit Menu, even though Formatter selection is set.

de-facto avatar Apr 19 '23 03:04 de-facto

Thanks for suggestion. I'll look into it.

deadlyjack avatar Apr 23 '23 09:04 deadlyjack