Extra debugging
authorThomas White <taw@bitwiz.me.uk>
Fri, 30 Mar 2018 22:02:35 +0000 (00:02 +0200)
committerThomas White <taw@bitwiz.me.uk>
Fri, 30 Mar 2018 22:02:35 +0000 (00:02 +0200)
src/sc_editor.c

index e0fc64c..897bdad 100644 (file)
@@ -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;