| File ChangeLog changed (mode: 100644) (index 6c30ee582..d6a76a1a3) |
| 291 |
291 |
'previewoptions' lists non-default values for builtin directory preview. |
'previewoptions' lists non-default values for builtin directory preview. |
| 292 |
292 |
Thanks to Chris at Vifm Q2A site. |
Thanks to Chris at Vifm Q2A site. |
| 293 |
293 |
|
|
|
294 |
|
Fixed printing the value of 'previewoptions': remove trailing comma and |
|
295 |
|
fix "maxtreedepth:" and "graphicsdelay:" being mutually exclusive. |
|
296 |
|
|
| 294 |
297 |
0.14-beta to 0.14 (2025-02-08) |
0.14-beta to 0.14 (2025-02-08) |
| 295 |
298 |
|
|
| 296 |
299 |
Improved documentation on zh/zl menu keys a bit. |
Improved documentation on zh/zl menu keys a bit. |
| File src/opt_handlers.c changed (mode: 100644) (index 76cefebaa..65afbf505) |
| ... |
... |
init_previewoptions(optval_t *val) |
| 1306 |
1306 |
{ |
{ |
| 1307 |
1307 |
snprintf(buf + len, sizeof(buf) - len, "maxtreedepth:%d,", |
snprintf(buf + len, sizeof(buf) - len, "maxtreedepth:%d,", |
| 1308 |
1308 |
cfg.max_tree_depth); |
cfg.max_tree_depth); |
|
1309 |
|
len += strlen(buf + len); |
| 1309 |
1310 |
} |
} |
| 1310 |
1311 |
if(cfg.graphics_delay != 0) |
if(cfg.graphics_delay != 0) |
| 1311 |
1312 |
{ |
{ |
| 1312 |
1313 |
snprintf(buf + len, sizeof(buf) - len, "graphicsdelay:%d,", |
snprintf(buf + len, sizeof(buf) - len, "graphicsdelay:%d,", |
| 1313 |
1314 |
cfg.graphics_delay); |
cfg.graphics_delay); |
|
1315 |
|
len += strlen(buf + len); |
|
1316 |
|
} |
|
1317 |
|
|
|
1318 |
|
/* Remove trailing comma. */ |
|
1319 |
|
if(len > 0) |
|
1320 |
|
{ |
|
1321 |
|
buf[len - 1] = '\0'; |
| 1314 |
1322 |
} |
} |
| 1315 |
1323 |
|
|
| 1316 |
1324 |
val->str_val = buf; |
val->str_val = buf; |
| File tests/misc/options.c changed (mode: 100644) (index f4929d007..9bb084c2b) |
| ... |
... |
TEST(previewoptions) |
| 595 |
595 |
assert_false(cfg.hard_graphics_clear); |
assert_false(cfg.hard_graphics_clear); |
| 596 |
596 |
assert_int_equal(0, cfg.max_tree_depth); |
assert_int_equal(0, cfg.max_tree_depth); |
| 597 |
597 |
assert_false(cfg.top_tree_stats); |
assert_false(cfg.top_tree_stats); |
|
598 |
|
|
|
599 |
|
/* Verify that all possible values are printed back correctly. */ |
|
600 |
|
assert_success(cmds_dispatch("set previewoptions=hardgraphicsclear," |
|
601 |
|
"toptreestats,maxtreedepth:2,graphicsdelay:20", &lwin, CIT_COMMAND)); |
|
602 |
|
ui_sb_msg(""); |
|
603 |
|
assert_failure(cmds_dispatch("set previewoptions", &lwin, CIT_COMMAND)); |
|
604 |
|
assert_string_equal(" previewoptions=hardgraphicsclear,toptreestats," |
|
605 |
|
"maxtreedepth:2,graphicsdelay:20", ui_sb_last()); |
| 598 |
606 |
} |
} |
| 599 |
607 |
|
|
| 600 |
608 |
TEST(autocd) |
TEST(autocd) |