Set modified and add to undo manager when marking block

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
Do not restore marked blocks as well as edited blocks

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>