Ticket #2766 (Cursor position reset after update)

Cursor position reset after update when panel is panelized, but doesn't.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2012-03-30 14:49:39 +04:00
parent ce401d7974
commit 55684c3286

View File

@ -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)