Prompt With List From Variable Loses Space After Characters

I have a macro which uses Prompt with list from variable, with the variable containing a list.

Each item of the list ends with a space. For example:

"Consumer Rights Act 2015 "

Words.kmmacros (2.6 KB)

The space is removed when the variable is pasted or typed (whether using "Insert text by pasting" or "Insert text by typing").

Is this an expected behaviour?

My work around is to add another Insert text command just containing a space, but I would like to know if there is setting I am missing with the macro I attached.

No workaround is needed - you just need to go into the "gear menu" in your Prompt action and uncheck the "Trim Lines" option.

Here's the gear menu:
KM 0 2022-10-14_16-47-39

3 Likes

@tiffle's is the proper solution -- but don't forget you can include literal text in your "Insert Text by Pasting..." action. So you can whatever you need to add after your variable token -- in this case you could append a space character.

addSpaceHidden

Except you can't see it! Spaces, returns, and other "invisible" characters can be hard to spot in a text box, but you can use tokens to make their presence obvious:

addSpace

So no need for an extra "Insert" command.

1 Like