Lines after the first in a multiline textbox are indented by a space

I’m currently working on making an editor for Luafide using Lua widgets. Unfortunately though, I have found a bug with top left aligned, multi-line text boxes: the first character is properly left-aligned, but every line thereafter is indented one space.

Problem Screenshot

Screenshot%20from%202018-11-05%2016-18-01

After some fiddling around, I discovered that if a line contained a ‘/’ anywhere in it, then on the next line I could backspace and actually remove the extra space indentation. Also, when the TextBox’s are used with Roact (Ask @LPGhatguy what that is) I can also remove the extra space without a slash on the preceding line. I assume this is because Roact is setting the Text field, although I’m not sure.

Slash Behavior Screenshot

Screenshot%20from%202018-11-05%2016-21-15

Here is a simple place file that reproduces it. I’m running studio on Windows 10 (inside a VM on Debian). It is a simple ScreenGui and TextBox inside StarterGui.
TextboxBugRepo.rbxl (15.8 KB)

Printing out the ASCII bytes of the TextBox, I discovered that the line endings are ASCII \10\13, the normal Linux line endings, rather than the traditional \10 windows line endings. When I remove the \13, the left edge is properly aligned. This may be an issue related to running Windows 10 inside of a VM with a Linux host.

I have also filed another bug report and a feature request for other issues I’m having with TextBoxes, found here:

5 Likes

This happens for me even on a native Windows 10 machine (no VM)

2 Likes

I’m also experiencing this issue and have found no way to fix it, other than changing the text which can be very tedious to script.

You got those mixed up there, \10 is Linux, \10\13 is Windows, and \13 is very old versions of Mac; most versions of Mac also use \10.

Still experiencing this issue to, its also affecting RichText on text alignment

3 Likes