From 4b3c057abdee85bc023e2f1aa6671bf9c19a3fe2 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Mon, 8 Jun 2020 19:25:20 +0800 Subject: [PATCH] Fix expanded view in Menu core, don't scroll in expanded view if less than 3 lines. --- menu.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/menu.cpp b/menu.cpp index c9be1ba..0a80b50 100644 --- a/menu.cpp +++ b/menu.cpp @@ -5279,6 +5279,10 @@ void ScrollLongName(void) { max_len = 20; // __.__.__ remove that from the end } + else if (cfg.browse_expand && len < 55) + { + return; + } } ScrollText(flist_iSelectedEntry()-flist_iFirstEntry(), flist_SelectedItem()->altname, 0, len, max_len, 1); @@ -5295,8 +5299,9 @@ void PrintDirectory(int expand) if (expand) { int k = flist_iFirstEntry() + OsdGetSize() - 1; - if (flist_nDirEntries() && k == flist_iSelectedEntry() && k <= flist_nDirEntries() && - strlen(flist_DirItem(k)->altname) > 28 && !flist_DirItem(k)->datecode[0] && flist_DirItem(k)->de.d_type != DT_DIR) + if (flist_nDirEntries() && k == flist_iSelectedEntry() && k <= flist_nDirEntries() + && strlen(flist_DirItem(k)->altname) > 28 && !(!cfg.rbf_hide_datecode && flist_DirItem(k)->datecode[0]) + && flist_DirItem(k)->de.d_type != DT_DIR) { //make room for last expanded line flist_iFirstEntryInc();