open last selected instead of first
Merge pull request #10 from krasa/proper-rewrite-fix

open last selected instead of first