diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-01-22 10:00:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 10:00:11 +0800 |
commit | 8c6de9147cabbf99d18afbdbed2f11f30c1d0dfc (patch) | |
tree | b05e873236f53b2b9dc244c00f538eb47f45ab2f /src/nvim/mbyte_defs.h | |
parent | a25aeee856e2fb02f93ffa5c2e5d43fd75ead2cf (diff) | |
parent | fd08de4b85ae42fe3ad5b480b58df9f7fff76269 (diff) | |
download | rneovim-8c6de9147cabbf99d18afbdbed2f11f30c1d0dfc.tar.gz rneovim-8c6de9147cabbf99d18afbdbed2f11f30c1d0dfc.tar.bz2 rneovim-8c6de9147cabbf99d18afbdbed2f11f30c1d0dfc.zip |
Merge pull request #26813 from VanaIgr/screen-pos-speedup
perf: make screen size and position calculations more efficient
N/A patches for version.c:
vim-patch:9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol
vim-patch:9.1.0038: Unnecessary loop in getvcol()
Diffstat (limited to 'src/nvim/mbyte_defs.h')
-rw-r--r-- | src/nvim/mbyte_defs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/mbyte_defs.h b/src/nvim/mbyte_defs.h index efb4f558a6..97aa1a638b 100644 --- a/src/nvim/mbyte_defs.h +++ b/src/nvim/mbyte_defs.h @@ -1,6 +1,7 @@ #pragma once #include <stdbool.h> +#include <stdint.h> #include "nvim/iconv_defs.h" @@ -55,3 +56,13 @@ typedef struct { bool vc_fail; ///< What to do with invalid characters: if true, fail, ///< otherwise use '?'. } vimconv_T; + +typedef struct { + int32_t value; ///< code point + int len; ///< length in bytes +} CharInfo; + +typedef struct { + char *ptr; ///< pointer to the first byte of the character + CharInfo chr; ///< the character +} StrCharInfo; |