| Commit message (Collapse) | Author | Age |
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/567
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** 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.
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
Problem: Crash with specific regexp pattern and string.
Solution: Stop at the start of the string.
https://github.com/vim/vim/commit/6456fae9ba8e72c74b2c0c499eaf09974604ff30
|
|
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
|