     Gui, Show, , % g_WindowName
 return
 
+OpenContextMenu:
+    currentCommandText := "运行当前命令："
+    if (!g_CurrentLine > 0)
+    {
+        currentCommandText .= Chr(g_FirstChar)
+    }
+    else
+    {
+        currentCommandText .= Chr(g_FirstChar + g_CurrentLine - 1)
+    }
+    Menu, ContextMenu, Add, %currentCommandText%, RunCurrentCommand
+    Menu, ContextMenu, Add, 显示帮助(&A), Help
+    Menu, ContextMenu, Add, 编辑配置(&E), EditConfig
+    Menu, ContextMenu, Add, 重载文件(&S), ReloadFiles
+    Menu, ContextMenu, Add, 显示历史(&H), DisplayHistoryCommands
+    Menu, ContextMenu, Add, 重新启动(&R), RestartRunZ
+    Menu, ContextMenu, Add, 退出程序(&X), ExitRunZ
+    Menu, ContextMenu, Show
+    Menu, ContextMenu, DeleteAll
+return
+
 TabFunction:
     ControlGetFocus, ctrl,
     if (ctrl == g_InputArea)

    if (g_Conf.Gui.ShowCurrentCommand)
    {
        commandToShow := SubStr(g_CurrentCommand, InStr(g_CurrentCommand, " | ") + 3)
        ControlSetText, %g_CommandArea%, %commandToShow%
    }
}

ClearInput:
    ControlSetText, %g_InputArea%,
    ControlFocus, %g_InputArea%
return



    DisplaySearchResult(result)

    ControlSetText, %g_InputArea%, %newInput%, %g_WindowName%
    Send, {end}
}

