On 11/25/23 04:43, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> Fix this by moving a call to tui_display_main from tui_enable to > Tom> tui_apply_current_layout. > > Tom> - tui_update_source_windows_with_addr (gdbarch, addr); > Tom> + if (addr == 0) > Tom> + tui_display_main (); > Tom> + else > Tom> + tui_update_source_windows_with_addr (gdbarch, addr); > > This 'if' seems like something the source window ought to know, not the > layout code. > I've fixed this by moving the logic to tui_source_window_base::rerender. > But between this and the register window patch in the same spot, I > wonder if there's some more generic solution available. Like, if I > write a TUI window in Python, will redoing the layout cause a refresh? I think so. > If not -- isn't that a bug? Or if so -- why can't built-in windows work > the same way? My understanding is that the rerender was simply incomplete, and python windows will can implement whatever they like in a rerender, so I suppose I see no problem there. I hope that answers your question. Thanks, - Tom