changed resize logic

Now new base is only written in caption until user releases keyboard
completely.
Merge pull request #15 from sukhmel/persistent_modifiers_fix

changed resize logic