Mercurial > vim
annotate src/proto/map.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 |
rev | line source |
---|---|
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 /* map.c */ |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 mapblock_T *get_maphash_list(int state, int c); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 mapblock_T *get_buf_maphash_list(int state, int c); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 int is_maphash_valid(void); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 int do_map(int maptype, char_u *arg, int mode, int abbrev); |
29318
fcf524e1e97e
patch 9.0.0002: map functionality outside of map.c
Bram Moolenaar <Bram@vim.org>
parents:
29173
diff
changeset
|
6 void map_clear_mode(buf_T *buf, int mode, int local, int abbr); |
17946
ec4248c4b92c
patch 8.1.1969: popup window filter is used in all modes
Bram Moolenaar <Bram@vim.org>
parents:
17940
diff
changeset
|
7 int mode_str2flags(char_u *modechars); |
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 int map_to_exists(char_u *str, char_u *modechars, int abbr); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 int map_to_exists_mode(char_u *rhs, int mode, int abbr); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 char_u *set_context_in_map_cmd(expand_T *xp, char_u *cmd, char_u *arg, int forceit, int isabbrev, int isunmap, cmdidx_T cmdidx); |
28602
398c5b3211f9
patch 8.2.4825: can only get a list of mappings
Bram Moolenaar <Bram@vim.org>
parents:
28592
diff
changeset
|
11 int ExpandMappings(char_u *pat, regmatch_T *regmatch, int *numMatches, char_u ***matches); |
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 int check_abbr(int c, char_u *ptr, int col, int mincol); |
27061
1a56c0252772
patch 8.2.4059: Vim9: an expression of a map cannot access script-local items
Bram Moolenaar <Bram@vim.org>
parents:
25431
diff
changeset
|
13 char_u *eval_map_expr(mapblock_T *mp, int c); |
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 char_u *vim_strsave_escape_csi(char_u *p); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 void vim_unescape_csi(char_u *p); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 int makemap(FILE *fd, buf_T *buf); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 int put_escstr(FILE *fd, char_u *strstart, int what); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 void check_map_keycodes(void); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 char_u *check_map(char_u *keys, int mode, int exact, int ign_mod, int abbr, mapblock_T **mp_ptr, int *local_ptr); |
29318
fcf524e1e97e
patch 9.0.0002: map functionality outside of map.c
Bram Moolenaar <Bram@vim.org>
parents:
29173
diff
changeset
|
20 void f_hasmapto(typval_T *argvars, typval_T *rettv); |
28602
398c5b3211f9
patch 8.2.4825: can only get a list of mappings
Bram Moolenaar <Bram@vim.org>
parents:
28592
diff
changeset
|
21 void f_maplist(typval_T *argvars, typval_T *rettv); |
25431
634aed775408
patch 8.2.3252: duplicated code for adding buffer lines
Bram Moolenaar <Bram@vim.org>
parents:
20506
diff
changeset
|
22 void f_maparg(typval_T *argvars, typval_T *rettv); |
634aed775408
patch 8.2.3252: duplicated code for adding buffer lines
Bram Moolenaar <Bram@vim.org>
parents:
20506
diff
changeset
|
23 void f_mapcheck(typval_T *argvars, typval_T *rettv); |
20506
aee0b72ca6d6
patch 8.2.0807: cannot easily restore a mapping
Bram Moolenaar <Bram@vim.org>
parents:
17946
diff
changeset
|
24 void f_mapset(typval_T *argvars, typval_T *rettv); |
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 void init_mappings(void); |
29173
1ec1ba7e7728
patch 8.2.5106: default cmdwin mappings are re-mappable
Bram Moolenaar <Bram@vim.org>
parents:
28602
diff
changeset
|
26 void add_map(char_u *map, int mode, int nore); |
17940
079e10a49ea1
patch 8.1.1966: some code in options.c fits better elsewhere
Bram Moolenaar <Bram@vim.org>
parents:
17576
diff
changeset
|
27 int langmap_adjust_mb(int c); |
079e10a49ea1
patch 8.1.1966: some code in options.c fits better elsewhere
Bram Moolenaar <Bram@vim.org>
parents:
17576
diff
changeset
|
28 void langmap_init(void); |
31996
ca6bc7c04163
patch 9.0.1330: handling new value of an option has a long "else if" chain
Bram Moolenaar <Bram@vim.org>
parents:
29318
diff
changeset
|
29 char *did_set_langmap(optset_T *args); |
17576
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 void ex_abbreviate(exarg_T *eap); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 void ex_map(exarg_T *eap); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 void ex_unmap(exarg_T *eap); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 void ex_mapclear(exarg_T *eap); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 void ex_abclear(exarg_T *eap); |
97a750e8707f
patch 8.1.1785: map functionality mixed with character input
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 /* vim: set ft=c : */ |