@@ -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
@@ -2007,6 +2007,15 @@ namespace IGFD
20072007 std::sort (m_FileList.begin (), m_FileList.end (),
20082008 [](const FileInfoStruct& a, const FileInfoStruct& b) -> bool
20092009 {
2010+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] != ' .' ) return true ;
2011+ if (a.fileName [0 ] != ' .' && b.fileName [0 ] == ' .' ) return false ;
2012+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] == ' .' )
2013+ {
2014+ if (a.fileName .length () == 1 ) return false ;
2015+ if (b.fileName .length () == 1 ) return true ;
2016+ return (stricmp (a.fileName .c_str () + 1 , b.fileName .c_str () + 1 ) < 0 );
2017+ }
2018+
20102019 if (a.type != b.type ) return (a.type == ' d' ); // directory in first
20112020 return (stricmp (a.fileName .c_str (), b.fileName .c_str ()) < 0 ); // sort in insensitive case
20122021 });
@@ -2019,6 +2028,15 @@ namespace IGFD
20192028 std::sort (m_FileList.begin (), m_FileList.end (),
20202029 [](const FileInfoStruct& a, const FileInfoStruct& b) -> bool
20212030 {
2031+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] != ' .' ) return false ;
2032+ if (a.fileName [0 ] != ' .' && b.fileName [0 ] == ' .' ) return true ;
2033+ if (a.fileName [0 ] == ' .' && b.fileName [0 ] == ' .' )
2034+ {
2035+ if (a.fileName .length () == 1 ) return true ;
2036+ if (b.fileName .length () == 1 ) return false ;
2037+ return (stricmp (a.fileName .c_str () + 1 , b.fileName .c_str () + 1 ) > 0 );
2038+ }
2039+
20222040 if (a.type != b.type ) return (a.type != ' d' ); // directory in last
20232041 return (stricmp (a.fileName .c_str (), b.fileName .c_str ()) > 0 ); // sort in insensitive case
20242042 });
0 commit comments