@@ -638,7 +638,7 @@ namespace IGFD
638638 window->DC .LastItemStatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
639639
640640 // Render
641- if (held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld) || vFlashing)
641+ if (( held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld) ) || vFlashing)
642642 hovered = true ;
643643 if (hovered || selected)
644644 {
@@ -1415,7 +1415,7 @@ namespace IGFD
14151415 }
14161416 else
14171417 {
1418- ImGui::Text (" " );
1418+ ImGui::Text (" %s " , " " );
14191419 }
14201420 }
14211421 if (ImGui::TableNextColumn ()) // file date + time
@@ -2004,6 +2004,15 @@ namespace IGFD
20042004 std::sort (m_FileList.begin (), m_FileList.end (),
20052005 [](const FileInfoStruct& a, const FileInfoStruct& b) -> bool
20062006 {
2007+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] != ' .' ) return true ;
2008+ if (a.fileName [0 ] != ' .' && b.fileName [0 ] == ' .' ) return false ;
2009+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] == ' .' )
2010+ {
2011+ if (a.fileName .length () == 1 ) return false ;
2012+ if (b.fileName .length () == 1 ) return true ;
2013+ return (stricmp (a.fileName .c_str () + 1 , b.fileName .c_str () + 1 ) < 0 );
2014+ }
2015+
20072016 if (a.type != b.type ) return (a.type == ' d' ); // directory in first
20082017 return (stricmp (a.fileName .c_str (), b.fileName .c_str ()) < 0 ); // sort in insensitive case
20092018 });
@@ -2016,6 +2025,15 @@ namespace IGFD
20162025 std::sort (m_FileList.begin (), m_FileList.end (),
20172026 [](const FileInfoStruct& a, const FileInfoStruct& b) -> bool
20182027 {
2028+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] != ' .' ) return false ;
2029+ if (a.fileName [0 ] != ' .' && b.fileName [0 ] == ' .' ) return true ;
2030+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] == ' .' )
2031+ {
2032+ if (a.fileName .length () == 1 ) return true ;
2033+ if (b.fileName .length () == 1 ) return false ;
2034+ return (stricmp (a.fileName .c_str () + 1 , b.fileName .c_str () + 1 ) > 0 );
2035+ }
2036+
20192037 if (a.type != b.type ) return (a.type != ' d' ); // directory in last
20202038 return (stricmp (a.fileName .c_str (), b.fileName .c_str ()) > 0 ); // sort in insensitive case
20212039 });
0 commit comments