From 3f8e30efb17861ac2ef728dd3db3b083199d2f06 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 10 Dec 2016 21:01:07 +0100 Subject: [PATCH] tweaks: delete some obscuring debugging stuff When wanting to debug something, it is far more useful to temporarily insert lines like: statusline(ALERT, "name = %i", variable); It provides instant feedback, and it slows things down, so you can kind of see what happens. --- src/nano.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/nano.c b/src/nano.c index 6bda5964..7c4828be 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1769,26 +1769,13 @@ int do_mouse(void) openfile->current_y = i; i += strlenpt(openfile->current->data) / editwincols; } -#ifdef DEBUG - fprintf(stderr, "do_mouse(): moving to current_y = %ld, index i = %lu\n", - (long)openfile->current_y, (unsigned long)i); - fprintf(stderr, " openfile->current->data = \"%s\"\n", openfile->current->data); -#endif if (i > mouse_y) { openfile->current = openfile->current->prev; openfile->current_x = actual_x(openfile->current->data, mouse_x + (mouse_y - openfile->current_y) * editwincols); -#ifdef DEBUG - fprintf(stderr, "do_mouse(): i > mouse_y, mouse_x = %d, current_x to = %lu\n", - mouse_x, (unsigned long)openfile->current_x); -#endif } else { openfile->current_x = actual_x(openfile->current->data, mouse_x); -#ifdef DEBUG - fprintf(stderr, "do_mouse(): i <= mouse_y, mouse_x = %d, setting current_x to = %lu\n", - mouse_x, (unsigned long)openfile->current_x); -#endif } } else #endif /* NANO_TINY */