mirror of https://github.com/adamdruppe/arsd.git
small fix on the file dialog on linux to sort
This commit is contained in:
parent
71a211bc5e
commit
1e1b096bc9
|
@ -15038,7 +15038,9 @@ class FilePicker : Dialog {
|
||||||
for(int i = 0; i < sa.length; i++) {
|
for(int i = 0; i < sa.length; i++) {
|
||||||
if(i == sb.length)
|
if(i == sb.length)
|
||||||
return 1;
|
return 1;
|
||||||
return sa[i] - sb[i];
|
auto diff = sa[i] - sb[i];
|
||||||
|
if(diff)
|
||||||
|
return diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -15144,7 +15146,7 @@ class FilePicker : Dialog {
|
||||||
if(current.length >= 2 && current[0 ..2] == "./")
|
if(current.length >= 2 && current[0 ..2] == "./")
|
||||||
current = current[2 .. $];
|
current = current[2 .. $];
|
||||||
|
|
||||||
auto commonPrefix = loadFiles(".", current ~ "*");
|
auto commonPrefix = loadFiles(currentDirectory, current ~ "*");
|
||||||
|
|
||||||
if(commonPrefix.length)
|
if(commonPrefix.length)
|
||||||
lineEdit.content = commonPrefix;
|
lineEdit.content = commonPrefix;
|
||||||
|
|
|
@ -509,7 +509,7 @@ public struct Selection {
|
||||||
|
|
||||||
keep_searching:
|
keep_searching:
|
||||||
windowBuffer[0 .. endingSpot - currentSpot] = layouter.text[currentSpot .. endingSpot];
|
windowBuffer[0 .. endingSpot - currentSpot] = layouter.text[currentSpot .. endingSpot];
|
||||||
auto result = predicate(windowBuffer[0 .. endingSpot - currentSpot]);
|
auto result = predicate(windowBuffer[0 .. endingSpot - currentSpot]);
|
||||||
if(result !is null) {
|
if(result !is null) {
|
||||||
// we're done, it was found
|
// we're done, it was found
|
||||||
auto offsetStart = result is null ? currentSpot : cast(int) (result.ptr - windowBuffer.ptr);
|
auto offsetStart = result is null ? currentSpot : cast(int) (result.ptr - windowBuffer.ptr);
|
||||||
|
|
Loading…
Reference in New Issue