 
 <TC_Restart>:
     WinClose, ahk_class TTOTAL_CMD
-
-    ; 好像不需要 Sleep
-    ; Sleep, 100
+    WinWaitClose, ahk_class TTOTAL_CMD, , 2
 
     Run, %TCPath%
     WinWait, ahk_class TTOTAL_CMD

    vim.Map("-", "<cm_SwitchSeparateTree>", "TTOTAL_CMD")
    vim.Map("=", "<cm_MatchSrc>", "TTOTAL_CMD")
    vim.Map(",", "<cm_SrcThumbs>", "TTOTAL_CMD")
    vim.Map(";", "<TC_ListMark>", "TTOTAL_CMD")
    vim.Map(":", "<cm_FocusCmdLine>", "TTOTAL_CMD")
    vim.Map("~", "<cm_SysInfo>", "TTOTAL_CMD")
    vim.Map("``", "<TC_ToggleShowInfo>", "TTOTAL_CMD")

        IniWrite, 0, %TCIni%, Configuration, RestrictInterface

        WinClose, ahk_class TTOTAL_CMD
        WinWaitClose, ahk_class TTOTAL_CMD, , 2

        Run, %TCPath%
        WinWait, ahk_class TTOTAL_CMD

        IfWinNotActive, ahk_class TTOTAL_CMD
            WinActivate, ahk_class TTOTAL_CMD
    }
return

