From: Nicolas Boichat Date: Mon, 7 Nov 2005 17:40:07 +0000 (+0000) Subject: Fix command completion bug. X-Git-Tag: Release-1.38.1~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=926b974a5a14dbcac8b8ae06db1d0ae909357524;p=bacula%2Fbacula Fix command completion bug. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2558 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/wx-console/wxbmainframe.cpp b/bacula/src/wx-console/wxbmainframe.cpp index a94a6e8e1f..0ffa691c85 100644 --- a/bacula/src/wx-console/wxbmainframe.cpp +++ b/bacula/src/wx-console/wxbmainframe.cpp @@ -605,14 +605,18 @@ void wxbMainFrame::Print(wxString str, int status) if (status == CS_CONNECTED) { SetStatusText(_("Connected to the director.")); typeCtrl->ClearCommandList(); - wxbDataTokenizer* dt = wxbUtils::WaitForEnd(wxT(".help"), true); - int i, j; - wxString str; - for (i = 0; i < (int)dt->GetCount(); i++) { - str = (*dt)[i]; - str.RemoveLast(); - if ((j = str.Find(' ')) > -1) { - typeCtrl->AddCommand(str.Mid(0, j), str.Mid(j+1)); + bool parsed = false; + while (!parsed) { + wxbDataTokenizer* dt = wxbUtils::WaitForEnd(wxT(".help"), true); + int i, j; + wxString str; + for (i = 0; i < (int)dt->GetCount(); i++) { + str = (*dt)[i]; + str.RemoveLast(); + if ((j = str.Find(' ')) > -1) { + typeCtrl->AddCommand(str.Mid(0, j), str.Mid(j+1)); + parsed = true; + } } } EnablePanels();