File ChangeLog changed (mode: 100644) (index 05801b06e..bf179fb51) |
61 |
61 |
|
|
62 |
62 |
Allowed descriptions for commands of `:fileviewer`. |
Allowed descriptions for commands of `:fileviewer`. |
63 |
63 |
|
|
|
64 |
|
Display an error on trying to switch from external preview to raw mode. |
|
65 |
|
|
64 |
66 |
Fixed 'trashdir' with "%r" on BSD-like systems (those with getmntinfo() |
Fixed 'trashdir' with "%r" on BSD-like systems (those with getmntinfo() |
65 |
67 |
instead of getmntent() API). The regression was apparently introduced in |
instead of getmntent() API). The regression was apparently introduced in |
66 |
68 |
v0.9.1-beta. Thanks to sublimal. |
v0.9.1-beta. Thanks to sublimal. |
File tests/misc/view_mode.c changed (mode: 100644) (index a116b8628..7d6b62f08) |
11 |
11 |
#include "../../src/modes/view.h" |
#include "../../src/modes/view.h" |
12 |
12 |
#include "../../src/modes/wk.h" |
#include "../../src/modes/wk.h" |
13 |
13 |
#include "../../src/ui/quickview.h" |
#include "../../src/ui/quickview.h" |
|
14 |
|
#include "../../src/ui/statusline.h" |
14 |
15 |
#include "../../src/ui/ui.h" |
#include "../../src/ui/ui.h" |
15 |
16 |
#include "../../src/utils/str.h" |
#include "../../src/utils/str.h" |
16 |
17 |
#include "../../src/utils/string_array.h" |
#include "../../src/utils/string_array.h" |
|
... |
... |
TEST(toggling_raw_mode) |
89 |
90 |
assert_false(modview_is_raw(lwin.vi)); |
assert_false(modview_is_raw(lwin.vi)); |
90 |
91 |
} |
} |
91 |
92 |
|
|
|
93 |
|
TEST(no_raw_mode_for_external_viewer) |
|
94 |
|
{ |
|
95 |
|
opt_handlers_setup(); |
|
96 |
|
curr_stats.number_of_windows = 2; |
|
97 |
|
make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), TEST_DATA_PATH, "read", |
|
98 |
|
NULL); |
|
99 |
|
populate_dir_list(&lwin, 0); |
|
100 |
|
|
|
101 |
|
int save_msg; |
|
102 |
|
rn_ext(&lwin, "echo 1", "title", MF_PREVIEW_OUTPUT | MF_NO_CACHE, /*pause=*/0, |
|
103 |
|
/*bg=*/0, &save_msg); |
|
104 |
|
(void)vle_keys_exec_timed_out(WK_C_w WK_w); |
|
105 |
|
assert_true(vle_mode_is(VIEW_MODE)); |
|
106 |
|
|
|
107 |
|
ui_sb_msg(""); |
|
108 |
|
(void)vle_keys_exec_timed_out(WK_i); |
|
109 |
|
assert_string_equal("No raw mode for an external viewer.", ui_sb_last()); |
|
110 |
|
|
|
111 |
|
qv_hide(); |
|
112 |
|
opt_handlers_teardown(); |
|
113 |
|
} |
|
114 |
|
|
92 |
115 |
TEST(switching_between_viewers) |
TEST(switching_between_viewers) |
93 |
116 |
{ |
{ |
94 |
117 |
assert_true(start_view_mode("*", "echo 1, echo 2, echo 3", TEST_DATA_PATH, |
assert_true(start_view_mode("*", "echo 1, echo 2, echo 3", TEST_DATA_PATH, |