From 518be303d916d16f4816e3b9ae41cd42b0d5e7fd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 31 Mar 2018 00:02:35 +0200 Subject: Extra debugging --- src/sc_editor.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sc_editor.c b/src/sc_editor.c index e0fc64c..897bdad 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -1574,14 +1574,22 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, break; case GDK_KEY_F7 : - if ( event->state & GDK_CONTROL_MASK ) { - debug_paragraphs(e); - } else if ( event->state & GDK_SHIFT_MASK ) { - if ( e->cursor_frame != NULL ) { + if ( e->cursor_frame != NULL ) { + if ( event->state & GDK_CONTROL_MASK ) { + debug_paragraphs(e); + } else if ( event->state & GDK_SHIFT_MASK ) { + printf("Cursor frame block = %p\n", e->cursor_frame->scblocks); + printf("Editor top block = %p\n", e->scblocks); show_sc_block(e->cursor_frame->scblocks, ""); + } else { + open_debugger(e->cursor_frame); } } else { - open_debugger(e->cursor_frame); + if ( event->state & GDK_SHIFT_MASK ) { + printf("Debugging the top frame:\n"); + printf("Editor top block = %p\n", e->scblocks); + show_sc_block(e->top->scblocks, ""); + } } break; -- cgit v1.2.3