         }
     }
 
-    ControlGetText, result, Edit2
+    ControlGetText, result, %g_OutputArea%
     result := StrReplace(result, ">| ", " | ")
     result := StrReplace(result, currentChar " | ", currentChar ">| ")
     DisplaySearchResult(result)
 
-    ControlSetText, Edit1, %newInput%
+    ControlSetText, %g_InputArea%, %newInput%
     Send, {end}
 }
 

Gui, Font, % "s" g_Conf.Gui.FontSize, % g_Conf.Gui.FontName
Gui, Add, Edit, % "gProcessInputCommand vSearchArea"
        . " w" g_Conf.Gui.WidgetWidth " h" g_Conf.Gui.EditHeight,
Gui, Add, Button, w0 h0,
Gui, Add, Edit, % "ReadOnly vDisplayArea "
        . (g_Conf.Gui.HideDisplayAreaVScroll ? "-VScroll " : "")
        . " w" g_Conf.Gui.WidgetWidth " h" g_Conf.Gui.DisplayAreaHeight


ChangeCommand(step, resetCurrentLine = false)
{
    ControlGetText, g_CurrentInput, %g_InputArea%

    if (resetCurrentLine || SubStr(g_CurrentInput, 1, 1) != "@")
    {
