REPL history interfering with RadioMenu navigation

I have a function that uses the REPL.TerminalMenus: RadioMenu to navigate through the local directory in order to select a file to load. The function works great when run directly in the REPL, however when I run it from a .jl file using the vscode extension, using the up and down arrow keys also cycles through the REPL history at the same time leading to jumbled output in the REPL and the user having to press the arrow key twice to move one position.

Does anyone know how I can stop this from happening? The code I am writing is intended for people without much Julia or even coding experience so I would like it to be as user-friendly as possible.

Many thanks :slight_smile: