copy Vim view frame setting code from MacVim