xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 364cca5ca0f17db2a8b388302c11484eba0ffb3c

Test for when :view cannot activate quickview
Author: xaizek
Author date (UTC): 2025-09-02 21:32
Committer name: xaizek
Committer date (UTC): 2025-09-03 08:57
Parent(s): 27745820edd3a1802f2191f3dbb5f7e4daa4a013
Signing key: 99DC5E4DB05F6BE2
Tree: 401ab37dbd7408c05a371cbdae204da3d8909327
File Lines added Lines deleted
src/cmd_handlers.c 1 0
tests/commands/misc.c 7 0
File src/cmd_handlers.c changed (mode: 100644) (index b99cd3c8a..7767adc49)
... ... view_cmd(const cmd_info_t *cmd_info)
5371 5371 { {
5372 5372 if((!curr_stats.preview.on || cmd_info->emark) && !qv_can_show()) if((!curr_stats.preview.on || cmd_info->emark) && !qv_can_show())
5373 5373 { {
5374 /* qv_can_show() printed the error. */
5374 5375 return CMDS_ERR_CUSTOM; return CMDS_ERR_CUSTOM;
5375 5376 } }
5376 5377 if(curr_stats.preview.on && cmd_info->emark) if(curr_stats.preview.on && cmd_info->emark)
File tests/commands/misc.c changed (mode: 100644) (index 1c2ff31b9..dbcc4daa9)
... ... TEST(view_command)
506 506 assert_success(cmds_dispatch("view", &lwin, CIT_COMMAND)); assert_success(cmds_dispatch("view", &lwin, CIT_COMMAND));
507 507 assert_false(curr_stats.preview.on); assert_false(curr_stats.preview.on);
508 508
509 curr_stats.number_of_windows = 1;
510 ui_sb_msg("");
511 assert_failure(cmds_dispatch("view", &lwin, CIT_COMMAND));
512 assert_false(curr_stats.preview.on);
513 assert_string_equal("Cannot view files in one window mode", ui_sb_last());
514 curr_stats.number_of_windows = 2;
515
509 516 /* Reordering viewers. */ /* Reordering viewers. */
510 517
511 518 ui_sb_msg(""); ui_sb_msg("");
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master