On 12/8/23 16:29, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> void > Tom> tui_data_window::rerender () > Tom> { > Tom> + /* Calling check_register_value calls rerender again. We use this counter > Tom> + to prevent enless recursion. */ > Tom> + static int in_rerender; > > There's a typo, the function is check_register_values (missing an "s" in > the comment). > > However, it seems bad to need new state for this. > How about this approach? Rather than adding global state, it adds a function parameter. It's currently called toplevel, though I've also consider "active". Another solution is to split out the functionality between two functions, I didn't pursue this because I couldn't think of good names (I came up with rerender and rerender_1). Thanks, - Tom