Inserting more than 5000 characters into the command bar breaks syntax highlighting

Explanation

When more than 5000 characters is added to the command bar (typically when copying code from a script into the command bar), the syntax highlighting stops and the text becomes white:

I believe that that would be the intended behaviour due to the character number it stops at.

HOWEVER, the lack of syntax highlighting becomes problematic when the 5000+ characters are removed and new code is typed into the command bar. Instead of colouring the code according to the inputted text, it will instead highlight it based on what was there previously (what was there when there were 5000+ characters). The only way to get it to highlight correctly is to restart Studio entirely.

By pasting this code repeatedly (as an example; any code will do):

function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 

then putting in any code (in this case, a print statement), the colours would match the function function function... code:


Reproduction

  1. Insert code into the studio command bar that is over 5000 characters longs. Any additional code after 5000 will be highlighted white.
  2. Remove the code from the command bar
  3. Type any other code into the command bar
  4. Observe the syntax highlighting incorrectly colouring the new code.
5000+ characters of the <function function function...>code
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 
function function function "Text" "Text" "Text" type type type math math math 1234 1234 1234 true true true 

Device Info

Operating System: Windows 10
CPU: Ryzen 5 3600
GPU: GTX 1650 Super
RAM: 16GB @ 3600MHz

1 Like

We’ve filed a ticket into our internal database for this issue, and we will update you when we have further information!

Thanks for the report!

1 Like

Hi,

Thank you for filling this issue. We have plans on enhancing the command bar to be able to handle the requested features though we don’t have a definite timeline for this.

In the meantime you can require module scripts in the command bar and execute functions in those module scripts.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.