Optimization: ret rid of select_item() call

...after go to the found file or directory.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-11-05 15:53:01 +03:00
parent f5a93bf74c
commit 885b1b4f82

View File

@ -1511,27 +1511,24 @@ do_find (void)
if (v == B_ENTER)
{
if (dirname || filename)
{
if (dirname)
if (dirname != NULL)
{
do_cd (dirname, cd_exact);
if (filename)
try_to_select (current_panel, filename + (content ?
(strchr (filename + 4, ':') -
filename + 1) : 4));
if (filename != NULL)
try_to_select (current_panel,
filename + (content != NULL
? strchr (filename + 4, ':') - filename + 1 : 4));
}
else if (filename)
else if (filename != NULL)
do_cd (filename, cd_exact);
select_item (current_panel);
}
g_free (dirname);
g_free (filename);
break;
}
g_free (content);
dir_and_file_set = dirname && filename;
dir_and_file_set = (dirname != NULL) && (filename != NULL);
g_free (dirname);
g_free (filename);