Problem: pre-inserted text not exposed in complete_info()
Solution: Add the pre-inserted text to the complete_info() Vim script
function (Girish Palya)
closes: vim/vim#18571
Feat: expose preinserted text in complete_info()
ef5bf58d8c
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: cindent: wrong indentation after an array declaration
Solution: check if the filetype if javascript before matching the syntax
(Anttoni Erkkilä)
cindent matches a javascript syntax for C files causing wrong
indentation in the following case:
```
void foo() {
float a[5],
b;
}
```
closes: vim/vim#1863161ef8a3db9
Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Problem: Cmdline history not updated when mapping both <Up> and <CR>.
Solution: Consider the command typed when in Cmdline mode and there is
no pending input (zeertzjq).
Although the existing behavior technically does match documentation, the
"completely come from mappings" part is a bit ambiguous, because one may
argue that the command doesn't completely come from mappings as long as
the user has typed a key in Cmdline mode. I'm not entirely sure if this
change will cause problems, but it seems unlikely.
fixes: vim/vim#2771
related: neovim/neovim#36256closes: vim/vim#1860797b6e8b424
vim-patch:8.1.2194: modifyOtherKeys is not enabled by default
vim-patch:8.2.0513: reading past allocate memory when using varargs
vim-patch:8.2.0556: Vim9: memory leak when finding common type
vim-patch:8.2.1446: Vim9: line number in error message is not correct
vim-patch:8.2.1680: Vim9: line number for compare error is wrong
vim-patch:8.2.1817: Vim9: wrong instruction when reusing a local variable spot
vim-patch:8.2.2159: Vim9: when declaring a list it is not allocated yet
vim-patch:8.2.2210: Vim9: allocating a type to set TTFLAG_BOOL_OK
vim-patch:8.2.2550: signal stack size is wrong with latest glibc 2.34
vim-patch:8.2.2585: Vim9: illegal memory access
vim-patch:8.2.2615: test is sourcing the wrong file
vim-patch:8.2.2791: Vim9: memory leak when using \=expr in :substitute
vim-patch:8.2.3065: Vim9: error when sourcing script twice and reusing function
vim-patch:8.2.3310: Vim9: unpack assignment does not mention source of type error
vim-patch:8.2.3327: no check for sysconf() failing
vim-patch:8.2.4558: Motif: using default colors does not work as expected
vim-patch:9.0.0039: not all systems have GDK_KEY_dead_circumflex
vim-patch:9.0.0068: build fails with tiny features
vim-patch:9.0.0074: Coverity warns for double free
vim-patch:9.0.0172: trying to allocate zero bytes
vim-patch:9.0.0209: build error with small features
vim-patch:9.0.0239: build failure without the +wildmenu feature
vim-patch:9.0.0255: build failure without the eval feature
vim-patch:9.0.0290: compiler warning for variable set but not used
vim-patch:9.0.0367: Coverity complains about dropping sign of character
vim-patch:9.0.0368: old Coverity warning for using NULL pointer
vim-patch:9.0.0467: build failure
vim-patch:9.0.0494: small build misses float function declaraitons
vim-patch:9.0.0501: warning for using uninitialized value in mouse test
vim-patch:9.0.0503: build failure
vim-patch:9.0.0504: still a build failure
vim-patch:9.0.0522: build fails on Appveyor
vim-patch:9.0.0624: leaking argument type array
vim-patch:9.0.0628: Coverity warns for not checking return value
vim-patch:9.0.0658: tiny build fails on Mac OS
vim-patch:9.0.0685: FORTIFY_SOURCE causes a crash in Vim9 script
vim-patch:9.0.0689: compiler warning for unused function
vim-patch:9.0.0717: compiler warning for unused variable in tiny build
vim-patch:9.0.0787: mouse scrolling in terminal misbehaves without dll
vim-patch:9.0.0792: MS-Windows: compiler complains about unused function
vim-patch:9.0.0832: deprecation warning causes build failure
vim-patch:9.0.0838: compiler warnings for unused variables
vim-patch:9.0.0921: missing defined(PROTO) in #ifdef
vim-patch:9.0.0929: build failure with tiny version
vim-patch:9.0.0972: build failure on some systems
vim-patch:9.0.0981: build error in tiny version
vim-patch:9.0.0986: build failure with tiny version
vim-patch:9.0.0997: Coverity warns for dead code
vim-patch:9.0.1003: tiny build fails
vim-patch:9.0.1037: lalloc(0) error for a class without members
vim-patch:9.0.1055: Coverity warns for using uninitialized memory
vim-patch:9.0.1059: build failure with some compilers
vim-patch:9.0.1075: build fails if compiler doesn't allow declaration after case
vim-patch:9.0.1102: complicated use of #ifdef
vim-patch:9.0.1109: leaking allocated type
vim-patch:9.0.1110: build fails on Mac OS X 10.4/10.5
vim-patch:9.0.1116: compiler may complain about an unused function
vim-patch:9.0.1131: build failure without the +eval feature
vim-patch:9.0.1153: build error with some compilers
vim-patch:9.0.1154: Coverity warns for dead code
vim-patch:9.0.1162: configure does not handle all FORTIFY_SOURCE variants
vim-patch:9.0.1173: compiler warning for unused variable on non-Unix systems
vim-patch:9.0.1180: compiler warnings without the +job feature
vim-patch:9.0.1216: Coverity warns for ignoring return value
vim-patch:9.0.1219: handling of FORTIFY_SOURCE flags doesn't match Fedora usage
vim-patch:9.0.1260: Coverity warns for possible NULL pointer usage
vim-patch:9.0.1323: build failure with +eval feature
vim-patch:9.0.1340: Coverity warns for using NULL pointer
vim-patch:9.0.1341: build error with mzscheme but without GUI
vim-patch:9.0.1364: build error with older Mac OS
vim-patch:9.0.1420: build failure because SIZE_MAX is not defined
vim-patch:9.0.1465: Haiku build fails
vim-patch:9.0.1642: build failure with tiny features
vim-patch:9.0.1780: Vim9 type not defined during object creation
vim-patch:9.0.1850: Vim9: wrong line number where options set
vim-patch:9.0.1902: Vim9: Coverity complains about dead code
vim-patch:9.0.1905: FEAT_FLOAT no longer defined
vim-patch:9.0.1988: Vim9: potential use-after-free for class members
vim-patch:9.0.1993: warning about unused function definition
vim-patch:9.0.2003: xxd: compilation warning
vim-patch:9.0.2014: confusing ifdefs in if_<lang>.c
vim-patch:9.0.2048: python: uninitialized warning
vim-patch:9.0.2115: crash when callback function aborts because of recursiveness
vim-patch:9.0.2120: un-used assignment in do_source_buffer_init
vim-patch:9.0.2129: [security]: use-after-free in call_dfunc()
vim-patch:9.0.2166: Memory leak in Configure Script when checking GTK
vim-patch:9.0.2175: Compiler warning for uninitialized var
vim-patch:9.0.2185: Coverity complains about not checking return value
vim-patch:9.1.0018: use of #if instead of #ifdef
vim-patch:9.1.0031: Link Error on Windows
vim-patch:9.1.0036: MS-Windows: Warning about unused variable
vim-patch:9.1.0072: Not able to build without FEAT_DIFF
vim-patch:9.1.0203: build-error on GNU/Hurd
vim-patch:9.1.0209: leaking memory in exe_newdict() on error
vim-patch:9.1.0210: Motif: leaking memory when mui_mch_dialog() fails
vim-patch:9.1.0298: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak
vim-patch:9.1.0346: Patch v9.1.0338 fixed sourcing a script with import
vim-patch:9.1.0362: expanding rc config files does not work well
vim-patch:9.1.0432: Ancient XPM preprocessor hack may cause build errors
vim-patch:9.1.0530: xxd: MSVC warning about non-ASCII character
vim-patch:9.1.0561: netbeans: variable used un-initialized (Coverity)
vim-patch:9.1.0609: outdated comments in Makefile
vim-patch:9.1.0621: MS-Windows: startup code can be improved
vim-patch:9.1.0627: MinGW: build-error when COVERAGE is enabled
vim-patch:9.1.0630: MS-Windows: build fails with VIMDLL and mzscheme
vim-patch:9.1.0825: compile error for non-diff builds
vim-patch:9.1.0829: Vim source code uses a mix of tabs and spaces
vim-patch:9.1.0842: not checking for the sync() systemcall
vim-patch:9.1.0858: Coverity complains about dead code
vim-patch:9.1.0947: short-description
vim-patch:9.1.0959: Coverity complains about type conversion
vim-patch:9.1.0970: VMS: build errors on VMS architecture
vim-patch:9.1.1032: link error when FEAT_SPELL not defined
vim-patch:9.1.1041: Vim9: out-of-bound access when echoing an enum
vim-patch:9.1.1079: GUI late startup leads to uninitialized scrollbars
vim-patch:9.1.1153: build error on Haiku
vim-patch:9.1.1199: gvim uses hardcoded xpm icon file
vim-patch:9.1.1248: compile error when building without FEAT_QUICKFIX
vim-patch:9.1.1251: if_python: build error with tuples and dynamic python
vim-patch:9.1.1270: missing out-of-memory checks in buffer.c
vim-patch:9.1.1316: missing memory allocation failure in os_mswin.c
vim-patch:9.1.1440: too many strlen() calls in os_win32.c
rim-patch:9.1.1514: Coverity complains about the use of tmpfile()
vim-patch:9.1.1547: Wayland: missing ifdef
vim-patch:9.1.1580: possible memory leak in vim9type.c
vim-patch:9.1.1581: possible memory leak in vim9generics.c
vim-patch:9.1.1624: Cscope not enabled on MacOS
vim-patch:9.1.1661: Coverity finds a few issues in clientserver.c
vim-patch:9.1.1662: Issues with proto files: missing or inconsistent prototypes.
vim-patch:9.1.1677: wrong ifdef in message.c
vim-patch:9.1.1678: Amiga: cannot handle large undo files
vim-patch:9.1.1705: time.h include is available on all platforms
vim-patch:9.1.1707: diff.pro contains #ifdefs
vim-patch:9.1.1716: wrong indent in win_line()
vim-patch:9.1.1723: Missing ifdefs
vim-patch:9.1.1793: Link error when build without channel feature
vim-patch:9.1.1804: Wrong indentation of nested ifdefs in findfile.c
vim-patch:9.1.1806: Missing PROTO defines
vim-patch:9.1.1842: MS-Windows: build failure when mzscheme is included
vim-patch:9.1.1851: memory leak in heredoc_get()
vim-patch:9.1.1852: vim9class: memory leak in parse_member()
Problem: When pumborder is set, the scrollbar still occupies
a column on the screen, wasting a 1 column of space.
Solution: Render the scrollbar on the right/left (rl mode) side
of the border when pumborder is set.
Follow-up to #33721.
This doesn't seem to affect actual behavior for now, as these two lines
seem only reachable when the 'scrollback' option is changed, and options
can currently only be changed in the current buffer.
Problem: MS-Windows: Relative import in a script sourced from a buffer
doesn't work (Ernie Rael)
Solution: Set a filename, so that we are not trying to use
script-relative filename (Yegappan Lakshmanan)
When a script is sourced from a buffer, the file name is set to ":source
buffer=". In MS-Windows, the ":" is a path separator character (used
after a drive letter). This results in the code trying to use the ":"
prefix to import the script on MS-Windows. To fix this, when importing a
script from a script sourced from a buffer with nofile, don't use
a script relative path name.
fixesvim/vim#14588closes: vim/vim#14603f135fa28e4
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem:
Border width calculations were scattered with repeated
`*p_pumborder != NUL ? 2 : 0` patterns. The "none" value was not
consistently checked, causing borders to appear when pumborder="none".
When "shadow" the info floating window have an extra cell of spacing.
Solution:
Add `pum_border_width()` helper that returns 0 when pumborder is unset
or "none" (opt_winborder_values[7]), returns 1 when pumborder is shadow,
otherwise return 2.
Problem: Crash when allocating signal stack fails.
Solution: Only using sourcing info when available. (closesvim/vim#9215)
0bd8d05638
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Coverity warns for not checking allocation failure.
Solution: Check that allocating a list or blob succeeded.
12553ada3b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: v:register is wrong in v_: command (after 9.1.1858).
Solution: Don't reset v:register for OP_COLON (zeertzjq)
related: https://github.com/vim/vim/pull/18583#issuecomment-3418030021closes: vim/vim#185970124320c97
While at it, also fix using stale set_prevcount value. That only matters
when readbuf1 ends with an operator or a register, which never happens,
but it's still good to avoid using a stale value.
The processing of terminfo can be separated into two steps:
1. The initialization of terminfo, which includes trying to find $TERM
in a terminfo database file. As a fallback, common terminfo
definitions are compiled in. After this, we apply a lot of ad-hoc
patching to cover over limitations of terminfo.
2. While processing updates from nvim, actually using terminfo strings
and formatting them with runtime values. for this part, terminfo
essentially is a hyper-enhanced version of snprintf(), including
a sm0l stack based virtual machine which can manipulate the runtime
parameters.
This PR completely replaces libuniblium for step 2, with code
vendored from NetBSD's libtermkey which has been adapted to use typesafe
input parameters and to write into an output buffer in place.
The most immedatiate effects is a performance enhancement of
update_attrs() which is a very hot function when profiling the
TUI-process part of screen updates. In a stupid microbenchmark
(essentially calling nvim__screenshot over and over in a loop) this
leads to a speedup of ca 1.5x for redrawing the screen on the TUI-side.
What this means in practise when using nvim as a text editor is probably
no noticible effect at all, and when reabusing nvim as idk a full screen
RGB ASCII art rendrer maybe an increase from 72 to 75 FPS LMAO.
As nice side-effect, reduce the usage of unibilium to initialization only..
which will make it easier to remove, replace or make unibilium optional,
adressing #31989. Specifically, the builtin fallback doesn't use
unibilium at all, so a unibilium-free build is in principle possible
if the builtin definitions are good enough.
As a caveat, this PR doesn't touch libtermkey at all, which still has a
conditional dependency on unibilium. This will be investigated in a
follow-up PR
Note: the check of $TERMCOLOR was moved from tui/tui.c to
_defaults.lua in d7651b27d5 as we want to
skip the logic in _defaults.lua if the env var was set, but there
is no harm in TUI getting the right value when the TUI is trying to
initialize its terminfo shenanigans. Also this check is needed when
a TUI connects to a `--headless` server later, which will observe
a different $TERMCOLOR value than the nvim core process itself.
Problem: completion: whitespace not cleared with 'ai'
Solution: Remove spaces added by 'autoindent' when autocomplete is set
and restore did_ai in ins_compl_start() (Maxim Kim)
fixesvim/vim#18560closes: vim/vim#185826180d65751
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem: v:register not reset after Visual mode command.
(laktak)
Solution: Reset v:register if Visual mode was active before
do_pending_operator() (zeertzjq)
fixes: vim/vim#18579
related: vim/vim#5305closes: vim/vim#18583b3b47e540d
vim-patch: 8.1.1985: code for dealing with paths is spread out
vim-patch:8.2.0375: Coverity warning for not using return value
vim-patch:8.2.0471: missing change to compile_list()
vim-patch:8.2.0489: Vim9: memory leaks
vim-patch:8.2.0494: Vim9: asan error
vim-patch:8.2.0685: Build failure
vim-patch:8.2.0759: Vim9: missing changes for performance improvements
vim-patch:8.2.1740: test fails without the terminal feature
vim-patch:8.2.1742: test still fails without the terminal feature
vim-patch:8.2.1880: Vim9: asan complains about adding zero to NULL
vim-patch:8.2.1958: build failure with timers
vim-patch:8.2.2248: ASAN error on exit with GUI
vim-patch:8.2.2273: build failure
vim-patch:8.2.2382: build failure
vim-patch:8.2.2401: build fails without +profiling feature
vim-patch:8.2.2536: Coverity complains about unchecked return value
vim-patch:8.2.2599: build failure
vim-patch:8.2.2715: Vim9: tests fail without the channel feature
vim-patch:8.2.2987: build failure with normal features
vim-patch:8.2.3092: Vim9: builtin function test fails without +channel feature
vim-patch:8.2.3291: Coverity warns for not checking return value
vim-patch:8.2.3505: Vim9: build failure without the +eval feature
vim-patch:8.2.3541: compiler warning for unused variable in tiny version
vim-patch:8.2.3546: build failure without the +eval feature
vim-patch:8.2.3563: build failure with +eval but without GUI or +termguicolors
vim-patch:8.2.3566: build failure on old systems when using nano timestamp
vim-patch:8.2.3621: build failure
vim-patch:8.2.3636: Coverity warns for unreachable code
vim-patch:8.2.3672: build failure with unsigned char
vim-patch:8.2.3691: build failure with small features
vim-patch:8.2.3693: Coverity warns for possibly using a NULL pointer
vim-patch:8.2.3718: compiler warns for unused variable without +textprop
vim-patch:8.2.3724: build error for missing error message in small build
vim-patch:8.2.3736: test fails without the channel feature
vim-patch:8.2.3740: memory left allocated on exit when using Tcl
vim-patch:8.2.3752: build error when using Photon GUI
vim-patch:8.2.3791: build error with +cindent but without +smartindent
vim-patch:8.2.3868: Vim9: function test fails
vim-patch:8.2.3926: build failure without the 'autochdir' option
vim-patch:8.2.3931: Coverity reports a memory leak
vim-patch:8.2.3958: build failure compiling xxd with "-std=c2x"
vim-patch:8.2.3963: build failure with tiny and small features
vim-patch:8.2.3988: tiny build fails
vim-patch:8.2.3998: asan error for adding zero to NULL
vim-patch:8.2.4015: build failure with tiny features
vim-patch:8.2.4034: Coverity warns for possibly using a NULL pointer
vim-patch:8.2.4042: Vim9: build error
vim-patch:8.2.4054: Vim9 script test fails
vim-patch:8.2.4079: MS-Windows: "gvim --version" didn't work with VIMDLL
vim-patch:8.2.4081: CodeQL reports problem in if_cscope causing it to fail
vim-patch:8.2.4119: build failure when disabling the channel feature
vim-patch:8.2.4127: build failure without the +eval feature
vim-patch:8.2.4150: Coverity warns for using pointer after free
vim-patch:8.2.4239: build fails with unusual configuration
vim-patch:8.2.4272: Vim9 expr test fails without the channel feature
vim-patch:8.2.4278: build with Athena GUI fails
vim-patch:8.2.4300: cannot build tiny version
vim-patch:8.2.4368: Amiga: a few compiler warnings
vim-patch:8.2.4369: redundant #ifdef argument
vim-patch:8.2.4385: cannot build tiny version
vim-patch:8.2.4386: still cannot build tiny version
vim-patch:8.2.4405: compiler warning for unused variable without +folding
vim-patch:8.2.4413: Vim9: Coverity warns for using NULL pointer
vim-patch:8.2.4470: Coverity warns for uninitialized variable
vim-patch:8.2.4488: build error with +eval but without +channel or +job
vim-patch:8.2.4516: build failure without the +eval feature
vim-patch:8.2.4521: build failure without the +diff feature
vim-patch:8.2.4532: suspending with CTRL-Z does not work on OpenBSD
vim-patch:8.2.4549: cannot build with Motif and editres
vim-patch:8.2.4550: Motif: cannot set the color of the scrollbar thumb
vim-patch:8.2.4556: test fails without the +job or +channel feature
vim-patch:8.2.4560: suspending with CTRL-Z does not work on DragonFlyBSD
vim-patch:8.2.4654: missing changes for import check
vim-patch:8.2.4680: build failure without +postscript
vim-patch:8.2.4681: build fails with a combination of features
vim-patch:8.2.4725: unused variable in tiny build
vim-patch:8.2.4756: build error without the +eval feature
vim-patch:8.2.4769: build warning with UCRT
vim-patch:8.2.4771: Coverity warns for not checking return value
vim-patch:8.2.4815: cannot build with older GTK version
vim-patch:8.2.4863: accessing freed memory in test without the +channel feature
vim-patch:8.2.4878: valgrind warning for using uninitialized variable
vim-patch:8.2.4884: test fails without the job/channel feature
vim-patch:8.2.4898: Coverity complains about pointer usage
vim-patch:8.2.4900: Vim9 expression test fails without the job feature
vim-patch:8.2.4976: Coverity complains about not restoring a saved value
vim-patch:8.2.5021: build fails with normal features and +terminal
vim-patch:8.2.5067: timer_create is not available on every Mac system
vim-patch:8.2.5071: with some Mac OS version clockid_t is redefined
vim-patch:8.2.5125: MS-Windows: warnings from MinGW compiler
vim-patch:8.2.5133: MacOS: build fails
vim-patch:8.2.5137: cannot build without the +channel feature
vim-patch:8.2.5168: cannot build with Python 3.11
vim-patch:9.0.0123: cannot build with small features
vim-patch:9.0.0159: cannot build with small features
vim-patch:9.0.0161: warning for uninitialized variable
vim-patch:9.0.0237: Mac: cannot build if dispatch.h is not available
vim-patch:9.0.0256: compiler warning for uninitialized variables
vim-patch:9.0.0378: compiler warning for uninitialized variable
vim-patch:9.0.0413: ASAN reports a memory leak
vim-patch:9.0.0462: ASAN warning for integer overflow
vim-patch:9.0.0970: Coverity warns for uninitialized variable
vim-patch:9.0.1042: ASAN gives false alarm about array access.
vim-patch:9.0.1076: ASAN complains about NULL argument
vim-patch:9.0.1085: compiler warns for uninitialized variable
vim-patch:9.0.1666: compiler may warn for uninitialized variable
vim-patch:9.1.0816: tests: not clear what tests cause asan failures
vim-patch:9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading
Problem: when create a hidden terminal job with `nvim_buf_call`+
`jobstart(…,{term=true})`, program like `lazygit` cannot figure out the
correct width and height.
Solution: `jobstart(…,{term=true})` accepts `width`/`height`
Problem: if pumblend >= 50, non-whitespace menu character gets italic,
bold, underline (or similar) attribute from the cell underneath, which
is not really useful and can't be "blended".
Solution: drop highlight combination for that special case (@zeertzjq
on #36133).
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
- Column align tags
- Move tags to the same line as the function signature
- Move descriptions to the line below the function signature
- Add missing hyperlinks to builtins in the description text
closes: vim/vim#1847883eb1da19e
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: Ctrl-F and Ctrl-B at more prompt not working with kitty
keyboard protocol or modifyOtherKeys (after v9.1.1849).
Solution: Call merge_modifyOtherKeys() in get_keystroke() (zeertzjq).
closes: vim/vim#185586622dc2ded
Problem: CTRL-F and CTRL-B don't work in more prompt
Solution: Make CTRL-F and CTRL-B scroll by a screen down/up
(Bjoern Foersterling)
closes: vim/vim#18545fcf4c435af
Co-authored-by: bfoersterling <bjoern.foersterling@gmail.com>
Use double sentence spacing and wrap lines at 'textwidth'. Code
examples and tables were not wrapped unless this had already been done
locally.
closes: vim/vim#18453c58f91c035
Fix incorrect docs in :h ModeChanged.
Cherry-pick :h bufnr() changes from patch 8.1.2080.
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: Build failure without the +eval feature.
Solution: Use other error message. Avoid warnings.
a9549c9e8f
Co-authored-by: Bram Moolenaar <Bram@vim.org>