constrained-editor-plugin icon indicating copy to clipboard operation
constrained-editor-plugin copied to clipboard

Tab Character is not respected by constrained editor range type

Open Nidoxs opened this issue 11 months ago • 1 comments

I am currently working with the Monaco Editor & the Constrained Editor Plugin.

I have defined some code like so, including the use of a tab character: image

I want to set the editable area to a single line starting from the 5th column onwards: image

image

Error

image

Does the use of a tab character (when manually setting the value with setValue) not get recognised by the Monaco editor? I was expecting the max column count for line 2 to be 5 after \t and a space

Nidoxs avatar Mar 17 '24 17:03 Nidoxs

@Nidoxs Thank you for bringing up this issue.

I get the available space information from monaco editor instance, and I think monaco editor doesn't change the \t to a 4 column space value before creating the instan. I also feel, that is a reasonable assumption from monaco editor, as there is a configuration called tabSize where it can be set according to user preference.

I will think about all possible scenarios and add a workaround in my library, if necessary.

For now, you can alter your code as this,

public class Rocket() {
____
}

(Note: I replaced tab spaces by underscores for visualizing)

Pranomvignesh avatar Mar 17 '24 19:03 Pranomvignesh

This issue is stale because it has been open 60 days with no activity. Add required comments or this will be closed in 15 days.

Pranomvignesh avatar May 17 '24 02:05 Pranomvignesh

This issue was closed because it has been stalled for 15 days with no activity.

Pranomvignesh avatar Jun 01 '24 02:06 Pranomvignesh