aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_bt.c
Commit message (Collapse)AuthorAge
* 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