added auto close for YCM scratch buffer (finallllly)