mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
ga_growsize should be >= 1
I know it could be 0 sometimes. Running the tests with `assert(gap->ga_growsize > 0)` in ga_grow() crashes nvim while running the tests. - Add a setter for ga_growsize that checks whether the value passed is >=1 (log in case it's not) - log when ga_grow() tries to use a ga_growsize that's not >=1 - use GA_EMPTY_INIT_VALUE is many places
This commit is contained in:

committed by
Justin M. Keyes

parent
d723e7fd61
commit
be3a4b6ca8
@@ -969,7 +969,7 @@ EXTERN int need_cursor_line_redraw INIT(= FALSE);
|
||||
/* Grow array to collect error messages in until they can be displayed. */
|
||||
EXTERN garray_T error_ga
|
||||
# ifdef DO_INIT
|
||||
= {0, 0, 0, 0, NULL}
|
||||
= GA_EMPTY_INIT_VALUE
|
||||
# endif
|
||||
;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user