Mercurial > vim
annotate src/proto/term.pro @ 24039:a5478836fcb7 v8.2.2561
patch 8.2.2561: not all textprop code is covered by tests
Commit: https://github.com/vim/vim/commit/3dc3474f00e529b014add48f7f3d1dad2ec15498
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 2 13:36:47 2021 +0100
patch 8.2.2561: not all textprop code is covered by tests
Problem: Not all textprop code is covered by tests.
Solution: Add a few more test cases. (Dominique Pell?, closes https://github.com/vim/vim/issues/7908)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 02 Mar 2021 13:45:05 +0100 |
parents | 2616c5a337e0 |
children | 9299d21d1d5d |
rev | line source |
---|---|
7 | 1 /* term.c */ |
9027
773d627cac0b
commit https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162
Christian Brabandt <cb@256bit.org>
parents:
9013
diff
changeset
|
2 guicolor_T termgui_get_color(char_u *name); |
9939
ccb6461b82df
commit https://github.com/vim/vim/commit/1b58cdd160c2e0ada0f638679a2aa27e4665fc48
Christian Brabandt <cb@256bit.org>
parents:
9027
diff
changeset
|
3 guicolor_T termgui_mch_get_rgb(guicolor_T color); |
20836
2616c5a337e0
patch 8.2.0970: terminal properties are not available in Vim script
Bram Moolenaar <Bram@vim.org>
parents:
20768
diff
changeset
|
4 void init_term_props(int all); |
2616c5a337e0
patch 8.2.0970: terminal properties are not available in Vim script
Bram Moolenaar <Bram@vim.org>
parents:
20768
diff
changeset
|
5 void f_terminalprops(typval_T *argvars, typval_T *rettv); |
19997
3d1de9093c01
patch 8.2.0554: the GUI doesn't set t_Co
Bram Moolenaar <Bram@vim.org>
parents:
19405
diff
changeset
|
6 void set_color_count(int nr); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
7 int set_termname(char_u *term); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
8 void getlinecol(long *cp, long *rp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
9 int add_termcap_entry(char_u *name, int force); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
10 int term_is_8bit(char_u *name); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
11 int term_is_gui(char_u *name); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
12 char_u *tltoa(unsigned long i); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
13 void termcapinit(char_u *name); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
14 void out_flush(void); |
13150
808625d4b71b
patch 8.0.1449: slow redrawing with DirectX
Christian Brabandt <cb@256bit.org>
parents:
12640
diff
changeset
|
15 void out_flush_cursor(int force, int clear_selection); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
16 void out_flush_check(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
17 void out_trash(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
18 void out_char(unsigned c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
19 void out_str_nf(char_u *s); |
11601
0a5d405e2520
patch 8.0.0683: visual bell flashes too quickly
Christian Brabandt <cb@256bit.org>
parents:
11315
diff
changeset
|
20 void out_str_cf(char_u *s); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
21 void out_str(char_u *s); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
22 void term_windgoto(int row, int col); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
23 void term_cursor_right(int i); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
24 void term_append_lines(int line_count); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
25 void term_delete_lines(int line_count); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
26 void term_set_winpos(int x, int y); |
13379
0f9dd1b43244
patch 8.0.1563: timeout of getwinposx() can be too short
Christian Brabandt <cb@256bit.org>
parents:
13314
diff
changeset
|
27 int term_get_winpos(int *x, int *y, varnumber_T timeout); |
11745
5a5709918a98
patch 8.0.0755: terminal window does not have colors in the GUI
Christian Brabandt <cb@256bit.org>
parents:
11601
diff
changeset
|
28 void term_set_winsize(int height, int width); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
29 void term_fg_color(int n); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
30 void term_bg_color(int n); |
20619
68c206d3a251
patch 8.2.0863: cannot set a separate color for underline/undercurl
Bram Moolenaar <Bram@vim.org>
parents:
20450
diff
changeset
|
31 void term_ul_color(int n); |
18679
fd95d4dbeb37
patch 8.1.2331: the option.c file is still very big
Bram Moolenaar <Bram@vim.org>
parents:
18301
diff
changeset
|
32 char_u *term_bg_default(void); |
9939
ccb6461b82df
commit https://github.com/vim/vim/commit/1b58cdd160c2e0ada0f638679a2aa27e4665fc48
Christian Brabandt <cb@256bit.org>
parents:
9027
diff
changeset
|
33 void term_fg_rgb_color(guicolor_T rgb); |
ccb6461b82df
commit https://github.com/vim/vim/commit/1b58cdd160c2e0ada0f638679a2aa27e4665fc48
Christian Brabandt <cb@256bit.org>
parents:
9027
diff
changeset
|
34 void term_bg_rgb_color(guicolor_T rgb); |
20619
68c206d3a251
patch 8.2.0863: cannot set a separate color for underline/undercurl
Bram Moolenaar <Bram@vim.org>
parents:
20450
diff
changeset
|
35 void term_ul_rgb_color(guicolor_T rgb); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
36 void term_settitle(char_u *title); |
14479
3375a8cbb442
patch 8.1.0253: saving and restoring window title does not always work
Christian Brabandt <cb@256bit.org>
parents:
14461
diff
changeset
|
37 void term_push_title(int which); |
3375a8cbb442
patch 8.1.0253: saving and restoring window title does not always work
Christian Brabandt <cb@256bit.org>
parents:
14461
diff
changeset
|
38 void term_pop_title(int which); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
39 void ttest(int pairs); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
40 void add_long_to_buf(long_u val, char_u *dst); |
18150
0ec6521e9d80
patch 8.1.2070: mouse code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
18135
diff
changeset
|
41 int get_bytes_from_buf(char_u *buf, char_u *bytes, int num_bytes); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
42 void check_shellsize(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
43 void limit_screen_size(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
44 void win_new_shellsize(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
45 void shell_resized(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
46 void shell_resized_check(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
47 void set_shellsize(int width, int height, int mustset); |
20450
d5d89c24eec7
patch 8.2.0779: tmode_T not used everywhere
Bram Moolenaar <Bram@vim.org>
parents:
19997
diff
changeset
|
48 void settmode(tmode_T tmode); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
49 void starttermcap(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
50 void stoptermcap(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
51 void may_req_termresponse(void); |
20768
1e2e81dbb958
patch 8.2.0936: some terminals misinterpret the code for getting cursor style
Bram Moolenaar <Bram@vim.org>
parents:
20727
diff
changeset
|
52 void check_terminal_behavior(void); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
53 void may_req_bg_color(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
54 int swapping_screen(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
55 void scroll_start(void); |
14581
bb02e9e33026
patch 8.1.0304: no redraw when using a STOP signal on Vim and then CONT
Christian Brabandt <cb@256bit.org>
parents:
14577
diff
changeset
|
56 void cursor_on_force(void); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
57 void cursor_on(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
58 void cursor_off(void); |
12076
ca4931a20f8c
patch 8.0.0918: cannot get terminal window cursor shape or attributes
Christian Brabandt <cb@256bit.org>
parents:
11745
diff
changeset
|
59 void term_cursor_mode(int forced); |
ca4931a20f8c
patch 8.0.0918: cannot get terminal window cursor shape or attributes
Christian Brabandt <cb@256bit.org>
parents:
11745
diff
changeset
|
60 void term_cursor_color(char_u *color); |
12259
48eac9bc2f82
patch 8.0.1009: Xterm cursor blinking status may be inverted
Christian Brabandt <cb@256bit.org>
parents:
12186
diff
changeset
|
61 int blink_state_is_inverted(void); |
12076
ca4931a20f8c
patch 8.0.0918: cannot get terminal window cursor shape or attributes
Christian Brabandt <cb@256bit.org>
parents:
11745
diff
changeset
|
62 void term_cursor_shape(int shape, int blink); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
63 void scroll_region_set(win_T *wp, int off); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
64 void scroll_region_reset(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
65 void clear_termcodes(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
66 void add_termcode(char_u *name, char_u *string, int flags); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
67 char_u *find_termcode(char_u *name); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
68 char_u *get_termcode(int i); |
18150
0ec6521e9d80
patch 8.1.2070: mouse code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
18135
diff
changeset
|
69 int get_termcode_len(int idx); |
18135
1868ec23360e
patch 8.1.2062: the mouse code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
70 void del_termcode(char_u *name); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
71 void set_mouse_topline(win_T *wp); |
18150
0ec6521e9d80
patch 8.1.2070: mouse code is spread out
Bram Moolenaar <Bram@vim.org>
parents:
18135
diff
changeset
|
72 int is_mouse_topline(win_T *wp); |
20727
5ffe112b1afd
patch 8.2.0916: mapping with partly modifyOtherKeys code does not work
Bram Moolenaar <Bram@vim.org>
parents:
20619
diff
changeset
|
73 int put_string_in_typebuf(int offset, int slen, char_u *string, int new_slen, char_u *buf, int bufsize, int *buflen); |
18717
14d2a210fab1
patch 8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys
Bram Moolenaar <Bram@vim.org>
parents:
18679
diff
changeset
|
74 int decode_modifiers(int n); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
75 int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen); |
12640
a715f0b44532
patch 8.0.1198: older compilers don't know uint8_t
Christian Brabandt <cb@256bit.org>
parents:
12632
diff
changeset
|
76 void term_get_fg_color(char_u *r, char_u *g, char_u *b); |
a715f0b44532
patch 8.0.1198: older compilers don't know uint8_t
Christian Brabandt <cb@256bit.org>
parents:
12632
diff
changeset
|
77 void term_get_bg_color(char_u *r, char_u *g, char_u *b); |
18301
506bf60a30a0
patch 8.1.2145: cannot map <C-H> when modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents:
18150
diff
changeset
|
78 char_u *replace_termcodes(char_u *from, char_u **bufp, int flags, int *did_simplify); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
79 void show_termcodes(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
80 int show_one_termcode(char_u *name, char_u *code, int printit); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6874
diff
changeset
|
81 void update_tcap(int attr); |
13314
65c3e8259124
patch 8.0.1531: cannot use 24 bit colors in MS-Windows console
Christian Brabandt <cb@256bit.org>
parents:
13150
diff
changeset
|
82 void swap_tcap(void); |
9013
22c29a515b53
commit https://github.com/vim/vim/commit/ab3022196ea4f1496e79b8ee85996e31c45d02f1
Christian Brabandt <cb@256bit.org>
parents:
8969
diff
changeset
|
83 guicolor_T gui_get_color_cmn(char_u *name); |
11745
5a5709918a98
patch 8.0.0755: terminal window does not have colors in the GUI
Christian Brabandt <cb@256bit.org>
parents:
11601
diff
changeset
|
84 guicolor_T gui_get_rgb_color_cmn(int r, int g, int b); |
13839
ca8953d36264
patch 8.0.1791: using uint8_t does not work everywhere
Christian Brabandt <cb@256bit.org>
parents:
13823
diff
changeset
|
85 void cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx); |
19405
08f4dc2ba716
patch 8.2.0260: several lines of code are duplicated
Bram Moolenaar <Bram@vim.org>
parents:
19178
diff
changeset
|
86 void term_replace_bs_del_keycode(char_u *ta_buf, int ta_len, int len); |
7 | 87 /* vim: set ft=c : */ |