antonmedv/codejar

Cursor position wrong after (1) CTRL+A and (2) `"` character is entered

czosel opened this issue ยท 3 comments

Hi @antonmedv

First of all, thanks for your work on codejar! ๐Ÿ™‚

I noticed the following issue with the cursor position: When the editor content is selected with CTRL+A and after the " character is entered, the cursor is placed at behind the two "" characters instead of the middle. This seems to happen no matter what the input is, except when it is already "" before - then the cursor is placed before the two "" characters.

When I select the entire content of the file using my mouse or SHIFT + arrow keys, the issue doesn't appear: The cursor is placed correctly between the two "" caracters.

I was able to reproduce the issue in both Firefox and Chromium.

I think I know what is causing it.

Done! Now CodeJar will wrap such code (as other editors do).

The wrapping works great - thank you so much! ๐Ÿ’ฏ