diff options
| author | verdant <im@verdant.ee> | 2026-08-03 19:35:31 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-08-03 19:40:34 +0800 |
| commit | cce383a05f2ea557fa27103ea51052b6fb35714a (patch) | |
| tree | c72f44ccda2bf82e3d01a9af99ace0e1ffb0e3a6 /src | |
| parent | fee7ec9cbe60a2e5db5193a1db353ccd1fc5e5a3 (diff) | |
| download | sf-cce383a05f2ea557fa27103ea51052b6fb35714a.tar.gz sf-cce383a05f2ea557fa27103ea51052b6fb35714a.zip | |
Fix crash when scrolling in a empty directory
Disable scrolling when it is a empty directory.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -318,6 +318,9 @@ fm_entries_scroll(fm_info *info, int n) if (!info) return; + if (info->cur->count == 0) + return; + info->cursor += n; if (info->cursor < 0) |
