aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte.c
Commit message (Collapse)AuthorAge
...
* Merge pull request #20821 from dundargoc/refactor/clang-tidybfredl2022-11-08
|\ | | | | refactor: fix clang-tidy warnings
| * refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | | | | | | | | | Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
* | refactor: more clint (#20910)Lewis Russell2022-11-07
|/
* build(lint): remove clint.py rules for braces #20880dundargoc2022-11-01
| | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. See also https://github.com/neovim/neovim/pull/18563
* refactor: clang-tidy fixes to silence clangd warning (#20683)dundargoc2022-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | * refactor: readability-uppercase-literal-suffix * refactor: readability-named-parameter * refactor: bugprone-suspicious-string-compare * refactor: google-readability-casting * refactor: readability-redundant-control-flow * refactor: bugprone-too-small-loop-variable * refactor: readability-non-const-parameter * refactor: readability-avoid-const-params-in-decls * refactor: google-readability-todo * refactor: readability-inconsistent-declaration-parameter-name * refactor: bugprone-suspicious-missing-comma * refactor: remove noisy or slow warnings
* vim-patch:8.1.0941: macros for MS-Windows are inconsistent (#20215)dundargoc2022-09-18
| | | | | | | Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
* Merge pull request #20164 from bfredl/luanullbfredl2022-09-13
|\ | | | | fix(lua): make vim.str_utfindex and vim.str_byteindex handle NUL bytes
| * fix(lua): make vim.str_utfindex and vim.str_byteindex handle NUL bytesbfredl2022-09-13
| | | | | | | | fixes #16290
* | Merge pull request #20077 from dundargoc/refactor/char_u/11bfredl2022-09-12
|\ \ | |/ |/| refactor: replace char_u with char 11: remove `STRLEN` part 1
| * refactor: replace char_u with charDundar Göc2022-09-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | vim-patch:8.2.2664: Vim9: not enough function arguments checked for stringzeertzjq2022-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: not enough function arguments checked for string. Solution: Check in balloon functions. Refactor function arguments. https://github.com/vim/vim/commit/32105ae88f3aa6a6af30336f0bc9f8eb81292cd7 Cherry-pick removal of useless check from patch 8.2.3840. vim-patch:8.2.3083: crash when passing null string to charclass() Problem: Crash when passing null string to charclass(). Solution: Bail out when string pointer is NULL. (Christian Brabandt, closes vim/vim#8498, closes vim/vim#8260) https://github.com/vim/vim/commit/72463f883cdfd08e29ab0018ef3889284848d5f1
* | vim-patch:8.2.2646: Vim9: error for not using string doesn't mention argumentzeertzjq2022-09-12
|/ | | | | | Problem: Vim9: error for not using string doesn't mention argument. Solution: Add argument number. https://github.com/vim/vim/commit/f28f2ac425600b88da0bdcc12a82cd620f575681
* refactor: replace char_u with charDundar Göc2022-09-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-06
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: migrate comment style (#20012)Lewis Russell2022-09-02
| | | | | | | | | Done automatically using the following perl command: perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: replace char_u with charDundar Göc2022-09-01
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 4 (#19987)dundargoc2022-08-30
| | | | | | | * refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-29
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-27
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.0036: 'fillchars' cannot have window-local valueszeertzjq2022-08-26
| | | | | | | | | | | | | | | | Problem: 'fillchars' cannot have window-local values. Solution: Make 'fillchars' global-local. (closes vim/vim#5206) https://github.com/vim/vim/commit/96ba25ac01279f73c0ecb5d4aa4ff37aa359e5eb Cherry-pick g:run_nr from patch 8.2.0454. N/A patches for version.c: vim-patch:9.0.0037: build error Problem: Build error. Solution: Add missing change. https://github.com/vim/vim/commit/510f03738dfcadfe2099c5b6a58cb75f64dbaa82
* refactor: replace char_u with charDundar Goc2022-08-25
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: pre-incr to post-incrLewis Russell2022-08-25
|
* Merge pull request #19906 from bfredl/bigstagebfredl2022-08-24
|\ | | | | perf(api): allow to use an arena for return values
| * perf(api): allow to use an arena for return valuesbfredl2022-08-23
| |
* | vim-patch:9.0.0206: redraw flags are not named specifically (#19913)zeertzjq2022-08-23
|/ | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen(). https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
* vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840)zeertzjq2022-08-19
| | | | | | Problem: Some code in options.c fits better elsewhere. Solution: Move functions from options.c to other files. (Yegappan Lakshmanan, closes vim/vim#4889) https://github.com/vim/vim/commit/e677df8d93772a705f40a94f3c871aee78fe4d99
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.2.3699: the +title feature adds a lot of #ifdef but little code ↵zeertzjq2022-08-17
| | | | | | | (#19809) Problem: The +title feature adds a lot of #ifdef but little code. Solution: Graduate the +title feature. https://github.com/vim/vim/commit/651fca85c71a4c5807f8f828f9ded30fbd754325
* vim-patch:9.0.0220: invalid memory access with for loop over NULL stringzeertzjq2022-08-17
| | | | | | Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL. https://github.com/vim/vim/commit/f6d39c31d2177549a986d170e192d8351bd571e2
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(charclass): make behavior with empty str match latest Vim (#19749)zeertzjq2022-08-13
| | | | Later Vim patches changed to return 0 for empty string and null string. Also update setcellwidth() docs to match latest Vim.
* vim-patch:8.2.{1536,1540}: charclass() (#19748)zeertzjq2022-08-13
| | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.1536: cannot get the class of a character; emoji widths are wrong Problem: Cannot get the class of a character; emoji widths are wrong in some environments. Solution: Add charclass(). Update some emoji widths. Add script to check emoji widths. https://github.com/vim/vim/commit/4e4473c927167fd24e5c8df90e0e8035080cf2da Use latest charclass() docs from Vim. Rewrite DoIt() in emoji_list.vim in Lua. Omit emoji table updates: - emoji_width update looks wrong as these added ranges are only double-width when followed by 0xFE0F. - Other updates are too old. vim-patch:8.2.1540: the user cannot try out emoji character widths Problem: The user cannot try out emoji character widths. Solution: Move the emoji script to the runtime/tools directory. https://github.com/vim/vim/commit/98945560c1ae6e2ddee820a7de718a36e3f4b6e5
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.0176: checking character options is duplicated and incomplete ↵zeertzjq2022-08-09
| | | | | | | (#19690) Problem: Checking character options is duplicated and incomplete. Solution: Move checking to check_chars_options(). (closes vim/vim#10863) https://github.com/vim/vim/commit/8ca29b6a3599b82b8822b7697cad63d0244c2d59
* fix(fillchars): change fallback after setcellwidths()zeertzjq2022-08-08
|
* vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalidzeertzjq2022-08-08
| | | | | | | | | Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid. Solution: Check the value and give an error. (closes vim/vim#9024) https://github.com/vim/vim/commit/94358a1e6e640ca5ebeb295efdddd4e92b700673 Cherry-pick f_setcellwidths() change from patch 9.0.0036. Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
* refactor(setcellwidths): use TV_LIST_ITEM_NEXT properlyzeertzjq2022-08-08
|
* vim-patch:8.2.1537: memory acccess error when using setcellwidths()zeertzjq2022-08-08
| | | | | | Problem: Memory acccess error when using setcellwidths(). Solution: Use array and pointers correctly. https://github.com/vim/vim/commit/b06a6d59d12dbd67d55b3c46f6e5547e9103c931
* vim-patch:8.2.1535: it is not possible to specify cell widths of characterszeertzjq2022-08-08
| | | | | | | | Problem: It is not possible to specify cell widths of characters. Solution: Add setcellwidths(). https://github.com/vim/vim/commit/08aac3c6192f0103cb87e280270a32b50e653be1 Co-Authored-By: delphinus <me@delphinus.dev>
* refactor: rename function prefix mb to the more accurate utf_cp (#19590)dundargoc2022-08-02
| | | | | The "cp" stands for codepoint. Closes https://github.com/neovim/neovim/issues/7401
* refactor: enable -Wconversion warning for mbyte.cDundar Goc2022-07-27
| | | | Work on https://github.com/neovim/neovim/issues/567
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: remove unused USE_WCHAR_FUNCTIONS #18618Lewis Russell2022-05-20
| | | | USE_WCHAR_FUNCTIONS is never defined and we don't trust libc wchar functions anyway.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char