zeertzjq
683648a396
vim-patch:8.2.4258: Coverity warns for array overrun
...
Problem: Coverity warns for array overrun.
Solution: Restrict depth to MAXWLEN - 1.
6970e1e36a
2022-04-04 09:37:40 +08:00
zeertzjq
945caeeda2
vim-patch:8.2.4247: stack corruption when looking for spell suggestions
...
Problem: Stack corruption when looking for spell suggestions.
Solution: Prevent the depth increased too much. Add a five second time
limit to finding suggestions.
06f15416bb
Cherry-pick parentheses from patch 8.2.4402.
2022-04-04 09:37:40 +08:00
Brian Leung
69e11b58b4
vim-patch:8.2.4402: missing parenthesis may cause unexpected problems
...
Problem: Missing parenthesis may cause unexpected problems.
Solution: Add more parenthesis is macros.
ae6f1d8b14
2022-04-03 16:11:23 -07:00
Tony Chen
ea71c26ec9
fix(extmarks): splice extmarks on accepting spell
2022-04-02 12:35:33 -04:00
Dundar Göc
ff032f2710
refactor: remove redundant casts
2022-03-06 23:02:10 +01:00
f380cedric
c6dddc3464
vim-patch:8.2.3582: reading uninitialized memory when giving spell suggestions
...
Problem: Reading uninitialized memory when giving spell suggestions.
Solution: Check that preword is not empty.
15d9890eee
2022-01-06 18:47:31 +01:00
dundargoc
6e00d4754c
vim-patch:8.2.3914 ( #16808 )
...
* vim-patch:8.2.3914: various spelling mistakes in comments
Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416 )
af4a61a85d
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2021-12-28 11:28:48 +01: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
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
54ff21a153
refactor(macros): delete multibyte macros which just are aliases
2021-11-14 16:33:12 +01:00
Björn Linse
71a4d275dc
refactor(multibyte): eliminate mb_char2len alias for utf_char2len
2021-11-14 12:49: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
James McCoy
efa924f66b
vim-patch:8.1.0743: giving error messages is not flexible
...
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
vim/vim#3302 ) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
f9e3e09fdc
2021-11-01 06:41:28 -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
Dundar Göc
6d9dea4201
refactor: remove redundant casts
2021-10-07 13:16:55 +02:00
dundargoc
44f7b46199
refactor: remove redundant char casts #15888
2021-10-04 06:40:43 -07: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
db1b0ee3b3
refactor: replace TRUE/FALSE with true/false #15425
2021-08-22 07:10:57 -07:00
Thomas Vigouroux
7970631fa0
buffer: move BUFEMPTY to a function
2021-07-06 19:12:15 +02:00
Thomas Vigouroux
55a2c513aa
buffer: don't rely on curbuf in BUFEMPTY
2021-07-06 19:07:11 +02:00
Jan Edmund Lazo
72b512bd53
vim-patch:8.2.0945: cannot use "z=" when 'spell' is off
...
Problem: Cannot use "z=" when 'spell' is off.
Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt,
Gary Johnson, closes vim/vim#6227 )
152e79e94b
2021-06-12 13:06:50 -04:00
Jan Edmund Lazo
e78656875d
vim-patch:8.2.0039: memory access error when "z=" has no suggestions
...
Problem: Memory access error when "z=" has no suggestions.
Solution: Check for negative index.
569fea2c31
2021-06-12 13:06:49 -04:00
Jan Edmund Lazo
2644fe5b7c
vim-patch:8.2.2974: Greek spell checking uses wrong case folding
...
Problem: Greek spell checking uses wrong case folding.
Solution: Fold capital sigma depending on whether it is at the end of a
word or not. (closes vim/vim#299 )
4f13527598
2021-06-11 17:00:14 -04:00
Jan Edmund Lazo
6ab83f3572
Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs ( #14559 )
2021-05-15 20:36:13 -04:00
Ghjuvan Lacambre
0f187700ab
vim-patch:8.2.0295: highlighting for :s wrong when using different separator ( #14286 )
...
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closes vim/vim#5665 )
c036e87bd7
2021-04-04 14:43:22 -04:00
glacambre
dbf3c5d953
Clear prompt_for_number messages
...
This fixes issues in GUIs:
https://github.com/akiyosi/goneovim/issues/94
https://github.com/glacambre/firenvim/issues/448
2021-02-10 13:04:02 +01:00
Jan Edmund Lazo
d34846af74
option: use char* for get_option_value() param
...
'name' param is casted to char_u* within get_option_value().
Most calls to get_option_value() cast arg to 'name' from char to char_u.
Remove these pointless type casts.
2021-02-07 17:57:37 -05:00
Jan Edmund Lazo
94cb3b4b35
vim-patch:8.2.2379: do spell suggestions twice if 'spellsuggest' contains number
...
Problem: Finding spell suggestions twice if 'spellsuggest' contains number.
Solution: Only do internal suggestions once. (closes vim/vim#7713 )
77a849c4b3
2021-01-21 21:59:35 -05:00
Jan Edmund Lazo
f85386d170
vim-patch:8.2.1907: complete_info().selected may be wrong
...
Problem: Complete_info().selected may be wrong.
Solution: Update cp_number if it was never set. (issue vim/vim#6945 )
f9d51354de
Misc changes:
For variables and function parameters that use "Direction" enum values,
update their type from from "int" to "Direction".
It is hard to review function parameters that must accept
"Direction" enum values only.
2020-12-03 18:58:29 -05:00
Jan Edmund Lazo
93c18867a0
vim-patch:8.1.0810: too many #ifdefs
...
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, part 4.
264b74fa54
2020-11-12 18:12:05 -05:00
Björn Linse
c146eddc8b
api: add API for themes
...
co-author: hlpr98 <hlpr98@gmail.com > (dict2hlattrs function)
orange is sus??
NOVEMBER DAWN
erase the lie that is redraw_later()
2020-11-01 19:14:56 +01:00
Jan Edmund Lazo
01dff1fbfb
vim-patch:8.2.0957: compiler warning for uninitialized variable
...
Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution: Initialize one variable.
2d4070d3b0
2020-10-14 08:54:00 -04:00
Thomas Vigouroux
0b42e3fedb
vim-patch:8.2.0956: spell test fails
...
Problem: Spell test fails.
Solution: Add missing change the spell checking.
e0ebeda4d8
2020-09-24 08:09:38 +02:00
James McCoy
74ad66404f
suggest_trie_walk: Remove invalid FALLTHROUGH annotation
2020-09-04 10:59:16 -04:00
James McCoy
1190192216
vim-patch:8.2.1560: using NULL pointers in some code
...
Problem: Using NULL pointers in some code. (James McCoy)
Solution: Avoid adding to a NULL pointer. Use byte as unsigned.
9c2b06637b
The changes to eval.c (skip_expr_concatenate) and vim9compile.c aren't
included since they're specific to vim9script support.
2020-09-04 08:25:33 -04:00
Jan Edmund Lazo
5fcdb63025
vim-patch:8.2.1564: a few remaining errors from ubsan
...
Problem: A few remaining errors from ubsan.
Solution: Avoid the warnings. (Dominique Pellé, closes vim/vim#6837 )
4ad739fc05
2020-09-02 22:44:21 -04:00
Jan Edmund Lazo
37bc089fb9
vim-patch:8.2.1104: Coverity warnts for possible NULL pointer use
...
Problem: Coverity warnts for possible NULL pointer use.
Solution: Check "pbyts" is not NULL.
11b6600c88
2020-07-04 10:05:35 -04:00
Jan Edmund Lazo
e84c075ad9
vim-patch:8.2.1095: may use pointer after freeing it
...
Problem: May use pointer after freeing it when text properties are used.
Solution: Update redo buffer before calling ml_replace().
6b949615ed
2020-07-04 10:05:34 -04:00
Jan Edmund Lazo
ee4265285d
vim-patch:8.2.0932: missspelling spelllang
...
Problem: Missspelling spelllang.
Solution: Add an "l". (Dominique Pelle)
f154f3ab2c
2020-06-18 18:01:42 -04:00
Jan Edmund Lazo
5be72756f8
vim-patch:8.2.0041: leaking memory when selecting spell suggestion
...
Problem: Leaking memory when selecting spell suggestion.
Solution: Free previous value at the right time.
6c52f82371
2020-04-13 12:00:31 -04:00
Jan Edmund Lazo
351a1cff70
vim-patch:8.2.0387: error for possible NULL argument to qsort()
...
Problem: Error for possible NULL argument to qsort().
Solution: Don't call qsort() when there is nothing to sort. (Dominique
Pelle, closes vim/vim#5780 )
bb65a5690c
2020-04-13 12:00:30 -04:00
Justin M. Keyes
88f133c30d
Merge #11763 'spell: remove non-UTF8 dead code'
2020-01-26 16:42:00 -08:00
Jan Edmund Lazo
08c5a874ab
vim-patch:8.1.1143: may pass weird strings to file name expansion
...
Problem: May pass weird strings to file name expansion.
Solution: Check for matching characters. Disallow control characters.
8f130eda47
2020-01-26 17:38:30 -05:00
Jan Edmund Lazo
86c1630a1b
spell: remove enc_utf8 dead code
2020-01-26 10:33:01 -05:00
Jan Edmund Lazo
6c7a995c5f
spell: zero-init structs to fix garbage ptrs
2020-01-26 10:33:00 -05:00
Jan Edmund Lazo
a7aa1fc87d
spell: spell_soundfold_sal() is dead code
2020-01-17 19:06:51 -05:00
Jan Edmund Lazo
1042338c00
clang/'Logic error': zero-init struct
2020-01-17 19:06:50 -05:00
Jan Edmund Lazo
a0c18bf201
spell: fix clang logic error
...
https://neovim.io/doc/reports/clang/report-487b01.html#EndPath
https://neovim.io/doc/reports/clang/report-ce4c3c.html#EndPath
2019-11-13 19:25:40 -05:00
Jaehwang Jerry Jung
034077ed1c
vim-patch:8.1.2173: searchit() has too many arguments
...
Problem: Searchit() has too many arguments.
Solution: Move optional arguments to a struct. Add the "wrapped" argument.
92ea26b925
2019-10-27 03:35:19 +09:00