sorry for so many messages...
I don't speak Perl, so I was just talking generally... but each of those \t's is a tab, so maybe remove two?
Yeah, it works to remove two of the tabs, but since I also don't speak Perl I can't tell why it's doing that. And that sort of bothers me, that it is clearly marked as inserting two, but it actually inserts four.
So it works when there is text to paste in, but when it falls back to just positioning the cursor, only two tabs are inserted.