commit 3f8e30efb17861ac2ef728dd3db3b083199d2f06
parent e9fde7d7dc9ff975d4745ce519584a456970c982
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 10 Dec 2016 21:01:07 +0100
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.
Diffstat:
1 file changed, 0 insertions(+), 13 deletions(-)
diff --git 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 */