Page 1 of 1

console paste whitespace behavior

Posted: Sat Aug 15, 2015 3:20 pm
by GopherAtl
lua doesn't care about newlines, except that they are whitespace - not sure if you control this behavior or if the operating system is doing it automatically, but if it is factorio stripping the newlines and tabs from pasted text, could we get them replaced with spaces instead of removed entirely? To paste test code in I have to make sure there's spaces at the end of certain lines - for example, if a line is just "end" and the next line begins with call to print(), the result pasted is endprint(...) which errors.

I debated here or the modding interface section for this, ultimately it's not really about the modding interface at all, even though it's in the context of mod development and testing that I'm always doing it.

Re: console paste whitespace behavior

Posted: Wed Aug 19, 2015 7:53 am
by ssilk
Couldn't this be declared as bug?

Re: console paste whitespace behavior

Posted: Wed Aug 19, 2015 10:01 am
by Oxyd
Bug or not, I just implemented it. It'll be in 0.12.5.

Re: console paste whitespace behavior

Posted: Wed Aug 19, 2015 11:02 am
by ssilk
Nice.