mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
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:
parent
f5a93bf74c
commit
885b1b4f82
23
src/find.c
23
src/find.c
@ -1511,27 +1511,24 @@ do_find (void)
|
||||
|
||||
if (v == B_ENTER)
|
||||
{
|
||||
if (dirname || filename)
|
||||
if (dirname != NULL)
|
||||
{
|
||||
if (dirname)
|
||||
{
|
||||
do_cd (dirname, cd_exact);
|
||||
if (filename)
|
||||
try_to_select (current_panel, filename + (content ?
|
||||
(strchr (filename + 4, ':') -
|
||||
filename + 1) : 4));
|
||||
}
|
||||
else if (filename)
|
||||
do_cd (filename, cd_exact);
|
||||
select_item (current_panel);
|
||||
do_cd (dirname, cd_exact);
|
||||
if (filename != NULL)
|
||||
try_to_select (current_panel,
|
||||
filename + (content != NULL
|
||||
? strchr (filename + 4, ':') - filename + 1 : 4));
|
||||
}
|
||||
else if (filename != NULL)
|
||||
do_cd (filename, cd_exact);
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user