mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 04:06:03 +00:00
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:
parent
4445b3c065
commit
da2ddb00ed
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user