+static void nav_stack(char dir) //
+{
+ FILE * file = fopen("test", "a");
+ fprintf(file, "called %d\n", world.things_here_scroll);
+ if ('u' == dir && world.things_here_scroll > 0)
+ {
+ world.things_here_scroll--;
+ fprintf(file, "u\n");
+ }
+ else if ('d' == dir && world.things_here)
+ {
+ uint32_t i;
+ uint32_t n_lines = 1;
+ for (i = 0; '\0' != world.things_here[i]; i++)
+ {
+ n_lines = n_lines + (world.things_here[i] == '\n');
+ }
+ uint16_t f_h = get_win_by_id('s')->frame_size.y;
+ fprintf(file, "%d %d\n", n_lines, f_h);
+ if (n_lines > f_h && world.things_here_scroll < n_lines - f_h)
+ {
+ world.things_here_scroll++;
+ }
+ fprintf(file, "d %d\n", world.things_here_scroll);
+ }
+ fclose(file);
+}
+
+
+