Skip to content

Commit

Permalink
Fix issue #1131. I think this fix at least should substantially
Browse files Browse the repository at this point in the history
improve matters. The intersection of the filter and the active being
empty means the diagnostics is not interesting.
  • Loading branch information
Andersbakken committed Jan 8, 2018
1 parent 1b6d2e5 commit 06d8be3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ static String formatDiagnostics(const Diagnostics &diagnostics, Flags<QueryMessa
} else {
filter = filter.intersected(active);
}
if (filter.isEmpty())
return String();
}
}

Expand Down

1 comment on commit 06d8be3

@baolonglin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can i add if(filter.isEmpty()) return String() in else? In my scenario, no active buffers of project in emacs, the compilation will generate source code files, the generated code will trigger the diagnostics logic, cause the emacs occupied 100% cpu. I have tested, after i added the code, emacs become normal.

Please sign in to comment.