Mercurial > vim
annotate src/proto/insexpand.pro @ 34686:83875247fbc0 v9.1.0224
patch 9.1.0224: cursor may move too many lines over "right" & "below" virt text
Commit: https://github.com/vim/vim/commit/515f734e687f28f7199b2a8042197624d9f3ec15
Author: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Date: Thu Mar 28 12:01:14 2024 +0100
patch 9.1.0224: cursor may move too many lines over "right" & "below" virt text
Problem: If a line has "right" & "below" virtual text properties,
where the "below" property may be stored first due to lack of
ordering between them, then the line height is calculated to
be 1 more and causes the cursor to far over the line.
Solution: Remove some unnecessary setting of a
`next_right_goes_below = TRUE` flag for "below" and "above"
text properties. (Dylan Thacker-Smith)
I modified a regression test I recently added to cover this case,
leveraging the fact that "after", "right" & "below" text properties are
being stored in the reverse of the order they are added in. The
previous version of this regression test was crafted to workaround this
issue so it can be addressed by this separate patch.
closes: #14317
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 28 Mar 2024 12:15:03 +0100 |
parents | ca6bc7c04163 |
children | 5c4e1b16db10 |
rev | line source |
---|---|
16142
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 /* insexpand.c */ |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 void ins_ctrl_x(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 int ctrl_x_mode_none(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 int ctrl_x_mode_normal(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 int ctrl_x_mode_scroll(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 int ctrl_x_mode_whole_line(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 int ctrl_x_mode_files(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 int ctrl_x_mode_tags(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 int ctrl_x_mode_path_patterns(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 int ctrl_x_mode_path_defines(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
11 int ctrl_x_mode_dictionary(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 int ctrl_x_mode_thesaurus(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 int ctrl_x_mode_cmdline(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 int ctrl_x_mode_function(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 int ctrl_x_mode_omni(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 int ctrl_x_mode_spell(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 int ctrl_x_mode_line_or_eval(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 int ctrl_x_mode_not_default(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 int ctrl_x_mode_not_defined_yet(void); |
26944
8dbdd68627bd
patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents:
26518
diff
changeset
|
20 int compl_status_adding(void); |
8dbdd68627bd
patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents:
26518
diff
changeset
|
21 int compl_status_sol(void); |
8dbdd68627bd
patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents:
26518
diff
changeset
|
22 int compl_status_local(void); |
8dbdd68627bd
patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents:
26518
diff
changeset
|
23 void compl_status_clear(void); |
16142
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 int has_compl_option(int dict_opt); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 int vim_is_ctrl_x_key(int c); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 int ins_compl_accept_char(int c); |
16239
5df26b29e809
patch 8.1.1124: insert completion flags are mixed up
Bram Moolenaar <Bram@vim.org>
parents:
16142
diff
changeset
|
27 int ins_compl_add_infercase(char_u *str_arg, int len, int icase, char_u *fname, int dir, int cont_s_ipos); |
16142
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 int ins_compl_has_shown_match(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 int ins_compl_long_shown_match(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 void completeopt_was_set(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 int pum_wanted(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 void ins_compl_show_pum(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 char_u *find_word_start(char_u *ptr); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 char_u *find_word_end(char_u *ptr); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 void ins_compl_clear(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 int ins_compl_active(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 int ins_compl_used_match(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 void ins_compl_init_get_longest(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 int ins_compl_interrupted(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 int ins_compl_enter_selects(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 colnr_T ins_compl_col(void); |
26944
8dbdd68627bd
patch 8.2.4001: insert complete code uses global variables
Bram Moolenaar <Bram@vim.org>
parents:
26518
diff
changeset
|
42 int ins_compl_len(void); |
16142
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 int ins_compl_bs(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 void ins_compl_addleader(int c); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 void ins_compl_addfrommatch(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 int ins_compl_prep(int c); |
31996
ca6bc7c04163
patch 9.0.1330: handling new value of an option has a long "else if" chain
Bram Moolenaar <Bram@vim.org>
parents:
31859
diff
changeset
|
47 char *did_set_completefunc(optset_T *args); |
26388
8aba638e91eb
patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents:
17704
diff
changeset
|
48 void set_buflocal_cfu_callback(buf_T *buf); |
31996
ca6bc7c04163
patch 9.0.1330: handling new value of an option has a long "else if" chain
Bram Moolenaar <Bram@vim.org>
parents:
31859
diff
changeset
|
49 char *did_set_omnifunc(optset_T *args); |
26388
8aba638e91eb
patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Bram Moolenaar <Bram@vim.org>
parents:
17704
diff
changeset
|
50 void set_buflocal_ofu_callback(buf_T *buf); |
31996
ca6bc7c04163
patch 9.0.1330: handling new value of an option has a long "else if" chain
Bram Moolenaar <Bram@vim.org>
parents:
31859
diff
changeset
|
51 char *did_set_thesaurusfunc(optset_T *args); |
26518
13ba00ef7687
patch 8.2.3788: lambda for option that is a function may be freed
Bram Moolenaar <Bram@vim.org>
parents:
26388
diff
changeset
|
52 int set_ref_in_insexpand_funcs(int copyID); |
17704 | 53 void f_complete(typval_T *argvars, typval_T *rettv); |
54 void f_complete_add(typval_T *argvars, typval_T *rettv); | |
55 void f_complete_check(typval_T *argvars, typval_T *rettv); | |
56 void f_complete_info(typval_T *argvars, typval_T *rettv); | |
16142
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
57 void ins_compl_delete(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 void ins_compl_insert(int in_compl_func); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 void ins_compl_check_keys(int frequency, int in_compl_func); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
60 int ins_complete(int c, int enable_pum); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
61 void free_insexpand_stuff(void); |
570a296aa0b4
patch 8.1.1076: file for Insert mode is much too big
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
62 /* vim: set ft=c : */ |