Preview sync

* Improves matching
* Adds cursor sync (the same text in two windows lines up)
* Bug fixes