follow example of term.js and reset scrollregion after resize