Revert "terminal cursor restore bug fixed"

This reverts commit ba782a1f58e15cac5fc50e8167c9bd6dc064772c.