Added automatic selection of prefix for the selected item

Original PR [here](https://github.com/atom0s/TSGE/pull/49).