summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-03-24patch 9.1.0202: leaking memory in add_user() on failurev9.1.0202Christian Brabandt
Problem: leaking memory in add_user() (LuMingYinDetect) Solution: free user_copy pointer instead of the user ptr add_user() is called with a user pointer and the user pointer comes from these functions: - return value from the getpwent() function (Unix). - return value from the getpwnam() function (Unix). - return value from the NetUserEnum() function (MS Windows). For the first 2 callers, the man page for those functions directly says, one should not free the returned pointer (since it comes from static memory). For the third caller (on MS Windows), the returned buffer is already freed directly after calling the add_user() function in NetApiBufferFree(), so this would lead to a double free(). This all indicates, the user ptr is wrongly freed in the add_user() function and the intention was to free the user_copy pointer instead in case of an error. So let's just use that now. fixes: #14250 closes: #14260 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24patch 9.1.0201: gM not working correctly with virt textv9.1.0201Dylan Thacker-Smith
Problem: `gM` would include outer virtual text and its padding when getting the line length used to calculate the middle of the line, putting the cursor much closer to virtual text lines. Solution: Exclude outer virtual text in getting the line length for `gM`, so that virtual text doesn't influence where the cursor is moved to (Dylan Thacker-Smith). closes: #14262 Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24patch 9.1.0200: `gj`/`gk` not skipping over outer virtual text linesv9.1.0200Dylan Thacker-Smith
Problem: `gj`/`gk` was updating the desired cursor virtual column to the outer virtual text, even though the actual cursor position was moved to not be on the virtual text, leading the need to do an extra `gj`/`gk` to move past each virtual text line. (rickhowe) Solution: Exclude the outer virtual text when getting the line length for moving the cursor with `gj`/`gk`, so that no extra movement is needed to skip over virtual text lines. (Dylan Thacker-Smith) fixes: #12028 related: #14262 Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24runtime(termdebug): allow multibyte characters as breakpoint signs (#14274)Mihai Ciuraru
Allow multibyte characters as termdebug signs using slice() function Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Mihai Ciuraru <mihai.ciuraru@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-23patch 9.1.0199: Not enough tests for the slice() functionv9.1.0199zeertzjq
Problem: Not enough tests for the slice() function. Solution: Test with multibyte chars, and in both Legacy and Vim9 script. Update docs to be clearer about how it treats composing chars. (zeertzjq) closes: #14275 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22patch 9.1.0198: Vim9: compound operators broken for lambdas in an objectv9.1.0198Yegappan Lakshmanan
Problem: Vim9: compound operators broken for lambdas in an object (girishji) Solution: When using an object from the outer scope, use the LOADOUTER instruction to load the object (Yegappan Lakshmanan). fixes: #14236 closes: #14266 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22runtime(vim): Update base-syntax, remove old unused syntax groups. (#14146)dkearns
Remove old unused syntax groups. - vimRegion, vimPattern and vimKeyword removed in Vim 5.3. - vimAuSyntax, vimAutoCmdOpt, vimAutoSet and vimStatement removed in 5.6. The following were linked in :hi commands but never defined with :syn and, most likely, never used: - vimHLMod introduced in 5.0. - vimKeycode and vimKeycodeError introduced in 5.4. - vimElseif introduced in 5.6. - vimFold introduced in 6.4. - vimOperStar (and vimoperStar) introduced in 9.0. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22patch 9.1.0197: Vim9: problem evaluating negated boolean logicv9.1.0197Yegappan Lakshmanan
Problem: Vim9: problem evaluating negated boolean logic (lxhillwind) Solution: Don't clear the first value on short circuit evaluation (Yegappan Lakshmanan) fixes: #14265 closes: #14269 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22CI: Fix for Sodium version 1.0.19 and MinGW (#14267)Restorer
Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22runtime(java): Recognise the {@snippet} documentation tag (#14271)Aliaksei Budavei
Remember that ‘code fragments are typically Java source code, but they may also be fragments of properties files, source code in other languages, or plain text.’ Therefore, with these changes, markup tags are highlighted in the Java source files (as external snippets) and in the {@snippet} tags. Also: - Improve matching of the multi-line {@code} documentation tag with any contained balanced braces. - Recognise the {@literal} documentation tag. - Highlight stray blanks in comments. Related to an enhancement proposal for PCRE-like callouts discussed at https://github.com/vim/vim/issues/11217. References: https://openjdk.org/jeps/413 https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21CI: mingw complains about unknown escape sequence: '\l', fails with ↵Christian Brabandt
libsodium (#14259) Problem: CI: mingw complains about unknown escape sequence: '\l', fails with sodium v1.0.19 Solution: Use other slash instead, also revert sodium version to v1.0.18 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21runtime(vim): Update base-syntax, improve function definition highlighting ↵dkearns
(#14203) Improve function definition highlighting. - Match bang and function modifiers - abort etc. - Only match valid scope modifiers. - Match listing commands. - Don't match ex commands in function names. - Split function syntax groups into :func and :def subgroups. - Match Vim9-script parameter and return types. - Limit legacy-script and Vim9-script comments to :func and :def definitions, respectively. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21patch 9.1.0196: filetype: support for gnuplot files is lackingv9.1.0196RobbiZ98
Problem: filetype: support for gnuplot files is lacking Solution: Also detect *.gnuplot files (RobbiZ98) closes: #14243 Signed-off-by: RobbiZ98 <113035863+RobbiZ98@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21patch 9.1.0195: memleak with ex_drop, NULL dereferencev9.1.0195Christian Brabandt
Problem: memleak with ex_drop(), NULL dereference (zeertzjq) Solution: revert back to ex_rewind(), use curbuf instead of buf fixes: #14246 closes: #14251 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21patch 9.1.0194: gcc complains about uninitialized varv9.1.0194Christian Brabandt
Problem: gcc complains about uninitialized var (Tony Mechelynck) Solution: initialize to NULL Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21patch 9.1.0193: May leak memory in completion when ga_grow() failsv9.1.0193zeertzjq
Problem: May leak memory in completion when ga_grow() fails. Solution: Free "wca" when ga_grow() fails (zeertzjq). fixes: #14248 closes: #14249 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20runtime(colors): don't unnecessarily reload v:colornames dictAlin Mr
fixes: #14234 closes: #14235 Signed-off-by: Alin Mr <almr.oss@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20patch 9.1.0192: drop: don't rewind when editing the same filev9.1.0192Christian Brabandt
Problem: :drop tries to :rewind the argumentlist, which results in E37 (after v9.1.0046) Solution: instead of calling ex_rewind(), call open_buffer() only when re-using the initial empty buffer fixes: #14219 closes: #14220 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20patch 9.1.0191: Installer does not remove all filesv9.1.0191RestorerZ
Problem: Installer does not remove all files Solution: Update installer and delete all files on uninstall update Sodium library dependency, update Readme (RestorerZ) closes: #14214 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20patch 9.1.0190: complete_info() returns wrong order of itemsv9.1.0190Girish Palya
Problem: complete_info() returns wrong order of items (after v9.0.2018) Solution: Revert Patch v9.0.2018 (Girish Palya) bug fix: complete_info() gives wrong results 1) complete_info() reverses list of items during <c-p> 2) 'selected' item index is wrong during <c-p> 3) number of items returnd can be wrong Solution: - Decouple 'cp_number' from 'selected' index since they need not be correlated - Do not iterate the list backwards - Add targeted tests Regression introduced by https://github.com/vim/vim/commit/69fb5afb3bc9da24c2fb0eafb0027ba9c6502fc2 Following are unnecessary commits to patch problems from above: https://github.com/vim/vim/commit/fef66301665027f1801a18d796f74584666f41ef https://github.com/vim/vim/commit/daef8c74375141974d61b85199b383017644978c All the tests from above commits are retained though. fixes: #14204 closes: #14241 Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20runtime(deb822sources): Add minimal ftplugin (#14240)James McCoy
Set comment related options and avoid automatic line wrapping. Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20patch 9.1.0189: Memory leak with "above" virttext and 'relativenumber'v9.1.0189zeertzjq
Problem: Memory leak with "above" virtual text and 'relativenumber'. Solution: Free "text_props" and "text_prop_idxs" before returning. Also fix off-by-one error causing line number to be drawn beyond end of window (zeertzjq). fixes: #14239 closes: #14241 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-19patch 9.1.0188: filetype: no support for Vento filesv9.1.0188wrapperup
Problem: Vento files are not recognized. Solution: Recognize *.vto files as filetype "vento" (wrapperup) Vento is a templating engine https://vento.js.org/ closes: #14229 Signed-off-by: wrapperup <wrapperup4@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-19runtime(vim): Update base-syntax, disallow '.' at start of menu item names ↵dkearns
(#14232) Disallow '.' at the start of a menu item name. This is the menu path separator character and should be escaped with a '\' in this case. Partially fixes #14230. "popup" is still incorrectly matched as the Ex command. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(syntax-tests): regenerate c_00 and markdown dumpsChristian Brabandt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(syntax-tests): include missing changesAliaksei Budavei
related: #14215 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(rust): Respect no_plugin_maps and no_rust_maps globals (#14221)MyyPo
Signed-off-by: myypo <nikirsmcgl@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(syntax-tests): Retrofit input/c.c. with TEST_SETUPAliaksei Budavei
Also: - Include a syntax test for Markdown that takes advantage of a sourceable setup configuration. - Update Filelist closes: #14215 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(syntax-tests): Support sourceable Vim configuration for syntax testsAliaksei Budavei
Not all programming languages support comments; without such support, the TEST_SETUP functionality that offers embeddable Vim Ex commands may no longer be applicable. We can achieve similar functionality by storing Ex commands in a Vim file with its basename matching the basename of the test file, and having this Vim file sourced, and then having the test file loaded and tested. When such a Vim file would be used for a language that has comments and whose matching test file has embedded TEST_SETUP lines, we will accommodate it by letting the TEST_SETUP lines augment and/or overrule sourced configuration. Further details can be found in the discussion thread at https://github.com/vim/vim/discussions/14117. related: #14215 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(syntax-tests): Support embeddable Vim configuration for syntax testsAliaksei Budavei
Currently, the very same syntax file for which a test can be written is the only place where global variables can be defined so that the file parts guarded with such variables can be read during screen dump generation. This approach would lead to littering the syntax file with test-related queries. Instead, we could borrow the idea of comment-based mechanism for test setup from the indent test runner. With it, the first 20 lines of each test file would be ALWAYS scanned in search of the TEST_SETUP markers and, when found, the part between the end of the marker and the end of the line would be treated as a Vim Ex command. Note that with these changes, runtime/defaults.vim is no longer sourced for screen dump generation; however, some of its functionality is reintroduced. Further details can be found in the discussion thread at https://github.com/vim/vim/discussions/14117. related: #14215 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(doc): Recover some missed commas and periods in starting.txtAliaksei Budavei
Also: - Insert some missing words; - Strive for consistency with capitalisation of words; - Improve shell alias examples. The gvim words were left alone for now, but they deserve to be treated like proper names, GVim or GUI Vim, unless these refer to executable filenames (on *nix systems). closes: #14194 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18patch 9.1.0187: filetype: no support for Dafny filesv9.1.0187zeertzjq
Problem: Dafny files are not recognized. Solution: Recognize *.dfy files as filetype "dafny" (zeertzjq). Ref: https://dafny.org/ Ref: https://github.com/mlr-msft/vim-loves-dafny closes: #14226 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18runtime(vim): Update base-syntax, improve :highlight command (#14228)dkearns
Improve :highlight command highlighting - Use the same highlight groups for "default link" with and without bang. - Match some common line-continuation use. - Match :hi clear variants. - Highlight color-name values. Resync vim.vim and generator/vim.vim.base. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17runtime(doc): clarify close behaviour for :termChristian Brabandt
closes: #14207 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17runtime(go): `goPackageComment` highlighting too broadMatthew Hughes
Previously this would highlight any comment before a line starting `package`, for example var ( // This comment would be highlighted as a goPackageComment packages []string ) The package clause is only valid when followed by a space[1], so include this restriction This is upstreaming a change from `go-vim`[2] [1] https://go.dev/ref/spec#Package_clause [2] https://github.com/fatih/vim-go/commit/d1c36cc4173093d0be78fd826978a024febe6233 Signed-off-by: Matthew Hughes <matthewhughes934@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17patch 9.1.0186: cursor pos wrong on mouse click after eol with 'rl', 've' ↵v9.1.0186zeertzjq
and conceal Problem: Wrong cursor position when clicking after end of line with 'rightleft', 'virtualedit' and conceal. Solution: Set values in ScreenCols[] also with SLF_RIGHTLEFT. Also fix off-by-one cursor position with 'colorcolumn' (zeertzjq). closes: #14218 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17patch 9.1.0185: 'wincolor' hl missing with 'rightleft', "below" virttext, ↵v9.1.0185zeertzjq
'nowrap' Problem: 'wincolor' highlight missing with 'rightleft', "below" virtual text and 'nowrap'. Solution: Handle 'rightleft' in draw_screen_line() (zeertzjq). closes: #14216 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16runtime(indent-test): MS-Windows: Add Makefile for running indent testsRestorerZ
A few more unrelated changes: - fix Vim script style of indent test - Change comments to complete sentences in Filelist closes: #14198
2024-03-16patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrapv9.1.0184zeertzjq
Problem: Cursor position wrong when clicking with conceal and wrap. Solution: Use the virtual column of the last char for ScreenCols[] in boguscols. Remove use of MAXCOL in ScreenCols[]. Rename third argument of wlv_screen_line() to "clear_end" as that's clearer what it does (zeertzjq). related: 14192 closes: #14200 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16patch 9.1.0183: Wrong display or screenpos() result when toggling diff modev9.1.0183zeertzjq
Problem: Wrong display or screenpos() result when toggling diff mode. Solution: Reset w_skipcol when disabling 'wrap'. Reset w_leftcol when enabling 'wrap' (zeertzjq). fixes: #14210 closes: #14211 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16patch 9.1.0182: Can define function with invalid name inside 'formatexpr'v9.1.0182zeertzjq
Problem: Can define function with invalid name inside 'formatexpr'. Solution: Use goto instead of checking for did_emsg later. (zeertzjq) closes: #14209 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16tools/rename.bat uses 'mv' and "move" (#14201)Restorer
refactor tools/rename.bat and support both "mv" for Linux build environments and "move" for Windows build environments Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16runtime(doc): make :h tag-! more consistent (#14208)zeertzjq
- Use "on" and "off" for 'winfixbuf' option values. - Retab the table. Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-15runtime(vim): Update base-syntax, revert last change to vimUserFunc (#14202)dkearns
Fix highlighting of ":echo (expr)" (broken in commit 61887b3) by re-enabling the original fix for #9987. Addresses https://github.com/vim/vim/pull/14199#issuecomment-1999732062. This will be fixed more generally when there is context-sensitive matching for commands and functions. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-15runtime(vim): Update base-syntax, improve :echo and :execute highlighting ↵dkearns
(#14199) Improve :echo and :execute highlighting. - Add better line-continuation support for both commands. - Improve the :execute command's expression argument matching. - Remove the fix for issue #9987 as this is now handled by correctly matching the parens in :echo (...) as operator parens. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14patch 9.1.0181: no overflow check for string formattingv9.1.0181Christ van Willegen
Problem: no overflow check for string formatting Solution: Check message formatting function for overflow. (Chris van Willegen) closes: #13799 Signed-off-by: Christ van Willegen <cvwillegen@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14patch 9.1.0180: Cursor pos wrong when double-width chars are concealedv9.1.0180zeertzjq
Problem: Cursor pos wrong when double-width chars are concealed. Solution: Advance one more virtual column for a double-width char. Run some tests with both 'wrap' and 'nowrap' (zeertzjq). closes: #14197 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14patch 9.1.0179: 'wincolor' highlight missing with "below" virtual textv9.1.0179zeertzjq
Problem: 'wincolor' highlight missing with "below" virtual text. Solution: Subtract n_attr_skip from n_attr. Combine 'wincolor' with other highlights when 'nowrap' is set. (zeertzjq) closes: #14196 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14runtime(mswin): still another clipboard_working testChristian Brabandt
Commit 760f664213dea9a300454992ba1589f4601d622f missed to revert back another test for `if has('clipboard_working')` So change the remaining check around the inoremap <c-v> mappings. fixes #14195 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13patch 9.1.0178: E1513 might be confusingv9.1.0178Christian Brabandt
Problem: E1513 might be confusing (Christoph Thoma) Solution: reword error message, fix test to not depend on the actual message fixes: #14189 Signed-off-by: Christian Brabandt <cb@256bit.org>