ref: fb4740e4300b8ac5ce02d94e16aa9dd18d00e461
parent: 2eed72f0fd6e6c8648a58a1947a97db56851bdd5
author: cancel <cancel@cancel.fm>
date: Tue Dec 11 21:06:49 EST 2018
Cleanup
--- a/tui_main.c
+++ b/tui_main.c
@@ -571,7 +571,7 @@
*needs_remarking = true;
}
-static Usz adjust_humanized_snapped(Usz ruler, Usz in, Isz delta_rulers) {
+static Usz adjust_rulers_humanized(Usz ruler, Usz in, Isz delta_rulers) {
// slightly more confusing because desired grid sizes are +1 (e.g. ruler of
// length 8 wants to snap to 25 and 33, not 24 and 32). also this math is
// sloppy.
@@ -607,9 +607,9 @@
Usz new_field_h = field_h;
Usz new_field_w = field_w;
if (delta_h != 0)
- new_field_h = adjust_humanized_snapped(ruler_y, field_h, delta_h);
+ new_field_h = adjust_rulers_humanized(ruler_y, field_h, delta_h);
if (delta_w != 0)
- new_field_w = adjust_humanized_snapped(ruler_x, field_w, delta_w);
+ new_field_w = adjust_rulers_humanized(ruler_x, field_w, delta_w);
if (new_field_h == field_h && new_field_w == field_w)
return;
tui_resize_grid(field, markmap, new_field_h, new_field_w, tick_num,