2
3
Fork
You've already forked ncsu
0

Don't re-order items on deletion in child-nodes #237

Open
opened 2024年04月01日 13:30:28 +02:00 by snyball · 0 comments
snyball commented 2024年04月01日 13:30:28 +02:00 (Migrated from code.blicky.net)
Copy link

An issue I encounter often with ncdu, is that I'm deep in some directory tree, deleting a huge file. Then, when I go back up, I suddenly find myself at or near the bottom of the list, so I have to then scroll all the way back up to investigate the next biggest subdirectory.

What I suggest is to maintain a stack of directory listings as the user traverses the tree, and instead of recalculating where each item should be when going upwards again, to just pop off this stack. This means my cursor doesn't jump around wildly when I go around the tree deleting files, but if I go all the way back and then down into the tree again, I'll see the new ordering.

An issue I encounter often with `ncdu`, is that I'm deep in some directory tree, deleting a huge file. Then, when I go back up, I suddenly find myself at or near the bottom of the list, so I have to then scroll all the way back up to investigate the next biggest subdirectory. What I suggest is to maintain a stack of directory listings as the user traverses the tree, and instead of recalculating where each item should be when going upwards again, to just pop off this stack. This means my cursor doesn't jump around wildly when I go around the tree deleting files, but if I go all the way back and then down into the tree again, I'll see the new ordering.
Sign in to join this conversation.
No Branch/Tag specified
zig
zig0.16
master
zig-threaded
openat
chdir
clear
compll
v2.9.3
v2.9.2
v2.9.1
v2.9
v2.8.2
v2.8.1
v2.8
v1.22
v1.21
v2.7
v2.6
v2.5
v1.20
v2.4
v1.19
v2.3
v1.18.1
v2.2.2
v1.18
v2.2.1
v2.2
v1.17
v2.1.2
v2.1.1
v2.1
v2.0.1
v2.0
v2.0-beta3
v2.0-beta2
v2.0-beta1
v1.16
v1.15.1
v1.15
v1.14.2
v1.14.1
v1.14
v1.13
v1.12
v1.11
v1.10
v1.9
v1.8
v1.7
v1.6
v1.5
v1.4
v1.3
v1.2
v1.1
No labels
1.x
2.x
bug
feature
imported
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
selfisekai/ncsu#237
Reference in a new issue
selfisekai/ncsu
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?