From 0e3a30f40c2c7acf2b96a9b49df237bf9c3bc54e Mon Sep 17 00:00:00 2001 From: Norbert Warmuth Date: Sun, 13 Dec 1998 18:30:38 +0000 Subject: [PATCH] Sun Dec 13 18:35:05 1998 Norbert Warmuth * screen.c (panel_reload): Don't set panel->selected to zero here, keep it's value if possible or set it to panel->count - 1 (I disliked the jumping cursor when deleting files). --- src/ChangeLog | 6 ++++++ src/screen.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 26f1a0280..a34c1e73a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +Sun Dec 13 18:35:05 1998 Norbert Warmuth + + * screen.c (panel_reload): Don't set panel->selected to zero here, + keep it's value if possible or set it to panel->count - 1 (I disliked + the jumping cursor when deleting files). + 1998-12-11 Michael Fulbright * file.c (panel_operate_generate_prompt): Changes the text diff --git a/src/screen.c b/src/screen.c index 2558ec77d..09dba8e03 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1081,7 +1081,10 @@ panel_reload (WPanel *panel) panel->count = do_reload_dir (&panel->dir, panel->sort_type, panel->count, panel->reverse, panel->case_sensitive, panel->filter); - panel->selected = 0; + + if (panel->selected >= panel->count) + do_select (panel, panel->count-1); + panel->marked = 0; panel->dirs_marked = 0; panel->total = 0;