Page MenuHomePhabricator

Long lines don't word wrap using CodeEditor extension
Closed, ResolvedPublic

Description

Using the new code editor is very difficult when long strings of code can't be rendered on one screen. There needs to be a word wrap capability.


Version: unspecified
Severity: enhancement

Details

Reference
bz53911

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:00 AM
bzimport added a project: CodeEditor.
bzimport set Reference to bz53911.
bzimport added a subscriber: Unknown Object (MLST).

Quite easy to do with

session.setUseWrapMode(true);
session.setWrapLimitRange(120, 120);

It defaults to 80 columns it seems. There is also a hook to allow you to do this yourself:

Demo: https://en.wikipedia.org/w/index.php?title=User%3ATheDJ%2Fcommon.js&diff=588508535&oldid=584824999

I guess we can fight over whether or not this should be set by default.

It needs to be an option from the ui. I don't care if it is toggled by default or not.

Request for new functionality which wasn't there before => severity==enhancement

TheDJ claimed this task.

With aba51ef4f54de2de69ebbea246d34447e7ab5f96, you can now use a line wrap button in the toolbar to set wrapping vs. scrolling. We could argue about if the default should be inverted or not... But we can have a separate ticket on that.