zeertzjq
1de62b9ea1
fix(charclass): make behavior with empty str match latest Vim ( #19749 )
...
Later Vim patches changed to return 0 for empty string and null string.
Also update setcellwidth() docs to match latest Vim.
2022-08-13 12:25:01 +08:00
zeertzjq
754892e59d
vim-patch:8.2.{1536,1540}: charclass() ( #19748 )
...
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.
4e4473c927
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.
98945560c1
2022-08-13 11:29:38 +08:00
Dundar Goc
094cdf2d69
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-12 14:22:02 +02:00
zeertzjq
24bf0490ea
vim-patch:9.0.0176: checking character options is duplicated and incomplete ( #19690 )
...
Problem: Checking character options is duplicated and incomplete.
Solution: Move checking to check_chars_options(). (closes vim/vim#10863 )
8ca29b6a35
2022-08-09 20:35:34 +08:00
zeertzjq
603f7bd253
fix(fillchars): change fallback after setcellwidths()
2022-08-08 20:03:40 +08:00
zeertzjq
9fedb6fd78
vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid
...
Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid.
Solution: Check the value and give an error. (closes vim/vim#9024 )
94358a1e6e
Cherry-pick f_setcellwidths() change from patch 9.0.0036.
Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
2022-08-08 20:03:40 +08:00
zeertzjq
01a7009af9
refactor(setcellwidths): use TV_LIST_ITEM_NEXT properly
2022-08-08 20:03:40 +08:00
zeertzjq
967415d527
vim-patch:8.2.1537: memory acccess error when using setcellwidths()
...
Problem: Memory acccess error when using setcellwidths().
Solution: Use array and pointers correctly.
b06a6d59d1
2022-08-08 20:03:40 +08:00
zeertzjq
53c9500c1d
vim-patch:8.2.1535: it is not possible to specify cell widths of characters
...
Problem: It is not possible to specify cell widths of characters.
Solution: Add setcellwidths().
08aac3c619
Co-Authored-By: delphinus <me@delphinus.dev >
2022-08-08 20:03:40 +08:00
dundargoc
c223875a65
refactor: rename function prefix mb to the more accurate utf_cp ( #19590 )
...
The "cp" stands for codepoint.
Closes https://github.com/neovim/neovim/issues/7401
2022-08-02 11:52:33 +02:00
Dundar Goc
335b49e129
refactor: enable -Wconversion warning for mbyte.c
...
Work on https://github.com/neovim/neovim/issues/567
2022-07-27 13:14:33 +02:00
Dundar Goc
3b8804571c
refactor: replace char_u
...
Work on https://github.com/neovim/neovim/issues/459
2022-07-02 16:01:27 +02:00
dundargoc
014a88799a
refactor: replace char_u #18429
...
Work on https://github.com/neovim/neovim/issues/459
2022-06-28 02:31:54 -07:00
dundargoc
9fec6dc9a2
refactor(uncrustify): set maximum number of consecutive newlines to 2 ( #18695 )
2022-05-25 12:31:14 -06:00
Lewis Russell
4c97e17d38
refactor: remove unused USE_WCHAR_FUNCTIONS #18618
...
USE_WCHAR_FUNCTIONS is never defined and we don't trust libc wchar
functions anyway.
2022-05-20 20:31:32 -07:00
Dundar Goc
f0148de790
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-16 13:27:06 +02:00
bfredl
af9c1e572d
Merge pull request #18489 from dundargoc/refactor/remove-char_u
...
refactor: replace char_u variables and functions with char
2022-05-13 00:14:46 +02:00
zeertzjq
274f260806
vim-patch:8.2.4919: can add invalid bytes with :spellgood
...
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string.
7c824682d2
2022-05-12 23:07:35 +08:00
Dundar Goc
85aae12a6d
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-11 23:19:57 +02:00
Dundar Goc
e31b32a293
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-09 10:03:29 +02:00
Dundar Goc
2a378e6e82
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-07 14:54:01 +02:00
Dundar Goc
9a671e6a24
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-05 18:10:46 +02:00
Dundar Goc
eef8de4df0
refactor(uncrustify): change rules to better align with the style guide
...
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
2022-04-29 14:13:06 +02:00
dundargoc
c582194135
refactor: add pure attribute to pure functions ( #18165 )
...
This will allow the compilers that support the pure attribute to make
further optimizations.
2022-04-24 20:12:47 -06:00
Sean Dewar
9f4401897a
vim-patch:8.2.4418: crash when using special multi-byte character
...
Problem: Crash when using special multi-byte character.
Solution: Don't use isalpha() for an arbitrary character.
5921aeb574
Rename vim_isalpha to mb_isalpha.
2022-02-19 15:29:17 +00:00
zeertzjq
ff81725ff0
refactor(mbyte.c): add const qualifiers
...
This only touches functions that do not return a pointer.
Also add a note about the differences between mb_head_off() and utf_head_off().
2022-02-09 09:52:57 +08:00
zeertzjq
530c65b17a
Merge pull request #16830 from kuuote/vim-8.2.3571
2022-01-28 12:21:15 +08:00
zeertzjq
6e69a3c3e7
refactor: remove CSI unescaping and clean up related names and comments
2022-01-21 18:08:56 +08:00
kuuote
9d37b0998f
vim-patch:8.2.3571: some unicode control characters are considered printable
...
Problem: Some unicode control characters are considered printable.
Solution: Make 0x2060 - 0x2069 not printable.
2021-12-30 12:53:38 +09:00
zeertzjq
f59f81c32e
vim-patch:8.2.3825: various comments could be improved
...
Problem: Various comments could be improved.
Solution: Improve the comments.
52797bae17
2021-12-16 23:05:52 +08:00
Björn Linse
df54d82b7c
refactor(misc1): move out high-level input functions to a new file: input.c
...
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
2021-12-10 18:15:33 +01:00
Björn Linse
c88555418a
refactor(misc1): move way beep functions elsewhere
2021-12-10 17:11:45 +01:00
dundargoc
725cbe7d41
refactor: saner options for uncrustify ( #16204 )
...
* sp_enum_after_assign = force
* sp_brace_typedef = force
* nl_do_brace = remove
* sp_do_brace_open = force
* sp_brace_close_while = force
* sp_before_semi = remove
* sp_before_semi_for = remove
* sp_before_semi_for_empty = remove
* sp_between_semi_for_empty = remove
* sp_after_semi_for_empty = remove
* sp_before_square = remove
* sp_before_squares = remove
* sp_inside_square = remove
* sp_inside_fparens = remove
* sp_inside_fparen = remove
* sp_inside_tparen = remove
* sp_after_tparen_close = remove
* sp_return_paren = force
* pos_bool = lead
* sp_pp_concat = remove
* sp_pp_stringify = remove
* fixup: disable formatting for the INIT section
2021-11-19 14:21:53 -05:00
Björn Linse
1450a6f753
refactor(macroman): get rid of MB_COPY_CHAR macro
...
clean up docs for MB_PTR_ADV and MB_PTR_BACK
2021-11-14 17:08:50 +01:00
Björn Linse
54ff21a153
refactor(macros): delete multibyte macros which just are aliases
2021-11-14 16:33:12 +01:00
Björn Linse
0039ba04b0
refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len
2021-11-14 12:49:12 +01:00
James McCoy
e6ff154be6
vim-patch:8.1.0779: argument for message functions is inconsistent
...
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
32526b3c18
2021-11-01 06:41:29 -04:00
dundargoc
a68faed02d
refactor: saner options for uncrustify #16196
...
* refactor: general good option changes
sp_deref = remove
sp_not = remove
sp_inv = remove
sp_inside_paren_cast = remove
mod_remove_duplicate_include = true
sp_after_semi = add
sp_after_semi_for = force
sp_sizeof_paren = remove
nl_return_expr = remove
nl_else_brace = remove
nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
2021-10-31 17:03:08 -07:00
Michael Lingelbach
2230b578d1
feat: add vim.str_utf_{start,end} ( #16129 )
...
vim.str_utf_{start,end} return the offset from the current position to
the start and end of the current utf-character (nearest codepoint)
respectively.
2021-10-30 10:30:40 -07:00
Dundar Göc
df27579f54
vim-patch:8.1.2388: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
4ba37b5833
2021-10-21 12:07:14 +02:00
Dundar Göc
3b3e2244db
vim-patch:8.1.2388: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
4ba37b5833
2021-10-06 11:50:10 +02:00
dundargoc
d90fb1c0bf
Refactor/uncrustify ( #15790 )
...
* refactor: format with uncrustify
* fixup(dundar): fix functions comments
* fixup(dundar): remove space between variable and ++/--
* fixup(dundar): better workaround for macro attributes
This is done to be able to better use uncrustify rules for macros
* fixup(justin): make preprocessors follow neovim style guide
2021-09-29 19:48:50 +02:00
dundargoc
f4ca3a29dd
refactor: reformat with uncrustify #15736
...
* fix function parameter comments
* remove space after star in function names
2021-09-20 09:35:41 -07:00
dundargoc
3b3dbcf7b7
refactor: format files with uncrustify #15607
2021-09-10 06:14:15 -07:00
Jan Edmund Lazo
de74fcc74c
fixup! remove DYNAMIC_ICONV
...
Code for "DYNAMIC_ICONV" macro was dead since v0.3.0.
d87e5d7016
2021-08-01 11:27:11 -04:00
Dundar Göc
11dcf15682
refactor: replace TRUE/FALSE macros with C99 true/false
2021-07-25 21:51:50 +02:00
Björn Linse
243820ebd0
floats: add borders (MS-DOS MODE)
2021-03-22 23:18:40 +01:00
Jan Edmund Lazo
2894649c2e
vim-patch:8.2.0901: formatting CJK text isn't optimal
...
Problem: Formatting CJK text isn't optimal.
Solution: Properly break CJK lines. (closes vim/vim#3875 )
e52702f003
2020-10-23 08:57:16 -04:00
Jan Edmund Lazo
ce99d049e7
vim-patch:8.2.1547: various comment problems
...
Problem: Various comment problems.
Solution: Update comments.
02c037a4be
2020-10-18 12:25:48 -04:00
Justin M. Keyes
1b0a770340
Merge #11805 'vim-patch:8.1.0619'
2020-02-29 17:37:15 -08:00