File ChangeLog changed (mode: 100644) (index ee0b8646c..3c26734a1) |
125 |
125 |
|
|
126 |
126 |
Fixed escaping characters with codes greater than 127 producing garbage. |
Fixed escaping characters with codes greater than 127 producing garbage. |
127 |
127 |
|
|
|
128 |
|
Fixed printing newline on cancelling choosing a directory via |
|
129 |
|
`--choose-dir` option. Thanks to The Cyberduck. |
|
130 |
|
|
128 |
131 |
0.14-beta to 0.14 (2025-02-08) |
0.14-beta to 0.14 (2025-02-08) |
129 |
132 |
|
|
130 |
133 |
Improved documentation on zh/zl menu keys a bit. |
Improved documentation on zh/zl menu keys a bit. |
File src/int/vim.c changed (mode: 100644) (index 1475c6bcb..d24b915c3) |
... |
... |
vim_write_dir(const char path[]) |
345 |
345 |
|
|
346 |
346 |
if(strcmp(dir_out, "-") == 0) |
if(strcmp(dir_out, "-") == 0) |
347 |
347 |
{ |
{ |
348 |
|
fputs(path, curr_stats.original_stdout); |
|
349 |
|
putc('\n', curr_stats.original_stdout); |
|
|
348 |
|
if(strcmp(path, "") != 0) |
|
349 |
|
{ |
|
350 |
|
fputs(path, curr_stats.original_stdout); |
|
351 |
|
putc('\n', curr_stats.original_stdout); |
|
352 |
|
} |
350 |
353 |
return; |
return; |
351 |
354 |
} |
} |
352 |
355 |
|
|
|
... |
... |
vim_write_dir(const char path[]) |
357 |
360 |
return; |
return; |
358 |
361 |
} |
} |
359 |
362 |
|
|
360 |
|
fputs(path, fp); |
|
361 |
|
putc('\n', fp); |
|
|
363 |
|
if(strcmp(path, "") != 0) |
|
364 |
|
{ |
|
365 |
|
fputs(path, fp); |
|
366 |
|
putc('\n', fp); |
|
367 |
|
} |
362 |
368 |
fclose(fp); |
fclose(fp); |
363 |
369 |
} |
} |
364 |
370 |
|
|
File tests/misc/integration.c changed (mode: 100644) (index 5605fadfa..c261e566b) |
... |
... |
TEARDOWN() |
40 |
40 |
/* Because of fmemopen(). */ |
/* Because of fmemopen(). */ |
41 |
41 |
#if !defined(_WIN32) && !defined(__APPLE__) |
#if !defined(_WIN32) && !defined(__APPLE__) |
42 |
42 |
|
|
|
43 |
|
TEST(writing_no_dir_choice_on_stdout_omits_newline) |
|
44 |
|
{ |
|
45 |
|
char out_buf[100] = { }; |
|
46 |
|
char out_spec[] = "-"; |
|
47 |
|
|
|
48 |
|
curr_stats.chosen_dir_out = out_spec; |
|
49 |
|
curr_stats.original_stdout = fmemopen(out_buf, sizeof(out_buf), "w"); |
|
50 |
|
|
|
51 |
|
vim_write_dir(""); |
|
52 |
|
|
|
53 |
|
fclose(curr_stats.original_stdout); |
|
54 |
|
curr_stats.original_stdout = NULL; |
|
55 |
|
curr_stats.chosen_dir_out = NULL; |
|
56 |
|
|
|
57 |
|
assert_string_equal("", out_buf); |
|
58 |
|
} |
|
59 |
|
|
43 |
60 |
TEST(writing_directory_on_stdout_prints_newline) |
TEST(writing_directory_on_stdout_prints_newline) |
44 |
61 |
{ |
{ |
45 |
62 |
char out_buf[100] = { }; |
char out_buf[100] = { }; |
|
... |
... |
TEST(writing_directory_on_stdout_prints_newline) |
57 |
74 |
assert_string_equal("/some/path\n", out_buf); |
assert_string_equal("/some/path\n", out_buf); |
58 |
75 |
} |
} |
59 |
76 |
|
|
|
77 |
|
TEST(writing_no_dir_choice_to_a_file_omits_newline) |
|
78 |
|
{ |
|
79 |
|
char out_buf[100] = { }; |
|
80 |
|
char out_spec[] = SANDBOX_PATH "/out"; |
|
81 |
|
|
|
82 |
|
curr_stats.chosen_dir_out = out_spec; |
|
83 |
|
curr_stats.original_stdout = fmemopen(out_buf, sizeof(out_buf), "w"); |
|
84 |
|
|
|
85 |
|
vim_write_dir(""); |
|
86 |
|
|
|
87 |
|
fclose(curr_stats.original_stdout); |
|
88 |
|
curr_stats.original_stdout = NULL; |
|
89 |
|
curr_stats.chosen_dir_out = NULL; |
|
90 |
|
|
|
91 |
|
assert_int_equal(0, get_file_size(out_spec)); |
|
92 |
|
remove_file(out_spec); |
|
93 |
|
} |
|
94 |
|
|
60 |
95 |
TEST(writing_directory_to_a_file_prints_newline) |
TEST(writing_directory_to_a_file_prints_newline) |
61 |
96 |
{ |
{ |
62 |
97 |
char out_buf[100] = { }; |
char out_buf[100] = { }; |