[PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled
Hannes Domani
ssbssa@yahoo.de
Tue Dec 29 17:02:25 GMT 2020
There seems to be no other way to determine if TUI is enabled, which is a
problem in case the TUI is disabled, and you redraw the window contents
based on some registered event.
Then the TUI is redrawn, even though the TUI stays disabled, and the prompt
is anywhere on the screen.
gdb/ChangeLog:
2020-12-29 Hannes Domani <ssbssa@yahoo.de>
* python/py-tui.c (gdbpy_tui_is_valid): Check tui_active as well.
---
gdb/python/py-tui.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
index 87065eaf60..9c35778bcb 100644
--- a/gdb/python/py-tui.c
+++ b/gdb/python/py-tui.c
@@ -356,7 +356,7 @@ gdbpy_tui_is_valid (PyObject *self, PyObject *args)
{
gdbpy_tui_window *win = (gdbpy_tui_window *) self;
- if (win->window != nullptr)
+ if (tui_active && win->window != nullptr)
Py_RETURN_TRUE;
Py_RETURN_FALSE;
}
--
2.29.2
More information about the Gdb-patches
mailing list