mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Merge branch '2766_panelize_refresh_fix'
* 2766_panelize_refresh_fix: Ticket #2766 (Cursor position reset after update)
This commit is contained in:
commit
4a52bae1e7
@ -3861,10 +3861,15 @@ do_try_to_select (WPanel * panel, const char *name)
|
||||
}
|
||||
|
||||
/* We only want the last component of the directory,
|
||||
* and from this only the name without suffix. */
|
||||
subdir = vfs_strip_suffix_from_filename (x_basename (name));
|
||||
* and from this only the name without suffix.
|
||||
* Cut prefix if the panel is not panelized */
|
||||
|
||||
/* Search that subdirectory, if found select it */
|
||||
if (panel->is_panelized)
|
||||
subdir = vfs_strip_suffix_from_filename (name);
|
||||
else
|
||||
subdir = vfs_strip_suffix_from_filename (x_basename (name));
|
||||
|
||||
/* Search that subdir or filename without prefix (if not panelized panel), select it if found */
|
||||
for (i = 0; i < panel->count; i++)
|
||||
{
|
||||
if (strcmp (subdir, panel->dir.list[i].fname) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user