Page MenuHomePhabricator

Investigate fixing or working around non mono space chars in Ace editor
Open, MediumPublic

Description

As an alternative to replacing Ace we should investigate how difficult it would be to modify Ace to either work correctly or show some fallback behavior with sane cursor positioning.


Version: unspecified
Severity: normal
URL: https://github.com/ajaxorg/ace/issues/460

Details

Reference
bz54136

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:47 AM
bzimport added projects: CodeEditor, Upstream.
bzimport set Reference to bz54136.

It looks like Ace already has special handling for CJK ideographic characters, which in "monospace" require two characters worth of width.

I may be able to adapt this to give a funky-looking, but usable, "monospace"-like behavior for characters from complex scripts. Looking into it...

Upstream bug: https://github.com/ajaxorg/ace/issues/460 "Support varying character widths"

Another more specific upstream bug that probably will get duped to that: https://github.com/ajaxorg/ace/issues/1594 "cursor doesn't work in multibyte text"

The first bug has an old patch which might help.

The old patch is a "proper" fix that attempts to support non-monospace fonts in general. Trying to update it to current ace master.

(In reply to comment #4)
Thank you!

However, the following does not work (FF 23):

ret
urn;

Ok, looks like that may be the tab character bug mentioned on the original patch. I'll look into it...

  • Bug 54775 has been marked as a duplicate of this bug. ***

*** Bug 62095 has been marked as a duplicate of this bug. ***

Removing assignment from some tasks I'm not actively working on. Volunteers welcome, I'm happy to help if pinged!

Report from @Dixtosa that I believe is about this bug:

In this screenshot you see codeeditor's mispositioned cursor. In the textbox there are three letters (Georgian ტზე) and the cursor is supposed to be between the 2st and 3nd, but as you can see it is in the middle of the second letter.

No recent activity upstream - it looks like (IIUC) they're having problems with linewrap?

Keeping this in favour of T200741: Editing site JS results in unexpected behaviour, as it's the more technical accurate ticket.