Partially revert change from c352069b31.

It's not quite clear to me what the intent was here, but I don't believe
this change was correct. We shouldn't block on callbacks within the main
loop.

This fixes #901.
This commit is contained in:
Brenden Matthews 2021-04-24 10:29:59 -05:00 committed by Brenden Matthews
parent 4445b3c065
commit da2ddb00ed
2 changed files with 0 additions and 19 deletions

View File

@ -764,7 +764,6 @@ void evaluate(const char *text, char *p, int p_max_size) {
* callbacks and generate_text_internal() after callbacks.
*/
extract_variable_text_internal(&subroot, text);
conky::run_all_callbacks();
generate_text_internal(p, p_max_size, subroot);
DBGP2("evaluated '%s' to '%s'", text, p);

View File

@ -42,22 +42,4 @@ TEST_CASE("Expressions can be evaluated", "[evaluate]") {
evaluate(input, result, kMaxSize);
REQUIRE(strncmp(input, result, kMaxSize) == 0);
}
SECTION("execs can be evaluated") {
constexpr int kMaxSize = 50;
const char input[kMaxSize] = "${exec echo text}";
char result[kMaxSize]{'\0'};
evaluate(input, result, kMaxSize);
REQUIRE(strncmp("text", result, kMaxSize) == 0);
}
SECTION("execp echo without other substitutions can be evaluated") {
constexpr int kMaxSize = 50;
const char input[kMaxSize] = "${execp echo text}";
char result[kMaxSize]{'\0'};
evaluate(input, result, kMaxSize);
REQUIRE(strncmp("text", result, kMaxSize) == 0);
}
}