fix(modules): Only add reset tag on non-empty modules
Adding the reset tag to empty modules makes polybar add margins and separators for that empty module. Fixes #1857 Ref #1596
This commit is contained in:
parent
211b0bbfd8
commit
4ea188b3f9
@ -82,9 +82,11 @@ namespace modules {
|
|||||||
m_cache = CAST_MOD(Impl)->get_output();
|
m_cache = CAST_MOD(Impl)->get_output();
|
||||||
// Make sure builder is really empty
|
// Make sure builder is really empty
|
||||||
m_builder->flush();
|
m_builder->flush();
|
||||||
// Add a reset tag after the module
|
if (!m_cache.empty()) {
|
||||||
m_builder->control(controltag::R);
|
// Add a reset tag after the module
|
||||||
m_cache += m_builder->flush();
|
m_builder->control(controltag::R);
|
||||||
|
m_cache += m_builder->flush();
|
||||||
|
}
|
||||||
m_changed = false;
|
m_changed = false;
|
||||||
}
|
}
|
||||||
return m_cache;
|
return m_cache;
|
||||||
|
Loading…
Reference in New Issue
Block a user