mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
2abc799ffd
The current 'clamp_line_numbers' implementation modifies diagnostics in place, which can have adverse downstream side effects. Before clamping line numbers, make a copy of the diagnostic. This commit also merges the 'clamp_line_numbers' method into a new 'get_diagnostics' local function which also implements the more general "get" method. The public 'vim.diagnostic.get()' API now just uses this function (without clamping). This has the added benefit that other internal API functions that need to use get() no longer have to go through vim.validate. Finally, reorganize the source code a bit by grouping all of the data structures together near the top of the file. |
||
---|---|---|
.. | ||
autoload | ||
colors | ||
compiler | ||
doc | ||
ftplugin | ||
indent | ||
keymap | ||
lua | ||
macros | ||
pack/dist/opt | ||
plugin | ||
queries/c | ||
spell | ||
syntax | ||
tools | ||
tutor | ||
bugreport.vim | ||
CMakeLists.txt | ||
delmenu.vim | ||
filetype.vim | ||
ftoff.vim | ||
ftplugin.vim | ||
ftplugof.vim | ||
indent.vim | ||
indoff.vim | ||
macmap.vim | ||
makemenu.vim | ||
menu.vim | ||
mswin.vim | ||
nvim.appdata.xml | ||
nvim.desktop | ||
nvim.png | ||
optwin.vim | ||
rgb.txt | ||
scripts.vim | ||
synmenu.vim |