shouldn't the undo list be attached to a view instead of being a global variable ?

you might have a use case where having a global would make more sense, but in that case wouldn't it make more sense to have it in the darktable global variable that already stores all sort of global stuff...