aboutsummaryrefslogtreecommitdiffstats
path: root/fm.h
diff options
context:
space:
mode:
authorverdant <im@verdant.ee>2026-07-23 18:58:40 +0800
committerverdant <im@verdant.ee>2026-07-23 18:58:40 +0800
commit80ac2501501f83f7c64a5591b2075468a5fab6b5 (patch)
tree9ab6b4865d349106f1163cc48db548f413a6cc99 /fm.h
parentb23e2bfe015d779beab188e260dac145296352a6 (diff)
downloadsf-80ac2501501f83f7c64a5591b2075468a5fab6b5.tar.gz
sf-80ac2501501f83f7c64a5591b2075468a5fab6b5.zip
Add scroll state and redraw tracking to fm_info
Diffstat (limited to 'fm.h')
-rw-r--r--fm.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/fm.h b/fm.h
index a7c5748..06de931 100644
--- a/fm.h
+++ b/fm.h
@@ -2,6 +2,7 @@
#define SF_FM_H
#include <limits.h>
+#include <linux/limits.h>
#include <ncurses.h>
#include "wm.h"
@@ -15,11 +16,18 @@ typedef struct {
file_item *items;
int count;
int cap;
+} file_list;
+
+typedef struct {
+ file_list *cur;
+ file_list *next;
int selected_idx;
window *fm_l, *fm_r;
- char **cur_contents;
- char **next_dir_contents;
+ int got_next_dir;
+ char got_dir[PATH_MAX];
char cwd[PATH_MAX];
+ int top, bottom, margin_bottom;
+ int needs_redraw;
} fm_info;
void fm_getdir(fm_info *f);