| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
| |
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
Work on https://github.com/neovim/neovim/issues/459
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
| |
|
|\
| |
| | |
refactor: replace char_u with char 14: remove `STRLEN` part final
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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
|