undo().recordUndoBufferParams(CursorData());
branch_list.add(branch_name);
branch = branch_list.find(branch_name);
- branch->setColors("background", "background");
+ if (branch)
+ // needed to update the color table for dark mode
+ branch->setColors("background", "background");
dr.setError(false);
dr.screenUpdate(Update::Force);
}
// loop over children
for (auto const & p : d->children_positions) {
Buffer * child = const_cast<Buffer *>(p.first);
+ // This can happen when called during GUI operations
+ if (!theBufferList().isLoaded(child))
+ continue;
// No duplicates
ListOfBuffers::const_iterator bit = find(children.begin(), children.end(), child);
if (bit != children.end())
cbuf.tocBackend().update(true, utype);
if (scope == UpdateMaster)
cbuf.structureChanged();
+
+ d->need_update = false;
}