Notepad plugin: Resize correctly after edit mode

Thanks to Patrik Bachan for investigating (#529)
Merge remote-tracking branch 'upstream/master'