Last modified: 2014-03-01 14:34:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56136, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54136 - Investigate fixing or working around non mono space chars in Ace editor
Investigate fixing or working around non mono space chars in Ace editor
Status: ASSIGNED
Product: MediaWiki extensions
Classification: Unclassified
CodeEditor (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brion Vibber
https://github.com/ajaxorg/ace/issues...
: upstream
: 54775 62095 (view as bug list)
Depends on:
Blocks: 55421
  Show dependency treegraph
 
Reported: 2013-09-14 21:24 UTC by Brion Vibber
Modified: 2014-03-01 14:34 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2013-09-14 21:24:00 UTC
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.
Comment 1 Brion Vibber 2013-09-15 17:31:49 UTC
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...
Comment 2 Brion Vibber 2013-09-15 17:38:08 UTC
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.
Comment 3 Brion Vibber 2013-09-15 19:39:45 UTC
The old patch is a "proper" fix that attempts to support non-monospace fonts in general. Trying to update it to current ace master.
Comment 4 Brion Vibber 2013-09-15 20:03:01 UTC
... so far so good, seems to be working: https://github.com/ajaxorg/ace/pull/1608

Here's a live demo:
https://brionv.com/misc/demo/ace/build/kitchen-sink.html
Comment 5 Rainer Rillke @commons.wikimedia 2013-09-16 14:16:51 UTC
(In reply to comment #4)
Thank you!

However, the following does not work (FF 23):
* Copy https://commons.wikimedia.org/w/index.php?title=MediaWiki:RotateRequest.js&action=raw&ctype=text/javascript into your clipboard
* Paste it into your kitchen sink https://brionv.com/misc/demo/ace/build/kitchen-sink.html
* Set the carret behind the first "return;"
* Press Enter. Result:
ret
urn;
Comment 6 Rainer Rillke @commons.wikimedia 2013-09-16 14:18:41 UTC
*caret = text cursor
Comment 7 Brion Vibber 2013-09-16 14:27:30 UTC
Ok, looks like that may be the tab character bug mentioned on the original patch. I'll look into it...
Comment 8 Brion Vibber 2013-09-30 04:08:00 UTC
*** Bug 54775 has been marked as a duplicate of this bug. ***
Comment 9 Derk-Jan Hartman 2013-12-31 10:33:37 UTC
Can this be tested with https://gerrit.wikimedia.org/r/104510 please ?
Comment 10 Siddhartha Ghai 2014-03-01 14:34:48 UTC
*** Bug 62095 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links