aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_bt.c
Commit message (Collapse)AuthorAge
* refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.1221: code is indented more than necessary (#21891)zeertzjq2023-01-19
| | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11833) https://github.com/vim/vim/commit/f97a295ccaa9803367f3714cdefce4e2283c771d Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* 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: replace char_u with char 21 (#21779)dundargoc2023-01-14
| | | | | 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: rename mch_msg => os_msgJustin M. Keyes2022-12-16
|
* Merge pull request #20196 from dundargoc/refactor/char_u/14bfredl2022-11-26
|\ | | | | refactor: replace char_u with char 14: remove `STRLEN` part final
| * refactor: replace char_u with charDundar Göc2022-11-26
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | vim-patch:9.0.0951: trying every character position for a match is ↵zeertzjq2022-11-26
|/ | | | | | | | | | inefficient (#21198) Problem: Trying every character position for a match is inefficient. Solution: Use the start position of the match ignoring "\zs". https://github.com/vim/vim/commit/01105b37a108022515d364201767f7f111ec4222 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0260: several lines of code are duplicated (#21108)zeertzjq2022-11-19
| | | | | | | | | Problem: Several lines of code are duplicated. Solution: Move duplicated code to a function. (Yegappan Lakshmanan, closes vim/vim#5330) https://github.com/vim/vim/commit/f4140488c72cad4dbf5449dba099cfa7de7bbb22 Using sizeof seems better than ARRAY_SIZE for vim_snprintf().
* 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.
* refactor: more clint (#20910)Lewis Russell2022-11-07
|
* vim-patch:8.2.4978: no error if engine selection atom is not at the startzeertzjq2022-11-05
| | | | | | | | | Problem: No error if engine selection atom is not at the start. Solution: Give an error. (Christian Brabandt, closes vim/vim#10439) https://github.com/vim/vim/commit/360da40b47a84ee8586c3b5d062f8c64a2ac9cc6 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:8.2.4693: new regexp does not accept pattern "\%>0v"zeertzjq2022-11-05
| | | | | | | | | Problem: new regexp does not accept pattern "\%>0v". Solution: Do accept digit zero. https://github.com/vim/vim/commit/72bb10df1fb3eb69bc91f5babfb8881ce098cba1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4688: new regexp engine does not give an error for "\%v"zeertzjq2022-11-05
| | | | | | | | | Problem: New regexp engine does not give an error for "\%v". Solution: Check for a value argument. (issue vim/vim#10079) https://github.com/vim/vim/commit/91ff3d4f52a55a7c37a52aaad524cd9dd12efae4 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* 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-10
| | | | 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 charDundar Göc2022-08-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(plines): use a struct for chartabsize statebfredl2022-08-29
| | | | | | | | | This is a refactor extracted from vim-patch 9.0.0067: cannot show virtual text The logic for inline virtual text is going to be different in nvim than text property based text in vim, but this refactor is still useful, as calculation of displayed linesize is going to be stateful in a similar way.
* refactor: pre-incr to post-incrLewis Russell2022-08-25
|
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
* refactor: replace char_u with charDundar Goc2022-07-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: enable -Wconversion warning for regexp files (#19521)dundargoc2022-07-28
| | | Work on https://github.com/neovim/neovim/issues/567
* fix(mark): give correct error message when mark is in another buffer (#19454)zeertzjq2022-07-21
|
* feat(marks): restore viewport on jump #15831Javier Lopez2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Refactor Previously most functions used to "get" a mark returned a position, changed the line number and sometimes changed even the current buffer. Now functions return a {x}fmark_T making calling context aware whether the mark is in another buffer without arcane casting. A new function is provided for switching to the mark buffer and returning a flag style Enum to convey what happen in the movement. If the cursor changed, line, columns, if it changed buffer, etc. The function to get named mark was split into multiple functions. - mark_get() -> fmark_T - mark_get_global() -> xfmark_T - mark_get_local() -> fmark_T - mark_get_motion() -> fmark_T - mark_get_visual() -> fmark_T Functions that manage the changelist and jumplist were also modified to return mark types. - get_jumplist -> fmark_T - get_changelist -> fmark_T The refactor is also seen mainly on normal.c, where all the mark movement has been siphoned through one function nv_gomark, while the other functions handle getting the mark and setting their movement flags. To handle whether context marks should be left, etc. ** Mark View While doing the refactor the concept of a mark view was also implemented: The view of a mark currently implemented as the number of lines between the mark position on creation and the window topline. This allows for moving not only back to the position of a mark but having the window look similar to when the mark was defined. This is done by carrying and extra element in the fmark_T struct, which can be extended later to also restore horizontal shift. *** User space features 1. There's a new option, jumpoptions+=view enables the mark view restoring automatically when using the jumplist, changelist, alternate-file and mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark] ** Limitations - The view information is not saved in shada. - Calls to get_mark should copy the value in the pointer since we are using pos_to_mark() to wrap and provide a homogeneous interfaces. This was also a limitation in the previous state of things.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): enable formatting for regexp and indent files (#18549)dundargoc2022-05-14
| | | | | | | | The formatting for these files were originally disabled as to signal that "we don't own these files", meaning we intentionally want to minimize the amount of work put in these files as the return will be very little. This unfortunately conflicts with other refactoring efforts that happen to touch these files, and it's easier to simply enable formatting.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.3110: a pattern that matches the cursor position is complicatedzeertzjq2022-03-30
| | | | | | | | | Problem: A pattern that matches the cursor position is bit complicated. Solution: Use a dot to indicate the cursor line and column. (Christian Brabandt, closes vim/vim#8497, closes vim/vim#8179) https://github.com/vim/vim/commit/04db26b36000a4677b95403ec94bd11f6cc73975 Also use `n = ++vcol` in regexp_bt.c as `++vcol` alone fails lint.
* vim-patch:8.2.4646: using buffer line after it has been freed (#17907)zeertzjq2022-03-30
| | | | | Problem: Using buffer line after it has been freed in old regexp engine. Solution: After getting mark get the line again. https://github.com/vim/vim/commit/b55986c52d4cd88a22d0b0b0e8a79547ba13e1d5
* vim-patch:8.2.2716: the equivalent class regexp is missing some characterszeertzjq2022-03-19
| | | | | | | | | Problem: The equivalent class regexp is missing some characters. Solution: Update the list of equivalent characters. (Dominique Pellé, closes vim/vim#8029) https://github.com/vim/vim/commit/0b94e297afd072c51bf2eed12c7ffe3978d93399 Match upstream's indent in s:equivalence_class().
* vim-patch:8.2.4440: crash with specific regexp pattern and stringzeertzjq2022-03-11
| | | | | | Problem: Crash with specific regexp pattern and string. Solution: Stop at the start of the string. https://github.com/vim/vim/commit/6456fae9ba8e72c74b2c0c499eaf09974604ff30
* vim-patch:8.1.2005: the regexp.c file is too bigkylo2522022-03-10
Problem: The regexp.c file is too big. Solution: Move the backtracking engine to a separate file. (Yegappan Lakshmanan, closes vim/vim#4905) https://github.com/vim/vim/commit/6d7d7cf750bca5d641e464f6a3af5ee5b99a5ac8 vim-patch:8.1.2010: new file uses old style comments Problem: New file uses old style comments. Solution: Change to new style comments. (Yegappan Lakshmanan, closes vim/vim#4910) https://github.com/vim/vim/commit/9490b9a61cf1f1f3fa9758663a33124ea9f71c87