| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the messy things when changing a non-current buffer is
not about the buffer, it is about windows. In particular, it is about
`curwin`.
When editing a non-current buffer which is displayed in some other
window in the current tabpage, one such window will be "borrowed" as the
curwin. But this means if two or more non-current windows displayed the buffers,
one of them will be treated differenty. this is not desirable.
In particular, with nvim_buf_set_text, cursor _column_ position was only
corrected for one single window. Two new tests are added: the test
with just one non-current window passes, but the one with two didn't.
Two corresponding such tests were also added for nvim_buf_set_lines.
This already worked correctly on master, but make sure this is
well-tested for future refactors.
Also, nvim_create_buf no longer invokes autocmds just because you happened
to use `scratch=true`. No option value was changed, therefore OptionSet
must not be fired.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Problem: Temporarily changing current window in a script causes
CursorMoved to be triggerd.
Solution: Don't trigger CursorMoved if neither curwin nor cursor
changed between two checks.
|
|
|
|
|
| |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
|
|
|
|
|
|
|
|
|
|
| |
'cpo'
Problem: Bad redrawing with spell checking, using "C" and "$" in 'cpo'.
Solution: Do not redraw the next line when "$" is in 'cpo'. (closes vim/vim#11285)
https://github.com/vim/vim/commit/f3ef026c9897f1d2e3fba47166a4771d507dae91
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
line
Problem: With spell checking, deleting a full stop at the end of a line
does not update SpellCap at the start of the next line.
Solution: Update the next line when characters have been deleted. Also when
using undo.
https://github.com/vim/vim/commit/26f09ea54b2c60abf21df42c60bdfc60eca17b0d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
correctly (#23617)
Problem: Position of marker for 'smoothscroll' not computed correctly.
Solution: Take 'list' and other options into account. (Luuk van Baal,
closes vim/vim#12393)
https://github.com/vim/vim/commit/24b62ec8258cc7c9ca2c09f645f7f6b02584c892
|
|
|
|
|
|
|
|
|
| |
Problem: Display errors when making topline shorter and 'smoothscroll' is
set.
Solution: Reset w_skipcol when the topline becomes shorter than its current
value. (Luuk van Baal, closes vim/vim#12367)
https://github.com/vim/vim/commit/5d01f86d99bc3a3fd92d4f4e9338a9e78e9ebe16
|
|
|
|
| |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
| |
|
| |
|
|
|
|
|
|
| |
libnvim couldn't be easily used in C++ due to the use of reserved keywords.
Additionally, add explicit casts to *alloc function calls used in inline
functions, as C++ doesn't allow implicit casts from void pointers.
|
|
|
|
|
|
|
|
|
|
|
| |
prop (#22706)
Problem: Cursor displayed in wrong position after removing text prop. (Ben
Jackson)
Solution: Invalidate the cursor position. (closes vim/vim#10898)
https://github.com/vim/vim/commit/326c5d36e7cb8526330565109c17b4a13ff790ae
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Reproducing memory access errors can be difficult.
Solution: When testing, copy each line to allocated memory, so that valgrind
can detect accessing memory before and/or after it. Fix uncovered
problems.
https://github.com/vim/vim/commit/fa4873ccfc10e0f278dc46f39d00136fab059b19
Since test_override() is N/A, enable ml_get_alloc_lines when ASAN is
enabled instead, so it also applies to functional tests.
Use xstrdup() to copy the line as ml_line_len looks hard to port.
Squash the test changes from patch 9.0.0016.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
| |
Problem: Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution: Do not change "wl_lnum" at index zero. (closes vim/vim#11938)
https://github.com/vim/vim/commit/61fdbfa1e3c842252b701aec12f45839ca41ece5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
| |
(#21869)
Problem: Adding a line below the last one does not expand fold.
Solution: Do not skip mark_adjust() when adding lines below the last one.
(Brandon Simmons, closes vim/vim#11832, closes vim/vim#10698)
https://github.com/vim/vim/commit/da3dd7d857ba4fb4bf408dedd1d9d6a2d5e2ae9f
Co-authored-by: Brandon Simmons <simmsbra@gmail.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
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
execution (#20998)
Problem: Assert_fails() setting emsg_silent changes normal execution.
Solution: Use a separate flag in_assert_fails.
https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4
Cherry-pick no_wait_return from patch 9.0.0846.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Still a build error, tests are failing.
Solution: Correct recent changes. Add missing init for 'eof'.
https://github.com/vim/vim/commit/1577537f109d97a975fda9a899cacfb598617767
vim-patch:1577537f109d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot use 'indentexpr' for Lisp indenting.
Solution: Add the 'lispoptions' option.
https://github.com/vim/vim/commit/49846fb1a31de99f49d6a7e70efe685197423c84
vim-patch:9.0.0762: build failure
Problem: Build failure.
Solution: Add missing change.
https://github.com/vim/vim/commit/4b082c4bd05f504fda1acaa9d28fca55a2d04857
|
|
|
|
|
|
| |
Problem: 'indentexpr' overrules lisp indenting in one situation.
Solution: Add "else" to keep the lisp indent. (issue vim/vim#11327)
https://github.com/vim/vim/commit/a79b35b5781ae770334cec781d17fec3875f8108
|
|
|
|
|
| |
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: smjonas <jonas.strittmatter@gmx.de>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
* refactor: replace char_u with char
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.
|
|
|
|
|
|
|
|
|
| |
Problem: Some source files are too big.
Solution: Move text formatting functions to a new file. (Yegappan
Lakshmanan, closes vim/vim#6021)
https://github.com/vim/vim/commit/11abd095210fc84e5dcee87b9baed86061caefe4
Cherry-pick set_can_cindent() from patch 8.1.2062.
Cherry-pick global old_indent from patch 8.2.2127.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The option.c file is still very big.
Solution: Move a few functions to where they fit better. (Yegappan
Lakshmanan, closes vim/vim#4895)
https://github.com/vim/vim/commit/7bae0b1bc84a95d565ffab38cf7f82ad21c656b6
vim-patch:9.0.0271: using INIT() in non-header files
Problem: Using INIT() in non-header files.
Solution: Remove INIT(). (closes vim/vim#10981)
https://github.com/vim/vim/commit/9b7d2a959646560f5770329f4428c4739eed4656
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Too many #ifdefs.
Solution: Make some functions always available.
https://github.com/vim/vim/commit/6d4b2f54df5d533eb0794331f38445a6ca5d3a3f
N/A patches for version.c:
vim-patch:9.0.0262: build failure without the +quickfix feature
Problem: Build failure without the +quickfix feature.
Solution: Add #ifdef.
https://github.com/vim/vim/commit/2e6dcbc4450c98bd12faace5d77a65f2afddae44
vim-patch:9.0.0266: compiler warning for unused argument
Problem: Compiler warning for unused argument.
Solution: Add UNUSED.
https://github.com/vim/vim/commit/340dafd155222ac96304107542344faf3c56e12b
vim-patch:9.0.0268: build error without the +eval feature
Problem: Build error without the +eval feature.
Solution: Remove #ifdef.
https://github.com/vim/vim/commit/0166e398d11a09662d783fe5db62b414045880f8
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The screen.c file is much too big.
Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943)
https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964
This is an approximation vim-patch 8.1.2057. Applying the patch directly
isn't feasible since our version of screen.c has diverged too much,
however we still introduce drawscreen.c and drawline.c:
- screen.c is now a much smaller file used for low level screen functions
- drawline.c contains everything needed for win_line()
- drawscreen.c contains everything needed for update_screen()
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: File for Insert mode is much too big.
Solution: Split off the code for Insert completion. (Yegappan Lakshmanan,
closes vim/vim#4044)
https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9
Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001.
Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no
longer a global variable, so l_ctrl_x_mode is no longer needed.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** 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
|
|
|
|
|
|
| |
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of long varies depending on architecture, in contrast to the
MAXLNUM constant which sets the maximum allowable number of lines to
2^32-1. This discrepancy may lead to hard to detect bugs, for example
https://github.com/neovim/neovim/issues/18454. Setting linenr_T to a
fix maximum size of 2^32-1 will prevent this type of errors in the
future.
Also change the variables `amount` and `amount_after` to be linenr_T
since they're referring to "the line number difference" between two
texts.
|
|
|
|
| |
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
|
| |
|