| File ChangeLog changed (mode: 100644) (index ba594000f..683ff5a98) |
| 250 |
250 |
Fixed ruler in view mode not growing in size to accommodate its content. |
Fixed ruler in view mode not growing in size to accommodate its content. |
| 251 |
251 |
Thanks to Dennis Preiser (a.k.a. 0xDP). |
Thanks to Dennis Preiser (a.k.a. 0xDP). |
| 252 |
252 |
|
|
|
253 |
|
Fixed startup commands being executed on loading sessions. Thanks to |
|
254 |
|
maxigaz. |
|
255 |
|
|
| 253 |
256 |
0.14-beta to 0.14 (2025-02-08) |
0.14-beta to 0.14 (2025-02-08) |
| 254 |
257 |
|
|
| 255 |
258 |
Improved documentation on zh/zl menu keys a bit. |
Improved documentation on zh/zl menu keys a bit. |
| File src/cmd_handlers.c changed (mode: 100644) (index 1f3752008..d48029512) |
| ... |
... |
restart_into_session(const char session[], RestartType type) |
| 4572 |
4572 |
{ |
{ |
| 4573 |
4573 |
state_load(type != RT_FULL); |
state_load(type != RT_FULL); |
| 4574 |
4574 |
result = 0; |
result = 0; |
|
4575 |
|
instance_finish_restart(/*run_startup_commands=*/1); |
| 4575 |
4576 |
} |
} |
| 4576 |
4577 |
else |
else |
| 4577 |
4578 |
{ |
{ |
| 4578 |
4579 |
result = sessions_load(session); |
result = sessions_load(session); |
|
4580 |
|
instance_finish_restart(/*run_startup_commands=*/0); |
| 4579 |
4581 |
} |
} |
| 4580 |
4582 |
|
|
| 4581 |
|
instance_finish_restart(); |
|
| 4582 |
4583 |
return result; |
return result; |
| 4583 |
4584 |
} |
} |
| 4584 |
4585 |
|
|
| File src/instance.c changed (mode: 100644) (index 9801868a0..b6f95855a) |
| ... |
... |
instance_start_restart(RestartType type) |
| 135 |
135 |
} |
} |
| 136 |
136 |
|
|
| 137 |
137 |
void |
void |
| 138 |
|
instance_finish_restart(void) |
|
|
138 |
|
instance_finish_restart(int run_startup_commands) |
| 139 |
139 |
{ |
{ |
| 140 |
140 |
flist_hist_save(&lwin); |
flist_hist_save(&lwin); |
| 141 |
141 |
flist_hist_save(&rwin); |
flist_hist_save(&rwin); |
| |
| ... |
... |
instance_finish_restart(void) |
| 155 |
155 |
instance_load_config(); |
instance_load_config(); |
| 156 |
156 |
plugs_load(curr_stats.plugs, curr_stats.plugins_dirs); |
plugs_load(curr_stats.plugs, curr_stats.plugins_dirs); |
| 157 |
157 |
|
|
| 158 |
|
vifm_reexec_startup_commands(); |
|
|
158 |
|
if(run_startup_commands) |
|
159 |
|
{ |
|
160 |
|
vifm_reexec_startup_commands(); |
|
161 |
|
} |
| 159 |
162 |
|
|
| 160 |
163 |
curr_stats.restart_in_progress = RT_NONE; |
curr_stats.restart_in_progress = RT_NONE; |
| 161 |
164 |
|
|
| File src/instance.h changed (mode: 100644) (index 2ae8fbe3f..baeb7f5a1) |
| ... |
... |
void instance_start_restart(RestartType type); |
| 35 |
35 |
/* Loads color scheme, processes configuration file and so on to finish restart. |
/* Loads color scheme, processes configuration file and so on to finish restart. |
| 36 |
36 |
* Does NOT load state of the application, it's expected to be done between |
* Does NOT load state of the application, it's expected to be done between |
| 37 |
37 |
* calls to instance_start_restart() and this function. */ |
* calls to instance_start_restart() and this function. */ |
| 38 |
|
void instance_finish_restart(void); |
|
|
38 |
|
void instance_finish_restart(int run_startup_commands); |
| 39 |
39 |
|
|
| 40 |
40 |
/* Loads configuration file taking care of anything that needs to be done before |
/* Loads configuration file taking care of anything that needs to be done before |
| 41 |
41 |
* or after it. */ |
* or after it. */ |
| File tests/commands/restart.c changed (mode: 100644) (index 32e8c86d4..b4c879ead) |
| 1 |
1 |
#include <stic.h> |
#include <stic.h> |
| 2 |
2 |
|
|
|
3 |
|
#include <stubs.h> |
| 3 |
4 |
#include <test-utils.h> |
#include <test-utils.h> |
| 4 |
5 |
|
|
| 5 |
6 |
#include "../../src/cfg/config.h" |
#include "../../src/cfg/config.h" |
| |
| ... |
... |
TEST(restart_resets_abbreviations) |
| 168 |
169 |
assert_false(vle_abbr_iter(&lhs, &rhs, &descr, &no_remap, &state)); |
assert_false(vle_abbr_iter(&lhs, &rhs, &descr, &no_remap, &state)); |
| 169 |
170 |
} |
} |
| 170 |
171 |
|
|
|
172 |
|
TEST(restart_runs_startup_commands) |
|
173 |
|
{ |
|
174 |
|
vifm_startup_commands_executed = 0; |
|
175 |
|
assert_success(cmds_dispatch1("restart", &lwin, CIT_COMMAND)); |
|
176 |
|
assert_true(vifm_startup_commands_executed); |
|
177 |
|
|
|
178 |
|
vifm_startup_commands_executed = 0; |
|
179 |
|
assert_success(cmds_dispatch1("restart full", &lwin, CIT_COMMAND)); |
|
180 |
|
assert_true(vifm_startup_commands_executed); |
|
181 |
|
} |
|
182 |
|
|
| 171 |
183 |
static void |
static void |
| 172 |
184 |
setup_tabs(void) |
setup_tabs(void) |
| 173 |
185 |
{ |
{ |
| File tests/commands/sessions.c changed (mode: 100644) (index 7ceceea1d..61b074de5) |
| 4 |
4 |
|
|
| 5 |
5 |
#include <stdlib.h> /* free() */ |
#include <stdlib.h> /* free() */ |
| 6 |
6 |
|
|
|
7 |
|
#include <stubs.h> |
| 7 |
8 |
#include <test-utils.h> |
#include <test-utils.h> |
| 8 |
9 |
|
|
| 9 |
10 |
#include "../../src/cfg/config.h" |
#include "../../src/cfg/config.h" |
| |
| ... |
... |
TEST(autocmd_is_called_for_all_pane_tabs) |
| 391 |
392 |
cfg.pane_tabs = 0; |
cfg.pane_tabs = 0; |
| 392 |
393 |
} |
} |
| 393 |
394 |
|
|
|
395 |
|
TEST(session_switch_doesnt_run_startup_commands) |
|
396 |
|
{ |
|
397 |
|
make_abs_path(cfg.config_dir, sizeof(cfg.config_dir), SANDBOX_PATH, "", NULL); |
|
398 |
|
cfg.session_options = VINFO_CHISTORY; |
|
399 |
|
|
|
400 |
|
assert_failure(cmds_dispatch1("session session", &lwin, CIT_COMMAND)); |
|
401 |
|
assert_failure(cmds_dispatch1("session other", &lwin, CIT_COMMAND)); |
|
402 |
|
|
|
403 |
|
ui_sb_msg(""); |
|
404 |
|
vifm_startup_commands_executed = 0; |
|
405 |
|
assert_failure(cmds_dispatch1("session session", &lwin, CIT_COMMAND)); |
|
406 |
|
assert_string_equal("Loaded session: session", ui_sb_last()); |
|
407 |
|
assert_false(vifm_startup_commands_executed); |
|
408 |
|
|
|
409 |
|
remove_file(SANDBOX_PATH "/sessions/session.json"); |
|
410 |
|
remove_file(SANDBOX_PATH "/sessions/other.json"); |
|
411 |
|
remove_dir(SANDBOX_PATH "/sessions"); |
|
412 |
|
remove_file(SANDBOX_PATH "/vifminfo.json"); |
|
413 |
|
} |
|
414 |
|
|
| 394 |
415 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
| 395 |
416 |
/* vim: set cinoptions+=t0 filetype=c : */ |
/* vim: set cinoptions+=t0 filetype=c : */ |
| File tests/misc/vifminfo.c changed (mode: 100644) (index 8a926d60a..5639ee834) |
| ... |
... |
TEST(size_of_dhistory_is_limited) |
| 489 |
489 |
/* Reload the state and config (which should be empty in tests). */ |
/* Reload the state and config (which should be empty in tests). */ |
| 490 |
490 |
instance_start_restart(RT_MOST); |
instance_start_restart(RT_MOST); |
| 491 |
491 |
state_load(0); |
state_load(0); |
| 492 |
|
instance_finish_restart(); |
|
|
492 |
|
instance_finish_restart(/*run_startup_commands=*/1); |
| 493 |
493 |
/* Verify that history was trimmed to the set limit. */ |
/* Verify that history was trimmed to the set limit. */ |
| 494 |
494 |
assert_int_equal(2, lwin.history_num); |
assert_int_equal(2, lwin.history_num); |
| 495 |
495 |
|
|