Sounds like a particular form of migraine. My dad used to get those, they were pretty much painless but his vision would do that, and it was a migraine. You might see your doctor and get checked against anything that suggests you have a stroke risk, not that the two are necessarily connected, but my dad did have a minor stroke later in his life after having this kind of migraines for a few years.