Makes warning about closing the tab pop up only if user edited the tab

Reported-by: bnurbekov, lhnguyenduc
Signed-off-by: Batyrlan Nurbekov <bnurbekov@wpi.edu>, Long Nguyen Duc
Hoang <lhnguyenduc@wpi.edu>