aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
Commit message (Collapse)AuthorAge
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
|
* refactor(encoding): remove redundant vim_isprintc_strictbfredl2023-11-26
| | | | | | | This function is identical to vim_isprintc when encoding=utf-8 is used As this is the only internal encoding nvim supports, it is now redundant ref #2905
* build: rework IWYU mapping filesdundargoc2023-11-25
| | | | | Create mapping to most of the C spec and some POSIX specific functions. This is more robust than relying files shipped with IWYU.
* perf: remove redundant strlen in skipwhite (#26177)ii142023-11-24
| | | | | | | skipwhite was iterating over the input twice and scanning for the null byte character with strlen. this is redundant, because it's already covered by ascii_iswhite that accepts only space or tab character. Co-authored-by: ii14 <ii14@users.noreply.github.com>
* refactor(grid): make screen rendering more multibyte than ever beforebfredl2023-11-17
| | | | | | | | | | | | | | | | | | Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
* refactor: follow style guidedundargoc2023-11-13
| | | | | | - reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* refactor(grid): reimplement 'rightleft' as a post-processing stepbfredl2023-11-05
| | | | | | | | | | | | | problem: checks for wp->w_p_rl are all over the place, making simple things like "advance column one cell" incredibly complicated. solution: always fill linebuf_char[] using an incrementing counter, and then mirror the buffer as a post-processing step This was "easier" that I first feared, because the stupid but simple workaround for things like keeping linenumbers still left-right, e.g. "mirror them and them mirror them once more" is more or less what vim did already. So let's just keep doing that.
* refactor: the long goodbyedundargoc2023-11-05
| | | | | | long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types.
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|
* refactor(buf_init_chartab): remove redundant loop (#24891)julio-b2023-08-27
|
* refactor: move virtcol functions to plines.czeertzjq2023-08-25
| | | | | | Problem: Functions for virtcol and chartabsize are similar (both compute horizontal size), but appear in two different source files. Solution: Move virtcol functions to plines.c.
* refactor(memline): distinguish mutating uses of ml_get_buf()bfredl2023-08-24
| | | | | | | | | | | | | | ml_get_buf() takes a third parameters to indicate whether the caller wants to mutate the memline data in place. However the vast majority of the call sites is using this function just to specify a buffer but without any mutation. This makes it harder to grep for the places which actually perform mutation. Solution: Remove the bool param from ml_get_buf(). it now works like ml_get() except for a non-current buffer. Add a new ml_get_buf_mut() function for the mutating use-case, which can be grepped along with the other ml_replace() etc functions which can modify the memline.
* vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreakzeertzjq2023-08-23
| | | | | | | | | | | Problem: Wrong display with wrapping virtual text or unprintable chars, 'showbreak' and 'smoothscroll'. Solution: Don't skip cells taken by 'showbreak' in screen lines before "w_skipcol". Combined "n_skip" and "skip_cells". closes: vim/vim#12597 https://github.com/vim/vim/commit/b557f4898208105b674df605403cac1b1292707b
* vim-patch:9.0.1734: :runtime completion fails for multiple args (#24767)zeertzjq2023-08-18
| | | | | | | | Problem: :runtime completion fails for multiple args Solution: Make it work closes: vim/vim#12616 https://github.com/vim/vim/commit/be5cdd1d634c2dfc7e415499fb18f4d246a8721c
* fix(ui): cursor pos with left gravity inline virt_text at eol (#24329)zeertzjq2023-07-13
| | | | | | Problem: Cursor is not after inline virtual text with left gravity when inserting after the end of the line. Solution: Add width of inline virtual text with left gravity to cursor virtcol in Insert mode even if on a NUL.
* fix(charset): fix wrong display of 0xffff (#24158)zeertzjq2023-06-26
|
* fix(extmark): fix cursor position with both left and right gravity inline textbfredl2023-05-22
|
* vim-patch:9.0.0205: cursor in wrong position when inserting after virtual textIbby2023-05-22
| | | | | | | | | | | Problem: Cursor in wrong position when inserting after virtual text. (Ben Jackson) Solution: Put the cursor after the virtual text, where the text will be inserted. (closes vim/vim#10914) https://github.com/vim/vim/commit/28c9f895716cfa8f1220bc41b72a534c0e10cabe Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0178: cursor position wrong with virtual text before TabIbby2023-05-22
| | | | | | | | | | Problem: Cursor position wrong with virtual text before Tab. Solution: Use the byte length, not the cell with, to compare the column. Correct tab size after text prop. (closes vim/vim#10866) https://github.com/vim/vim/commit/e428fa04a758cc87ea580c856a796e58e407504b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0179: cursor pos wrong with wrapping virtual text in empty lineIbby2023-05-22
| | | | | | | | | Problem: Cursor position wrong with wrapping virtual text in empty line. Solution: Adjust handling of an empty line. (closes vim/vim#10875) https://github.com/vim/vim/commit/49a90792d950c51608d0459ef8699fe921070718 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(ui): fix multi-byte characters highlight in virtual textIbby2023-05-22
| | | | | | | | | | | This also fixes insert cursor position around virtual text vim-patch:9.0.0132: multi-byte characters in virtual text not handled correctly Problem: Multi-byte characters in virtual text not handled correctly. Solution: Count screen cells instead of bytes. https://github.com/vim/vim/commit/09ff4b54fb86a64390ba9c609853c6410ea6197c
* vim-patch:9.0.0138: not enough characters accepted for 'spellfile'zeertzjq2023-05-04
| | | | | | | | | | | Problem: Not enough characters accepted for 'spellfile'. Solution: Add vim_is_fname_char() and use it for 'spellfile'. https://github.com/vim/vim/commit/bc49c5f48f89c2d6f4d88ee77f44a11d68293be3 Cherry-pick related doc update from Vim runtime. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: uncrustifydundargoc2023-04-26
| | | | Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
* refactor: remove redundant const char * castsii142023-04-07
|
* refactor: remove char_u (#22829)dundargoc2023-04-02
| | | Closes https://github.com/neovim/neovim/issues/459
* refactor: add const and remove unnecessary casts (#22841)ii142023-04-01
|
* refactor(screen): screen.c delenda estbfredl2023-03-14
| | | | | | | | | | | | | drawscreen.c vs screen.c makes absolutely no sense. The screen exists only to draw upon it, therefore helper functions are distributed randomly between screen.c and the file that does the redrawing. In addition screen.c does a lot of drawing on the screen. It made more sense for vim/vim as our grid.c is their screen.c Not sure if we want to dump all the code for option chars into optionstr.c, so keep these in a optionchar.c for now.
* vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)zeertzjq2023-03-05
| | | | | | | | Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes vim/vim#12103) https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(build): remove unused stdlib function and include checksbfredl2023-03-03
| | | | | | In addition: merge some checks for the same feature into one test_compile. This reduces the total number of test compiles which speeds up the cmake configure stage.
* vim-patch:9.0.1314: :messages behavior depends on 'fileformat' of current ↵zeertzjq2023-02-17
| | | | | | | | | | | buffer (#22286) Problem: :messages behavior depends on 'fileformat' of current buffer. Solution: Pass the buffer pointer to where it is used. (Mirko Ceroni, closes vim/vim#11995) https://github.com/vim/vim/commit/1d87e11a1ef201b26ed87585fba70182ad0c468a Co-authored-by: cero1988 <mirkoceroni@mirkoceroni.it>
* fix(status): handle unprintable chars in the statuslineBjörn Linse2023-02-14
|
* refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc2023-01-15
| | | Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
* refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with chardundargoc2023-01-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(tui): use nvim_echo() for verbose terminfobfredl2022-12-20
| | | | | | This is needed for #18375 for the obvious reasons. note: verbose_terminfo_event is only temporarily needed until the full TUI process refactor is merged.
* refactor: replace char_u with charDundar Göc2022-11-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-11-19
| | | | Work on https://github.com/neovim/neovim/issues/459
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: replace char_u with charDundar Göc2022-09-11
| | | | 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: 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 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
* Merge pull request #19961 from dundargoc/refactor/char_u/2bfredl2022-08-29
|\ | | | | refactor: replace char_u with char 2: electric chaaralo