Mercurial > vim
annotate src/proto/memline.pro @ 34571:fdd232ab72ea v9.1.0184
patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap
Commit: https://github.com/vim/vim/commit/d0c1b7723f7e73763597af2f97a53d94ab7ed020
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat Mar 16 15:03:33 2024 +0100
patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap
Problem: Cursor position wrong when clicking with conceal and wrap.
Solution: Use the virtual column of the last char for ScreenCols[] in
boguscols. Remove use of MAXCOL in ScreenCols[]. Rename
third argument of wlv_screen_line() to "clear_end" as that's
clearer what it does (zeertzjq).
related: 14192
closes: #14200
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 16 Mar 2024 15:15:04 +0100 |
parents | 9e093c96dff6 |
children | 004a419cc521 |
rev | line source |
---|---|
7 | 1 /* memline.c */ |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
2 int ml_open(buf_T *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
3 void ml_set_crypt_key(buf_T *buf, char_u *old_key, char_u *old_cm); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
4 void ml_setname(buf_T *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
5 void ml_open_files(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
6 void ml_open_file(buf_T *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
7 void check_need_swap(int newfile); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
8 void ml_close(buf_T *buf, int del_file); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
9 void ml_close_all(int del_file); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
10 void ml_close_notmod(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
11 void ml_timestamp(buf_T *buf); |
16738
b52ea9c5f1db
patch 8.1.1371: cannot recover from a swap file
Bram Moolenaar <Bram@vim.org>
parents:
16621
diff
changeset
|
12 void ml_recover(int checkext); |
31347
56a2af8c0980
patch 9.0.1007: there is no way to get a list of swap file names
Bram Moolenaar <Bram@vim.org>
parents:
20599
diff
changeset
|
13 int recover_names(char_u *fname, int do_list, list_T *ret_list, int nr, char_u **fname_out); |
14599
72d6f6f7ead7
patch 8.1.0313: information about a swap file is unavailable
Christian Brabandt <cb@256bit.org>
parents:
14475
diff
changeset
|
14 char_u *make_percent_swname(char_u *dir, char_u *name); |
72d6f6f7ead7
patch 8.1.0313: information about a swap file is unavailable
Christian Brabandt <cb@256bit.org>
parents:
14475
diff
changeset
|
15 void get_b0_dict(char_u *fname, dict_T *d); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
16 void ml_sync_all(int check_file, int check_char); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
17 void ml_preserve(buf_T *buf, int message); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
18 char_u *ml_get(linenr_T lnum); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
19 char_u *ml_get_pos(pos_T *pos); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
20 char_u *ml_get_curline(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
21 char_u *ml_get_cursor(void); |
34434
89f9a7925fff
patch 9.1.0138: too many STRLEN calls when getting a memline
Christian Brabandt <cb@256bit.org>
parents:
31347
diff
changeset
|
22 colnr_T ml_get_len(linenr_T lnum); |
34540
9e093c96dff6
patch 9.1.0172: More code can use ml_get_buf_len() instead of STRLEN()
Christian Brabandt <cb@256bit.org>
parents:
34434
diff
changeset
|
23 colnr_T ml_get_pos_len(pos_T *pos); |
34434
89f9a7925fff
patch 9.1.0138: too many STRLEN calls when getting a memline
Christian Brabandt <cb@256bit.org>
parents:
31347
diff
changeset
|
24 colnr_T ml_get_curline_len(void); |
89f9a7925fff
patch 9.1.0138: too many STRLEN calls when getting a memline
Christian Brabandt <cb@256bit.org>
parents:
31347
diff
changeset
|
25 colnr_T ml_get_cursor_len(void); |
89f9a7925fff
patch 9.1.0138: too many STRLEN calls when getting a memline
Christian Brabandt <cb@256bit.org>
parents:
31347
diff
changeset
|
26 colnr_T ml_get_buf_len(buf_T *buf, linenr_T lnum); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
27 char_u *ml_get_buf(buf_T *buf, linenr_T lnum, int will_change); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
28 int ml_line_alloced(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
29 int ml_append(linenr_T lnum, char_u *line, colnr_T len, int newfile); |
20581
e529690f27bc
patch 8.2.0844: text properties crossing lines not handled correctly
Bram Moolenaar <Bram@vim.org>
parents:
19396
diff
changeset
|
30 int ml_append_flags(linenr_T lnum, char_u *line, colnr_T len, int flags); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
31 int ml_append_buf(buf_T *buf, linenr_T lnum, char_u *line, colnr_T len, int newfile); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
32 int ml_replace(linenr_T lnum, char_u *line, int copy); |
15361
58b125df3e9b
patch 8.1.0688: text properties are not restored by undo
Bram Moolenaar <Bram@vim.org>
parents:
15138
diff
changeset
|
33 int ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int has_props, int copy); |
20599
d571231175b4
patch 8.2.0853: ml_delete() often called with FALSE argument
Bram Moolenaar <Bram@vim.org>
parents:
20581
diff
changeset
|
34 int ml_delete(linenr_T lnum); |
20581
e529690f27bc
patch 8.2.0844: text properties crossing lines not handled correctly
Bram Moolenaar <Bram@vim.org>
parents:
19396
diff
changeset
|
35 int ml_delete_flags(linenr_T lnum, int flags); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
36 void ml_setmarked(linenr_T lnum); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
37 linenr_T ml_firstmarked(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
38 void ml_clearmarked(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
39 int resolve_symlink(char_u *fname, char_u *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
40 char_u *makeswapname(char_u *fname, char_u *ffname, buf_T *buf, char_u *dir_name); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
41 char_u *get_file_in_dir(char_u *fname, char_u *dname); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
42 void ml_setflags(buf_T *buf); |
9387
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
7668
diff
changeset
|
43 char_u *ml_encrypt_data(memfile_T *mfp, char_u *data, off_T offset, unsigned size); |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
7668
diff
changeset
|
44 void ml_decrypt_data(memfile_T *mfp, char_u *data, off_T offset, unsigned size); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
45 long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6817
diff
changeset
|
46 void goto_byte(long cnt); |
7 | 47 /* vim: set ft=c : */ |