File ChangeLog changed (mode: 100644) (index 082c0dc4c..697ce232a) |
14 |
14 |
Fixed quotes not being escaped on completion of option values via |
Fixed quotes not being escaped on completion of option values via |
15 |
15 |
`opt=<tab>`. |
`opt=<tab>`. |
16 |
16 |
|
|
|
17 |
|
Fixed output of :highlight command truncating names of some colors. |
|
18 |
|
|
17 |
19 |
0.13 to 0.14-beta (2025-01-19) |
0.13 to 0.14-beta (2025-01-19) |
18 |
20 |
|
|
19 |
21 |
Changed --with-gtk flag to --with-glib (old name is still available). GTK |
Changed --with-gtk flag to --with-glib (old name is still available). GTK |
File src/cmd_handlers.c changed (mode: 100644) (index e54450850..400d96a20) |
... |
... |
get_hi_str(const char title[], const col_attr_t *col) |
3162 |
3162 |
static char buf[512]; |
static char buf[512]; |
3163 |
3163 |
static char gui_buf[2*sizeof(buf)]; |
static char gui_buf[2*sizeof(buf)]; |
3164 |
3164 |
|
|
3165 |
|
char fg_buf[16], bg_buf[16]; |
|
|
3165 |
|
char fg_buf[32], bg_buf[32]; |
3166 |
3166 |
|
|
3167 |
3167 |
cs_color_to_str(col->fg, sizeof(fg_buf), fg_buf, /*is_gui=*/0); |
cs_color_to_str(col->fg, sizeof(fg_buf), fg_buf, /*is_gui=*/0); |
3168 |
3168 |
cs_color_to_str(col->bg, sizeof(bg_buf), bg_buf, /*is_gui=*/0); |
cs_color_to_str(col->bg, sizeof(bg_buf), bg_buf, /*is_gui=*/0); |
File tests/commands/highlight.c changed (mode: 100644) (index 53ce8ce0b..b05584188) |
1 |
1 |
#include <stic.h> |
#include <stic.h> |
2 |
2 |
|
|
3 |
3 |
#include <limits.h> /* INT_MAX */ |
#include <limits.h> /* INT_MAX */ |
|
4 |
|
#include <stdio.h> /* snprintf() */ |
4 |
5 |
#include <string.h> /* strcpy() */ |
#include <string.h> /* strcpy() */ |
5 |
6 |
|
|
6 |
7 |
#include <test-utils.h> |
#include <test-utils.h> |
|
... |
... |
TEARDOWN() |
39 |
40 |
|
|
40 |
41 |
/* General behaviour. */ |
/* General behaviour. */ |
41 |
42 |
|
|
42 |
|
TEST(all_colors_are_printed) |
|
|
43 |
|
TEST(all_groups_are_printed) |
43 |
44 |
{ |
{ |
44 |
45 |
/* On PDCurses A_STANDOUT == (A_REVERSE | A_BOLD). */ |
/* On PDCurses A_STANDOUT == (A_REVERSE | A_BOLD). */ |
45 |
46 |
#if __PDCURSES__ |
#if __PDCURSES__ |
|
... |
... |
TEST(all_colors_are_printed) |
118 |
119 |
|
|
119 |
120 |
/* Colors. */ |
/* Colors. */ |
120 |
121 |
|
|
|
122 |
|
TEST(all_xterm_colors_are_printed) |
|
123 |
|
{ |
|
124 |
|
size_t i; |
|
125 |
|
|
|
126 |
|
for(i = 0U; i < ARRAY_LEN(XTERM256_COLOR_NAMES); ++i) |
|
127 |
|
{ |
|
128 |
|
cfg.cs.color[WIN_COLOR].bg = i; |
|
129 |
|
cfg.cs.color[WIN_COLOR].fg = i; |
|
130 |
|
|
|
131 |
|
char expected[128]; |
|
132 |
|
snprintf(expected, sizeof(expected), |
|
133 |
|
"Win cterm=none ctermfg=%-7s ctermbg=%s", |
|
134 |
|
XTERM256_COLOR_NAMES[i], XTERM256_COLOR_NAMES[i]); |
|
135 |
|
|
|
136 |
|
ui_sb_msg(""); |
|
137 |
|
assert_failure(cmds_dispatch("hi Win", &lwin, CIT_COMMAND)); |
|
138 |
|
assert_string_equal(expected, ui_sb_last()); |
|
139 |
|
} |
|
140 |
|
} |
|
141 |
|
|
121 |
142 |
TEST(wrong_gui_color_causes_error) |
TEST(wrong_gui_color_causes_error) |
122 |
143 |
{ |
{ |
123 |
144 |
ui_sb_msg(""); |
ui_sb_msg(""); |