Skip to content

Commit

Permalink
Removed the forced delay in buld output
Browse files Browse the repository at this point in the history
Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Dec 24, 2024
1 parent 5cbf0d1 commit e14e4ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
9 changes: 0 additions & 9 deletions LiteEditor/BuildTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,6 @@ void BuildTab::OnBuildEnded(clBuildEvent& e)

void BuildTab::ProcessBuffer(bool last_line)
{
const long cur_time = m_buffer_sw.Time();

// Limit data process frequency.
if (!last_line) {
if ((cur_time - m_buffer_time) < PROCESSBUFFER_FLUSH_TIME)
return;
m_buffer_time = cur_time;
}

auto remainder = m_viewStc->Add(m_buffer, last_line);
m_viewStc->ScrollToEnd();

Expand Down
23 changes: 12 additions & 11 deletions Plugin/shell_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ void ShellCommand::SendStartMsg(const wxString& toolchain)
start_event.SetConfigurationName(m_info.GetConfiguration());
start_event.SetFlag(clBuildEvent::kCustomProject, m_info.GetKind() == QueueCommand::kCustomBuild);
start_event.SetToolchain(toolchain);
start_event.SetFlag(clBuildEvent::kClean, m_info.GetKind() == QueueCommand::kClean ||
(start_event.HasFlag(clBuildEvent::kCustomProject) &&
m_info.GetCustomBuildTarget() == wxT("clean")));
start_event.SetFlag(
clBuildEvent::kClean,
m_info.GetKind() == QueueCommand::kClean ||
(start_event.HasFlag(clBuildEvent::kCustomProject) && m_info.GetCustomBuildTarget() == wxT("clean")));
EventNotifier::Get()->AddPendingEvent(start_event);
}

Expand All @@ -96,27 +97,27 @@ void ShellCommand::CleanUp()
void ShellCommand::DoSetWorkingDirectory(ProjectPtr proj, bool isCustom, bool isFileOnly)
{
// when using custom build, user can select different working directory
if(proj) {
if(isCustom) {
if (proj) {
if (isCustom) {
// first set the path to the project working directory
::wxSetWorkingDirectory(proj->GetFileName().GetPath());

BuildConfigPtr buildConf =
clCxxWorkspaceST::Get()->GetProjBuildConf(m_info.GetProject(), m_info.GetConfiguration());
if(buildConf) {
if (buildConf) {
wxString wd = buildConf->GetCustomBuildWorkingDir();
if(wd.IsEmpty()) {
if (wd.IsEmpty()) {
// use the project path
wd = proj->GetFileName().GetPath();
} else {
// expand macros from path
wd = ExpandAllVariables(wd, clCxxWorkspaceST::Get(), proj->GetName(), buildConf->GetName(),
wxEmptyString);
wd = ExpandAllVariables(
wd, clCxxWorkspaceST::Get(), proj->GetName(), buildConf->GetName(), wxEmptyString);
}
::wxSetWorkingDirectory(wd);
}
} else {
if(m_info.GetProjectOnly() || isFileOnly) {
if (m_info.GetProjectOnly() || isFileOnly) {
// first set the path to the project working directory
::wxSetWorkingDirectory(proj->GetFileName().GetPath());
}
Expand All @@ -139,7 +140,7 @@ bool ShellCommand::StartProcess(const wxString& cmd, size_t create_flags)
#endif

m_proc = ::CreateAsyncProcess(this, cmd, create_flags);
if(!m_proc) {
if (!m_proc) {
return false;
}
return true;
Expand Down

0 comments on commit e14e4ea

Please sign in to comment.