| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629)
vim-patch:8.0.1481
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove occurences of these macros.
|
|
|
|
|
|
|
|
| |
Refactor the following affected functions:
- prt_line_number()
- prt_header()
These use prt_set_font(), refactored in 872a76f3dac14fdcb7dc7b34cecd3acb4370d56f for TriState.
|
| |
|
|
|
|
| |
Combine variable declaration and initialization to add const.
|
|
|
|
|
|
| |
Problem: Crash when using :hardcopy with illegal byte.
Solution: Check for string_convert() returning NULL. (Dominique Pelle)
https://github.com/vim/vim/commit/43dee181f596c81b99e200b6cdfeb02ecfed42c8
|
|
|
|
|
|
|
| |
Problem: Access memory beyond end of string. (Coverity)
Solution: Keep allocated memory in separate pointer. Avoid outputting the
NUL character.
https://github.com/vim/vim/commit/cdd09aa51a8d34bb384460af4f91026dbff5bf48
|
|
|
|
|
| |
Problem: There are still a few macros that should be all-caps.
Solution: Make a few more macros all-caps.
https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
|
| |
|
| |
|
|
|
|
| |
Function was renamed and changed to return `const char *`.
|
|
|
|
|
|
| |
`has_mbyte` is deprecated (globals.h), so `outputlen` is always assigned
within the if statement. Therefore, the previous initialization is
unnecessary.
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Using freed memory when parsing 'printoptions' fails.
Solution: Save the old options and restore them in case of an error.
(Dominique)
https://github.com/vim/vim/commit/4afc7c5d4a73340831077a02bfe1f74935e7f4a1
|
| |
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
|
|
|
|
|
|
| |
Problem: ":colorscheme" does not use 'packpath'.
Solution: Also use in "start" and "opt" directories in 'packpath'.
https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
|
|
|
|
| |
Originally there were 128 new errors, so I thought this is a good idea to fix
all of them. Of course, this commit also fixes many suppressed errors.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regarding the individual items in the header:
`Vim - Vi improved by Bram Moolenar`
Bram Moolenar is already mentioned throughout the documentation, as
well as the intro screen.
`:help uganda`
It's already shown to all users who don't use `shortmess+=I` upon
starting nvim, and is already placed prominently in help.txt, i.e.,
`:help` run with no arguments.
`:help credits`
Already mentioned near the top of help.txt.
`README.md`
Already mentioned in develop.txt.
|
| |
|
|
|
|
|
| |
The former no longer exists in this repo; see the top of
src/nvim/README.md.
|
| |
|
| |
|
|
|
|
|
|
| |
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
Reviewed-by: Björn Linse <bjorn.linse@gmail.com>
|
|
|
|
|
|
| |
We already use wrappers for allocation, the new `xfree` function is the
equivalent for deallocation and provides a way to fully replace the malloc
implementation used by Neovim.
|
|
|
|
|
|
|
|
|
|
|
| |
This commit pulls the some environment-variable handling functions out of
misc1.c and in to os/env.c. Previously submited as #1231, this is the start of
a patch series that does that work based on a more up-to-date master branch.
Major tasks accomplished:
- move functions and fix includes
- fix clint/clang analysis warnings
- correct documentation comments
|
|\
| |
| | |
Remove redundant casts
|
| | |
|
|/
|
|
| |
This avoids recompiles after commiting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed term.c, term.h and term_defs.h
- Tests for T_* values were removed. screen.c was simplified as a
consequence(the best strategy for drawing is implemented in the UI layer)
- Redraw functions now call ui.c functions directly. Updates are flushed with
`ui_flush()`
- Removed all termcap options(they now return empty strings for compatibility)
- &term/&ttybuiltin options return a constant value(nvim)
- &t_Co is still available, but it mirrors t_colors directly
- Remove cursor tracking from screen.c and the `screen_start` function. Now the
UI is expected to maintain cursor state across any call, and reset it when
resized.
- Remove unused code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring summary:
- ui_write(): len: int --> size_t
* parse_abstract_ui_codes(): len: int --> size_t
* string_convert(): lenp: int * --> size_t *
- string_convert_ext(): lenp : int * --> size_t *
unconvlenp: int * --> size_t *
* utf8len_tab_zero: char[] --> uint8_t[]
* iconv_string(): slen : int --> size_t
unconvlenp: int * --> size_t *
resultlenp: int * --> size_t *
- mch_print_text_out(): len: int --> size_t
* out_pos: int --> size_t
|
|
|
|
|
| |
Now the attrentry_T structure will store all attributes in separate fields for
cterm and rgb UIs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : Out-of-bounds read @ 2213.
Diagnostic : Real issue.
Rationale : Error occurs if cmap == ARRAY_SIZE(prt_ps_mbfonts),
but code takes the `if (prt_out_mbyte)` branch. That's it,
if a matching encoding is found but not a matching charset.
In that case, the first matching encoding is used.
Resolution : Remember the value of cmap for the first matching encoding.
Reset cmap to that value if first matching encoding is
going to be used.
|
| |
|
|
|
|
|
|
|
|
|
| |
If you Google for this phrase found in the Vim documentation you'll find
almost exclusively hits from the Vim documentation. I think changing
"halfway a line" to "halfway through a line" makes more sense.
There seems to be an pervasive odd use of the word 'halfway' in the
original docs which I'm updating everywhere.
|
|
|
|
|
|
|
| |
Problem : Assert can fail for legal values. Modulo-arithmetic of
unsigned types can make so that n * 100 > n, but n has
overflowed.
Solution : Use alternative form of expression.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : getdigits() currently returns a long, but at most places,
return value is casted (unsafely) into an int. Making casts
safe would introduce a lot of fuss in the form of assertions
checking for limits.
Note : We cannot just change return type to int, because, at some
places, legitimate long values are used. For example, in
diff.c, for line numbers.
Solution : Introduce new functions:
- get_digits() : Gets an intmax_t from a string.
- get_int_digits() : Wrapper for ints.
- get_long_digits() : Wrapper for longs.
And replace getdigits() invocations by the appropiate
wrapper invocations.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Assert will fail on first loop iteration (in that case,
prtpos.bytes_printed is 0).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- <color_related_stuff>: long_u --> uint32_t
Everywhere long_u was used to hold a color value.
Color values are supposed to be 32 bits at most.
Supported architectures have 32 bits ints, so we could have used plain
ints. But this wouldn't be future-proof, and would be wasteful if a
future architecture has ints bigger than 32 bits.
So, uint32_t is perfect to achieve optimal packing no matter the
architecture.
- bytes_to_print/bytes_printed: long_u --> size_t
Seems like the correct thing, and gets rid of some casts.
|