File src/filelist.c changed (mode: 100644) (index 5bf88cea6..a27d8153b) |
... |
... |
change_directory(FileView *view, const char *directory) |
1293 |
1293 |
char newdir[PATH_MAX]; |
char newdir[PATH_MAX]; |
1294 |
1294 |
char dir_dup[PATH_MAX]; |
char dir_dup[PATH_MAX]; |
1295 |
1295 |
|
|
1296 |
|
save_view_history(view, NULL, NULL, -1); |
|
|
1296 |
|
if(view->dir_entry[0].name[0] != '\0') |
|
1297 |
|
{ |
|
1298 |
|
save_view_history(view, NULL, NULL, -1); |
|
1299 |
|
} |
1297 |
1300 |
|
|
1298 |
1301 |
#ifdef _WIN32 |
#ifdef _WIN32 |
1299 |
1302 |
directory = handle_mount_points(directory); |
directory = handle_mount_points(directory); |
|
... |
... |
change_directory(FileView *view, const char *directory) |
1414 |
1417 |
/* Save the directory modified time to check for file changes */ |
/* Save the directory modified time to check for file changes */ |
1415 |
1418 |
update_dir_mtime(view); |
update_dir_mtime(view); |
1416 |
1419 |
|
|
1417 |
|
save_view_history(view, NULL, "", -1); |
|
|
1420 |
|
if(view->dir_entry[0].name[0] != '\0') |
|
1421 |
|
{ |
|
1422 |
|
save_view_history(view, NULL, "", -1); |
|
1423 |
|
} |
1418 |
1424 |
return 0; |
return 0; |
1419 |
1425 |
} |
} |
1420 |
1426 |
|
|
File src/ui.c changed (mode: 100644) (index a83f1b584..b2b2c1304) |
... |
... |
change_window(void) |
1248 |
1248 |
update_view_title(other_view); |
update_view_title(other_view); |
1249 |
1249 |
} |
} |
1250 |
1250 |
|
|
1251 |
|
if(curr_stats.view) |
|
|
1251 |
|
if(curr_stats.view && curr_view->dir_entry[0].name[0] == '\0') |
1252 |
1252 |
{ |
{ |
1253 |
|
if(change_directory(other_view, other_view->curr_dir) >= 0) |
|
1254 |
|
load_dir_list(other_view, 1); |
|
1255 |
1253 |
if(change_directory(curr_view, curr_view->curr_dir) >= 0) |
if(change_directory(curr_view, curr_view->curr_dir) >= 0) |
1256 |
|
load_dir_list(curr_view, 1); |
|
|
1254 |
|
{ |
|
1255 |
|
load_dir_list(curr_view, 0); |
|
1256 |
|
move_to_list_pos(curr_view, curr_view->list_pos); |
|
1257 |
|
} |
1257 |
1258 |
} |
} |
1258 |
1259 |
|
|
1259 |
1260 |
update_view_title(curr_view); |
update_view_title(curr_view); |
File src/vifm.c changed (mode: 100644) (index cae6d321a..35afab96f) |
... |
... |
load_initial_directory(FileView *view, const char *dir) |
160 |
160 |
view->dir_entry = (dir_entry_t *)malloc(sizeof(dir_entry_t)); |
view->dir_entry = (dir_entry_t *)malloc(sizeof(dir_entry_t)); |
161 |
161 |
memset(view->dir_entry, 0, sizeof(dir_entry_t)); |
memset(view->dir_entry, 0, sizeof(dir_entry_t)); |
162 |
162 |
|
|
163 |
|
view->dir_entry[0].name = malloc(sizeof("../") + 1); |
|
164 |
|
strcpy(view->dir_entry[0].name, "../"); |
|
|
163 |
|
view->dir_entry[0].name = strdup(""); |
165 |
164 |
view->dir_entry[0].type = DIRECTORY; |
view->dir_entry[0].type = DIRECTORY; |
166 |
165 |
|
|
167 |
166 |
view->list_rows = 1; |
view->list_rows = 1; |