Rainclip / Rainclip-Issues

0 stars 0 forks source link

Expand keywords adds the last typed letter in keyword (in some software) #6

Closed SEMilfred closed 3 years ago

SEMilfred commented 3 years ago

When making a snippet and using the "expand keyword" feature, the last typed letter in the keyword gets added to the end of the snippet in some software.

For example, I have the expand keyword "@func" which is set to snippet in "/// @function " for quicker JSDoc writing. However, when doing this in the software GameMaker:Studio 2, the last typed letter in the snippet (in this case "c") gets added to the end of the snippet, making it "/// @function c". If using the "only expand keyword when space is pressed" setting, the space is similarly added to the end of the snippet.

Same issue doesn't happen when using notepad, so it might be that rainclip is faster at registering the keystrokes than GameMaker: Studio 2 (which is odd, but plausible).

Rainclip commented 3 years ago

Tried it and yes, this happens with the GameMaker software. It also "eats" one extra character from the left which suggest that the replacement is done before the software has time to handle the key press. I'll see if adding a small (and optional) delay before the replacement helps with the problem.

Rainclip commented 3 years ago

It is now possible to set a delay per application for the text expansion which should fix the issue.