org-arl / fjage

Framework for Java and Groovy Agents
https://fjage.readthedocs.io/en/latest/
Other
26 stars 13 forks source link

Web shell tries to execute first line when pasting multiline string #311

Closed notthetup closed 3 months ago

notthetup commented 3 months ago

When pasting a multiline string in the web shell, instead of displaying a multiline string, the Web shell tries to execute the string at the first occurrence of a newline when the web shell is first loaded/refreshed.

For example when copying/pasting this string...

a = 1
b = 2
c = 3

d = 4
Screenshot 2024-06-28 at 7 33 15 PM

Once "Enter" is pressed, this behavior goes away.

Screenshot 2024-06-28 at 7 35 59 PM
notthetup commented 3 months ago
Screenshot 2024-06-28 at 7 37 49 PM Screenshot 2024-06-28 at 7 38 15 PM
notthetup commented 3 months ago

Seems related to

Bracketed Paste Mode

When bracketed paste mode is set, pasted text is bracketed with control sequences so that the program can differentiate pasted text from typed-in text. When bracketed paste mode is set, the program will receive: ESC [ 200 ~, followed by the pasted text, followed by ESC [ 201 ~.

https://www.xfree86.org/current/ctlseqs.html