]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
2 years agopatch 9.0.1901: win32: not correctly freeing environment v9.0.1901
Ken Takata [Sat, 16 Sep 2023 11:56:02 +0000 (13:56 +0200)] 
patch 9.0.1901: win32: not correctly freeing environment

Problem:  win32: not correctly freeing environment
Solution: After we call GetEnvironmentStringsW, we should call
          FreeEnvironmentStringsW

closes: #13096
closes: #13094

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2 years agopatch 9.0.1900: Configure script uses non-portable == comparison v9.0.1900
Yee Cheng Chin [Sat, 16 Sep 2023 11:38:26 +0000 (13:38 +0200)] 
patch 9.0.1900: Configure script uses non-portable == comparison

Problem:  Configure script uses non-portable == comparison
Solution: Use the standard and portable "=" instead

closes: #13095
closes: #13099

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1899: potential buffer overflow in PBYTE macro v9.0.1899
Christian Brabandt [Fri, 15 Sep 2023 18:22:02 +0000 (20:22 +0200)] 
patch 9.0.1899: potential buffer overflow in PBYTE macro

Problem:  potential buffer overflow in PBYTE macro
Solution: Check returned memline length

closes: #13083

the PBYTE macro is used to put byte c at a position lp of the returned
memline. However, in case of unexpected errors ml_get_buf() may return
either "???" or an empty line in which case it is quite likely that we
are causing a buffer overrun.

Therefore, switch the macro PBYTE (which is only used in ops.c anyhow)
to a function, that verifies that we will only try to access within the
given length of the buffer.

Also, since the macro is only used in ops.c, move the definition from
macros.h to ops.c

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1898: Vim9: restrict access to static vars v9.0.1898
Yegappan Lakshmanan [Fri, 15 Sep 2023 18:14:55 +0000 (20:14 +0200)] 
patch 9.0.1898: Vim9: restrict access to static vars

Problem:  Vim9: restrict access to static vars and methods
Solution: Class members are accesible only from the class where they are
          defined.

Based on the #13004 discussion, the following changes are made:

    1) Static variables and methods are accessible only using the class
       name and inside the class where they are defined.
    2) Static variables and methods can be used without the class name in
       the class where they are defined.
    3) Static variables of a super class are not copied to the sub class.
    4) A sub class can declare a class variable with the same name as the
       super class.
    5) When a method or member is found during compilation, use more
       specific error messages.

This aligns the Vim9 class variable/method implementation with the Dart
implementation.

Also while at it, ignore duplicate class and object methods.

The access level of an object method can however be changed in a
subclass.

For the tests, use the new CheckSourceFailure() function instead of the
CheckScriptFailure() function in the tests.

closes: #13086

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(vim): Highlight all :loadkeymap abbreviations in vim syntax (#13092)
dkearns [Fri, 15 Sep 2023 18:12:50 +0000 (04:12 +1000)] 
runtime(vim): Highlight all :loadkeymap abbreviations in vim syntax (#13092)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(forth): Fix :unlet error in ftplugin (#13090)
dkearns [Fri, 15 Sep 2023 14:47:06 +0000 (00:47 +1000)] 
runtime(forth): Fix :unlet error in ftplugin (#13090)

Fixes #13089.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(help): Updated documentation on editorconfig
Christian Brabandt [Tue, 12 Sep 2023 19:08:54 +0000 (21:08 +0200)] 
runtime(help): Updated documentation on editorconfig

Add a small section about the distributed Editorconfig plugin at :h
usr_05.txt just below the matchit plugin.  While editing that help
document, also add a bit of more documentation about standard plugins
and local help file additions.

Regenerate $VIMRUNTIME/doc/tags file with all the new tags from the rust
runtime files.

While at it, update the Editorconfig help page (and re-generate the
helptags file).

closes: #13078

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(swayconfig): improve syntax highlighting (#13060)
Josef Litoš [Tue, 12 Sep 2023 18:24:47 +0000 (20:24 +0200)] 
runtime(swayconfig): improve syntax highlighting (#13060)

* syntax(swayconfig): improved highlighting
* syntax(swayconfig): adapt to i3config structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(rust): sync rust runtime files with upstream (#13075)
Gregory Anders [Tue, 12 Sep 2023 18:23:38 +0000 (13:23 -0500)] 
runtime(rust): sync rust runtime files with upstream (#13075)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(i3config): syntax structure cleanup (#13080)
Josef Litoš [Tue, 12 Sep 2023 18:20:25 +0000 (20:20 +0200)] 
runtime(i3config): syntax structure cleanup (#13080)

* syntax(i3config): improved i3config highlighting
* syntax(i3config): refactor structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(doc): documentation updates
Christian Brabandt [Tue, 15 Aug 2023 22:11:09 +0000 (00:11 +0200)] 
runtime(doc): documentation updates

This is a collection of various improvements to the help pages

closes #12790

Co-authored-by: Houl <anwoku@yahoo.de>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agosyntax(i3config): improved i3config highlighting (#13054)
Josef Litoš [Mon, 11 Sep 2023 18:12:48 +0000 (20:12 +0200)] 
syntax(i3config): improved i3config highlighting (#13054)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1897: Vim9: confusing error with .= in compiled functions v9.0.1897
Christian Brabandt [Mon, 11 Sep 2023 18:08:50 +0000 (20:08 +0200)] 
patch 9.0.1897: Vim9: confusing error with .= in compiled functions

Problem:  Vim9: confusing error with .= in compiled functions
Solution: Check in error condition, if .= was attempted and in that case
          give a different error message.

closes: #12972
closes: #13066

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1896: "below" virtual text doesn't work with 'rightleft' v9.0.1896
zeertzjq [Mon, 11 Sep 2023 18:01:17 +0000 (20:01 +0200)] 
patch 9.0.1896: "below" virtual text doesn't work with 'rightleft'

Problem:  "below" virtual text doesn't work with 'rightleft'.
Solution: Use column from right border with 'rightleft'.

closes: #13071

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1895: Vim9: finding object method/member is inefficient v9.0.1895
Ernie Rael [Mon, 11 Sep 2023 17:54:42 +0000 (19:54 +0200)] 
patch 9.0.1895: Vim9: finding object method/member is inefficient

Problem:  Vim9: finding method/member is inefficient
Solution: Use lookups

closes: #13073

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agoruntime(doc): Add g:c_syntax_for_h to filetype-overrule docs
Doug Kearns [Mon, 11 Sep 2023 14:58:27 +0000 (00:58 +1000)] 
runtime(doc): Add g:c_syntax_for_h to filetype-overrule docs

closes: #13074

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoCI: Bump actions/checkout from 3 to 4 (#13072)
dependabot[bot] [Mon, 11 Sep 2023 17:43:33 +0000 (19:43 +0200)] 
CI: Bump actions/checkout from 3 to 4 (#13072)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1894: CI: trailing whitespace in tests v9.0.1894
Christian Brabandt [Sun, 10 Sep 2023 17:25:26 +0000 (19:25 +0200)] 
patch 9.0.1894: CI: trailing whitespace in tests

Problem:  CI: trailing white space in tests
Solution: clean up the trailing white space

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1893: CI: strptime test fails on BSD14 v9.0.1893
Christian Brabandt [Sun, 10 Sep 2023 17:06:09 +0000 (19:06 +0200)] 
patch 9.0.1893: CI: strptime test fails on BSD14

Problem:  CI: strptime test fails on BSD14
Solution: Skip the test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1892: CI: no FreeBSD 14 support v9.0.1892
Philip H [Sun, 10 Sep 2023 16:31:51 +0000 (18:31 +0200)] 
patch 9.0.1892: CI: no FreeBSD 14 support

Problem:  CI: no FreeBSD 14 support
Solution: Drop support for FreeBSD 12, add FreeBSD 14

closes: #13059

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2 years agoruntime(masm): add support for AVX-2 and AVX-512 (#13061)
Wu Yongwei [Sun, 10 Sep 2023 16:27:31 +0000 (00:27 +0800)] 
runtime(masm): add support for AVX-2 and AVX-512 (#13061)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1891: No runtime support for Mojo v9.0.1891
Mahmoud Abduljawad [Sun, 10 Sep 2023 16:23:04 +0000 (18:23 +0200)] 
patch 9.0.1891: No runtime support for Mojo

Problem:  No runtime support for Mojo
Solution: Add basic filetype and syntax plugins

closes: #13062
closes: #13063

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Mahmoud Abduljawad <mahmoud@masaar.com>
2 years agopatch 9.0.1890: Vim9: lookup code for class/object repaeated v9.0.1890
Yegappan Lakshmanan [Sun, 10 Sep 2023 16:19:06 +0000 (18:19 +0200)] 
patch 9.0.1890: Vim9: lookup code for class/object repaeated

Problem:  Vim9: lookup code for class/object repaeated
Solution: Refactor and make use of lookup functions

closes: #13067

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(scala): Fix Scala highlighting string literal as type param (#13070)
Emil Ejbyfeldt [Sun, 10 Sep 2023 16:16:51 +0000 (18:16 +0200)] 
runtime(scala): Fix Scala highlighting string literal as type param (#13070)

Since https://docs.scala-lang.org/sips/42.type.html which is implemented
in Scala 2.13 and in Scala 3 it possible to use string literals as
singleton types. So code like
```
someFunc["abc"]
```
is valid. Currently this code is not hightlighted correctly and worse if
there is an unclosed `(` in the string it breaks the formating in the
rest of the file.

I also submitted this patch to the mentioned project for this runtime
file: https://github.com/derekwyatt/vim-scala/pull/173 But there are no
commits there over the last 2 years and no response in the week since I
created it. Also the last change to the Scala syntax file:
https://github.com/vim/vim/pull/9594 is yet to be backported to that
repo. Therefore I am opening this PR as well to get some feedback on how
to proceed to get this fixed.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1889: Vim9 static tests fail v9.0.1889
Yegappan Lakshmanan [Sun, 10 Sep 2023 16:12:56 +0000 (18:12 +0200)] 
patch 9.0.1889: Vim9 static tests fail

Problem:  Vim9 static tests fail
Solution: Fix tests, make CI happy ;)

closes: #13064

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(nasm): updated syntax file
Andrii Sokolov [Sat, 9 Sep 2023 10:00:09 +0000 (12:00 +0200)] 
runtime(nasm): updated syntax file

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1888: Vim9: Problem trying to invoke class method v9.0.1888
Yegappan Lakshmanan [Sat, 9 Sep 2023 09:37:23 +0000 (11:37 +0200)] 
patch 9.0.1888: Vim9: Problem trying to invoke class method

Problem:  Vim9: Problem trying to invoke class method
Solution: Lookup the class method insider other classes

closes: #13055

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1887: Vim9: class members are accessible via object v9.0.1887
Yegappan Lakshmanan [Sat, 9 Sep 2023 09:33:29 +0000 (11:33 +0200)] 
patch 9.0.1887: Vim9: class members are accessible via object

Problem:  Vim9: class members are accessible via object
Solution: Disable class member variable access using an object

Class methods can be accessed only using the class name and cannot be
accessed using an object. To be consistent with this, do the same for
class member variables also. They can be accessed only using the class
name and not using an object.

closes: #13057

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1886: Various Typos v9.0.1886
Christian Brabandt [Sat, 9 Sep 2023 09:23:50 +0000 (11:23 +0200)] 
patch 9.0.1886: Various Typos

Problem:  Various Typos
Solution: Fix Typos

This is a collection of typo related commits.

closes: #12753
closes: #13016

Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Co-authored-by: nuid64 <lvkuzvesov@proton.me>
Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com>
Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1885: Vim9: no support for abstract methods v9.0.1885
Yegappan Lakshmanan [Fri, 8 Sep 2023 17:27:51 +0000 (19:27 +0200)] 
patch 9.0.1885: Vim9: no support for abstract methods

Problem:  Vim9: no support for abstract methods
Solution: Add support for defining abstract methods in an abstract class

closes: #13044
closes: #13046

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(tohtml): Update TOhtml to version 9.0v2 (#13050)
fritzophrenic [Fri, 8 Sep 2023 17:20:01 +0000 (12:20 -0500)] 
runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)

Modified behavior:
  - Change default value of g:html_use_input_for_pc from "fallback" to
    "none". This means with default settings, only the standards-based
    method to make special text unselectable is used. The old method
    relying on unspecified browser behavior for <input> tags is now only
    used if a user specifically enables it.
  - Officially deprecate g:use_xhtml option (in favor of
    g:html_use_xhtml) by issuing a warning message when used.

Bugfixes:
  - Fix issue #8547: LineNr and other special highlight groups did not
    get proper style rules defined when using "hi link".
  - Fix that diff filler was not properly added for deleted lines at the
    end of a buffer.

Other:
  - Refactored function definitions from long lists of strings to use
    :let-heredoc variable assignment instead.
  - Corrected deprecated "." string concatenation operator to ".."
    operator in more places.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1884: Wrong order of arguments for error messages v9.0.1884
Christ van Willegen [Fri, 8 Sep 2023 17:17:09 +0000 (19:17 +0200)] 
patch 9.0.1884: Wrong order of arguments for error messages

Problem:  Wrong order of arguments for error messages
Solution: Reverse order or arguments for e_aptypes_is_null_nr_str

closes: #13051

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2 years agoruntime(perl): Update ftplugin and indent files (#13052)
dkearns [Fri, 8 Sep 2023 17:16:03 +0000 (03:16 +1000)] 
runtime(perl): Update ftplugin and indent files (#13052)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1883: Vim9: Calling an interface method using a child object fails v9.0.1883
Yegappan Lakshmanan [Fri, 8 Sep 2023 17:12:03 +0000 (19:12 +0200)] 
patch 9.0.1883: Vim9: Calling an interface method using a child object fails

Problem:  Vim9: Calling an interface method using a child object fails
Solution: Search methods of parent class

When a class implementing an interface is extended by another class and
a child class instance is passed to a function that accepts the
interface, calling an interface method doesn't work properly.

closes: #13053

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime(doc): update help tags file
Christian Brabandt [Wed, 6 Sep 2023 14:39:14 +0000 (16:39 +0200)] 
runtime(doc): update help tags file

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1882: Trailing white space in tests v9.0.1882
Christian Brabandt [Wed, 6 Sep 2023 19:12:24 +0000 (21:12 +0200)] 
patch 9.0.1882: Trailing white space in tests

Problem:  Trailing white space in tests
Solution: Delete it

This causes test_codestyle to fail, so we need to remove it again.
Hopefully that makes the CI green again.

Note: I will start using annotated tags from now on.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1881: Test_crash fails on Mac v9.0.1881
Christian Brabandt [Wed, 6 Sep 2023 18:53:46 +0000 (20:53 +0200)] 
patch 9.0.1881: Test_crash fails on Mac

Problem:  Test_crash fails on Mac
Solution: Skip test on Mac

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1880: Vim9: Need more tests for inheritance v9.0.1880
Ernie Rael [Wed, 6 Sep 2023 18:45:03 +0000 (20:45 +0200)] 
patch 9.0.1880: Vim9: Need more tests for inheritance

Problem:  Vim9: Need more tests for inheritance
Solution: Add access tests and fixes.

`inside_class` fix from yegappan. `object_index_from_itf_index` fix
access of member on class extending class implementing interface.

Based on tests from Vim9: Class/Object member variable access control #12979

closes: #13032
related: #12979

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agoruntime: don't execute external commands when loading ftplugins
Christian Brabandt [Wed, 6 Sep 2023 18:41:25 +0000 (20:41 +0200)] 
runtime: don't execute external commands when loading ftplugins

This is a followup to 816fbcc262687b81fc46f82f7bbeb1453addfe0c (patch
9.0.1833: [security] runtime file fixes)

It basically disables that external commands are run on loading of the
filetype plugin, **unless** the user has set the `g:plugin_exec = 1`
global variable in their configuration or for a specific filetype the
variable g:<filetype>_exec=1.

There are a few more plugins, that may execute system commands like
debchangelog, gitcommit, sh, racket, zsh, ps1 but those do at least
do not run those commands by default during loading of the filetype plugin
(there the command is mostly run as convenience for auto-completion or
to provide documentation lookup).

closes: #13034

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <vim@tpope.org>
2 years agopatch 9.0.1879: Vim9: incorrect duplicate class member detection v9.0.1879
Yegappan Lakshmanan [Wed, 6 Sep 2023 18:23:23 +0000 (20:23 +0200)] 
patch 9.0.1879: Vim9: incorrect duplicate class member detection

Problem:  Vim9: incorrect duplicate class member detection
Solution: Incorrect duplicate class member detection when variable names
          have the same prefix.  Not able to access class member variables
          using an object. Fix coding style issues

closes: #13042

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1878: tests running sh have problems v9.0.1878
Philip H [Wed, 6 Sep 2023 18:20:07 +0000 (20:20 +0200)] 
patch 9.0.1878: tests running sh have problems

Problem:  tests running sh have problems
Solution: Check that dash is installed

closes: #13040

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1877: missing test for patch 9.0.1873 v9.0.1877
Christian Brabandt [Wed, 6 Sep 2023 17:53:36 +0000 (19:53 +0200)] 
patch 9.0.1877: missing test for patch 9.0.1873

Problem:  missing test for patch 9.0.1873
Solution: add a test trying to exchange windows

Add a test, making sure that switching windows is not allowed when
textlock is active, e.g. when running `:s/<pat>/\=func()/`

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(ftplugin): allow to exec if curdir is in PATH
Anton Sharonov [Tue, 5 Sep 2023 19:03:27 +0000 (21:03 +0200)] 
runtime(ftplugin): allow to exec if curdir is in PATH

In case the current directory is present as valid $PATH entry, it is OK
to call the program from it, even if vim curdir is in that same
directory.

(Without that patch, for instance, you will not be able to open .zip
files while your current directory is /bin)

closes: #13027

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoFilelist: Add missing directory `crash` (#13036)
zdohnal [Tue, 5 Sep 2023 18:55:47 +0000 (20:55 +0200)] 
Filelist: Add missing directory `crash` (#13036)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1876: Vim9: parsing commands with newlines wrong v9.0.1876
Christian Brabandt [Tue, 5 Sep 2023 18:46:25 +0000 (20:46 +0200)] 
patch 9.0.1876: Vim9: parsing commands with newlines wrong

Problem:  Vim9: parsing commands with newlines wrong
Solution: Accept a '\n' for parsing lists and command arguments

closes: #13015
closes: #13020

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1875: Vim9: improve test for disassemble + static v9.0.1875
Yegappan Lakshmanan [Tue, 5 Sep 2023 18:42:18 +0000 (20:42 +0200)] 
patch 9.0.1875: Vim9: improve test for disassemble + static

Problem:  Vim9: improve test for disassemble + static
Solution: Add a Vim9 script disassemble test for an interface with
          static members
closes: #13037

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1874: CI may fail in test_recover_empty_swap v9.0.1874
Christian Brabandt [Tue, 5 Sep 2023 18:40:25 +0000 (20:40 +0200)] 
patch 9.0.1874: CI may fail in test_recover_empty_swap

Problem:  CI may fail in test_recover_empty_swap
Solution: Set directory option

Fix failing Test_recover_empty_swap test

:recover by default not only looks in the current directory, but also in
~/tmp for files to recover. If it finds some files to recover, it will
interactively prompt for a file to recover. However, prompting doesn't
work when running the test suite (and even if it would, there is no one
that can answer the prompt).

So it doesn't really make sense during testing, to inspect different
directories for swap files and prompt and wait (which will lead to a
timeout and therefore a failing test).

So set the 'directory' option temporarily to the current directory only
and reset it back once the test finishes.

closes: #13038

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1873: [security] heap-buffer-overflow in vim_regsub_both v9.0.1873
Christian Brabandt [Tue, 5 Sep 2023 18:18:06 +0000 (20:18 +0200)] 
patch 9.0.1873: [security] heap-buffer-overflow in vim_regsub_both

Problem:  heap-buffer-overflow in vim_regsub_both
Solution: Disallow exchanging windows when textlock is active

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1872: CI: test_crash() fails on CI v9.0.1872
Christian Brabandt [Tue, 5 Sep 2023 05:45:04 +0000 (07:45 +0200)] 
patch 9.0.1872: CI: test_crash() fails on CI

Problem:  CI: test_crash() fails on CI
Solution: Skip test on BSD

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1871: Github CI does not run i386 job v9.0.1871
James McCoy [Tue, 5 Sep 2023 05:41:23 +0000 (07:41 +0200)] 
patch 9.0.1871: Github CI does not run i386 job

Problem:  Github CI does not run i386 job
Solution: Add a i386 architecture

Add CI testing for i386

message_test recently failed on i386, which exposed a gap in the CI
testing.  Convert the shadowdir job to one that runs on i386 so we get
32-bit test coverage.

Since the GHA runners are x86_64, we can enable the i386 architecture
in dpkg and install i386 packages for the i386 CI jobs.  However, this
can't currently be done with features=huge since that would require
installing python3-dev:i386, which breaks the CI environment.

closes: #12975

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
2 years agopatch 9.0.1870: Vim9: disassamble does not show static v9.0.1870
Ernie Rael [Tue, 5 Sep 2023 05:38:09 +0000 (07:38 +0200)] 
patch 9.0.1870: Vim9: disassamble does not show static

Problem:  Vim9: disassamble does not show static
Solution: Show static flag

Fix disassemble for instructions with optional static:
ISN_GET_OBJ_MEMBER and ISN_GET_ITF_MEMBER

closes: #13030

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agoruntime(menu): Fix "Open &Tab..." CJK translations to have shortcut key (#13031)
Yee Cheng Chin [Tue, 5 Sep 2023 05:36:07 +0000 (22:36 -0700)] 
runtime(menu): Fix "Open &Tab..." CJK translations to have shortcut key (#13031)

Previous PR (#12993) fixed localization files to point to "Open &Tab..."
but they didn't add the shortcut key to the translated names. This adds
the shortcut keys to the CJK translations in the form of "(&T)".

Note that this doesn't add the shortcut to latin script languages like
Czech. These types of translated names tend to also localize the
shortcut keys for them to make sense to the user and it's up to each
translator to decide how to do so. CJK translations tend to just take
the English key directly since it doesn't make sense to have a localized
shortcut key in general.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1869: Coverity warns about unitialized var v9.0.1869
Ernie Rael [Tue, 5 Sep 2023 05:33:48 +0000 (07:33 +0200)] 
patch 9.0.1869: Coverity warns about unitialized var

Problem:  Coverity warns about unitialized var
Solution: initialize it

closes: #13029

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agopatch 9.0.1868: test_crash still fails for circle ci v9.0.1868
Christian Brabandt [Mon, 4 Sep 2023 20:42:55 +0000 (22:42 +0200)] 
patch 9.0.1868: test_crash still fails for circle ci

Problem:  test_crash still fails for circle ci
Solution: give even more time to complete

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(sr): Update Serbian messages translation
Ivan Pešić [Mon, 4 Sep 2023 09:05:45 +0000 (13:05 +0400)] 
runtime(sr): Update Serbian messages translation

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1867: Vim9: access to interface statics possible v9.0.1867
Ernie Rael [Mon, 4 Sep 2023 20:30:41 +0000 (22:30 +0200)] 
patch 9.0.1867: Vim9: access to interface statics possible

Problem:  Vim9: access to interface statics possible
Solution: Prevent direct access to interface statics

closes: #13007

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agopatch 9.0.1866: undo is synced after character find v9.0.1866
zeertzjq [Mon, 4 Sep 2023 20:25:07 +0000 (22:25 +0200)] 
patch 9.0.1866: undo is synced after character find

Problem:  Undo is synced after character find.
Solution: Set no_u_sync when calling gotchars_nop().

closes: #13022
closes: #13024

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agoruntime(php): Update the php indent script to the 1.75 (from 1.70) (#13025)
John Wellesz [Mon, 4 Sep 2023 20:22:19 +0000 (22:22 +0200)] 
runtime(php): Update the php indent script to the 1.75 (from 1.70) (#13025)

Changes:

1.75:
- Fix 2072/PHP-Indenting-for-VIm#87: The indent optimization was causing wrong indentation of lines
  preceded by a line ending with '}' when preceded by non white characters.
- Fix long standing non-reported regex escaping issue in cleaning end of line
  comments function. This should help fixing some other unreported issues when
  parts of codes are commented out at ends of lines...

1.74:
- Fix 2072/PHP-Indenting-for-VIm#86: Add support for `match` expression.

1.73:
- Fix 2072/PHP-Indenting-for-VIm#77 where multi line strings and true/false keywords at beginning of a
  line would cause indentation failures.

1.72:
- Fix vim/vim#5722 where it was reported that the option PHP_BracesAtCodeLevel
  had not been working for the last 6 years.

1.71:
- Fix 2072/PHP-Indenting-for-VIm#75 where the indent script would hang on some multi-line quoted strings.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime: Fix problem of checking wrong cwd for ruby ftplugin (#13026)
Anton Sharonov (ant0sha) [Mon, 4 Sep 2023 20:21:00 +0000 (22:21 +0200)] 
runtime: Fix problem of checking wrong cwd for ruby ftplugin (#13026)

Co-authored-by: Anton Sharonov <anton.sharonov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1865: Vim9: garbage collection may cause crash v9.0.1865
Yegappan Lakshmanan [Mon, 4 Sep 2023 20:14:28 +0000 (22:14 +0200)] 
patch 9.0.1865: Vim9: garbage collection may cause crash

Problem:  Vim9: garbage collection may cause crash
Solution: validate that class members typeval is not null

closes: #13028

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1864: still crash with bt_quickfix1_poc v9.0.1864
Christian Brabandt [Mon, 4 Sep 2023 20:09:12 +0000 (22:09 +0200)] 
patch 9.0.1864: still crash with bt_quickfix1_poc

Problem:  crash with bt_quickfix1_poc when cleaning up
          and EXITFREE is defined
Solution: Test if buffer is valid in a window, else close
          window directly, don't try to access buffer properties

While at it, increase the crash timeout slightly, so that CI has a
chance to finish processing the test_crash() test.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agotranslation(it): revert permission changes for xxd manpages
Christian Brabandt [Mon, 4 Sep 2023 05:57:52 +0000 (07:57 +0200)] 
translation(it): revert permission changes for xxd manpages

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1863: wrong format specifiers in e_aptypes_is_null_str_nr v9.0.1863
zeertzjq [Mon, 4 Sep 2023 05:54:02 +0000 (07:54 +0200)] 
patch 9.0.1863: wrong format specifiers in e_aptypes_is_null_str_nr

Problem:  wrong format specifiers in e_aptypes_is_null_str_nr
Solution: Fix the wrong format specifier

closes: #13020

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1862: Vim9 Garbage Collection issues v9.0.1862
Yegappan Lakshmanan [Mon, 4 Sep 2023 05:51:01 +0000 (07:51 +0200)] 
patch 9.0.1862: Vim9 Garbage Collection issues

Problem:  Vim9 Garbage Collection issues
Solution: Class members are garbage collected early leading to
          use-after-free problems.  Handle the garbage
          collection of classes properly.

closes: #13019

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agopatch 9.0.1861: xxd: issue when -R is specified several times v9.0.1861
K.Takata [Mon, 4 Sep 2023 05:46:59 +0000 (07:46 +0200)] 
patch 9.0.1861: xxd: issue when -R is specified several times

Problem:  xxd: issue when -R is specified several times
Solution: Fix command line parsing

See: https://github.com/vim/vim/pull/12986#issuecomment-1704375892

closes: #13021

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
Co-authored-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
2 years agopatch 9.0.1860: CI: test_crash1() is flaky v9.0.1860
Christian Brabandt [Mon, 4 Sep 2023 05:42:27 +0000 (07:42 +0200)] 
patch 9.0.1860: CI: test_crash1() is flaky

Problem:  CI: test_crash1() is flaky
Solution: Wait a bit longer

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1859: heap-use-after-free in bt_normal() v9.0.1859
Christian Brabandt [Sun, 3 Sep 2023 19:43:46 +0000 (21:43 +0200)] 
patch 9.0.1859: heap-use-after-free in bt_normal()

Problem:  heap-use-after-free in bt_normal()
Solution: check that buffer is still valid

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1858: [security] heap use after free in ins_compl_get_exp() v9.0.1858
Christian Brabandt [Sun, 3 Sep 2023 19:24:33 +0000 (21:24 +0200)] 
patch 9.0.1858: [security] heap use after free in ins_compl_get_exp()

Problem:  heap use after free in ins_compl_get_exp()
Solution: validate buffer before accessing it

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1857: [security] heap-use-after-free in is_qf_win() v9.0.1857
Christian Brabandt [Sun, 3 Sep 2023 18:20:52 +0000 (20:20 +0200)] 
patch 9.0.1857: [security] heap-use-after-free in is_qf_win()

Problem:  heap-use-after-free in is_qf_win()
Solution: Check buffer is valid before accessing it

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1856: issues with formatting positional arguments v9.0.1856
Christ van Willegen [Sun, 3 Sep 2023 15:22:37 +0000 (17:22 +0200)] 
patch 9.0.1856: issues with formatting positional arguments

Problem:  issues with formatting positional arguments
Solution: fix them, add tests and documentation

closes: #12140
closes: #12985

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
Tentatively fix message_test. Check NULL ptr.

2 years agopatch 9.0.1855: mode() doesn't indicate command line for terminal v9.0.1855
h-east [Sun, 3 Sep 2023 15:12:55 +0000 (17:12 +0200)] 
patch 9.0.1855: mode() doesn't indicate command line for terminal

Problem:  mode() doesn't indicate command line for terminal
Solution: make it return 'ct' for command-line from Terminal mode

closes: #6265
closes: #13017
closes: #13018

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2 years agopatch 9.0.1854: test_crash1() fails on CI v9.0.1854
Christian Brabandt [Sun, 3 Sep 2023 07:23:12 +0000 (09:23 +0200)] 
patch 9.0.1854: test_crash1() fails on CI

Problem:  test_crash1() fails on CI
Solution: don't run Screendump test, verify that it doesn't crash
          by running it through a shell command line, testing
          the exit value and concatenating success cmd using '&&'

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1853: CI error on different signedness in regexp.c v9.0.1853
Christian Brabandt [Sat, 2 Sep 2023 20:08:43 +0000 (22:08 +0200)] 
patch 9.0.1853: CI error on different signedness in regexp.c

Problem:  CI error on different signedness in regexp.c
          (after patch 9.0.1848)
Solution: Cast strlen() call to int

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1852: i_CTRL-O does not reset Select Mode v9.0.1852
pierreganty [Sat, 2 Sep 2023 19:59:52 +0000 (21:59 +0200)] 
patch 9.0.1852: i_CTRL-O does not reset Select Mode

Problem:  i_CTRL-O does not reset Select Mode
Solution: Reset select mode on CTRL-O in insert mode

closes: #13001
closes: #12115

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1851: breakindent missing by virt text v9.0.1851
zeertzjq [Sat, 2 Sep 2023 19:55:00 +0000 (21:55 +0200)] 
patch 9.0.1851: breakindent missing by virt text

Problem:  Virtual text at a column causes 'breakindent' and 'showbreak'
          to be missing (after patch 9.0.1124).
Solution: Add check for "tp_col" in another place where TP_FLAG_WRAP is
          checked.

closes: #12769
closes: #13008
closes: #13010

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1850: Vim9: wrong line number where options set v9.0.1850
LemonBoy [Sat, 2 Sep 2023 19:52:05 +0000 (21:52 +0200)] 
patch 9.0.1850: Vim9: wrong line number where options set

Problem:  Vim9: wrong line number where options set
Solution: Set source line number earlier

closes: #13006
closes: #13013

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2 years agopatch 9.0.1849: CI error on different signedness in ex_cmds.c v9.0.1849
Christian Brabandt [Sat, 2 Sep 2023 19:48:46 +0000 (21:48 +0200)] 
patch 9.0.1849: CI error on different signedness in ex_cmds.c

Problem:  CI error on different signedness
Solution: cast unsigned to int

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1848: [security] buffer-overflow in vim_regsub_both() v9.0.1848
Christian Brabandt [Sat, 2 Sep 2023 19:15:52 +0000 (21:15 +0200)] 
patch 9.0.1848: [security] buffer-overflow in vim_regsub_both()

Problem:  buffer-overflow in vim_regsub_both()
Solution: Check remaining space

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1847: [security] potential oob write in do_addsub() v9.0.1847
Christian Brabandt [Sat, 2 Sep 2023 17:43:33 +0000 (19:43 +0200)] 
patch 9.0.1847: [security] potential oob write in do_addsub()

Problem:  potential oob write in do_addsub()
Solution: don't overflow buf2, check size in for loop()

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1846: [security] crash in fullcommand v9.0.1846
Christian Brabandt [Sat, 2 Sep 2023 17:30:03 +0000 (19:30 +0200)] 
patch 9.0.1846: [security] crash in fullcommand

Problem:  crash in fullcommand
Solution: Check for typeval correctly

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1845: xxd: Test_xxd_color start failing v9.0.1845
Christian Brabandt [Sat, 2 Sep 2023 17:12:31 +0000 (19:12 +0200)] 
patch 9.0.1845: xxd: Test_xxd_color start failing

Problem:  xxd: Test_xxd_color start failing
Solution: Revert changes to dump file

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1844: doc helptags may not be up to date v9.0.1844
Yee Cheng Chin [Sat, 2 Sep 2023 14:03:04 +0000 (16:03 +0200)] 
patch 9.0.1844: doc helptags may not be up to date

Problem:  doc helptags may not be up to date
Solution: Add CI jobs to verify helptags are updated

Also, re-generate the tags file with updated list so it will pass CI.

closes: #13012

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1843: xxd color test flaky v9.0.1843
Christian Brabandt [Sat, 2 Sep 2023 14:01:18 +0000 (16:01 +0200)] 
patch 9.0.1843: xxd color test flaky

Problem:  xxd color test flaky
Solution: Filter unneeded lines

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agotranslation(it): updated Italian xxd manpage
Antonio Giovanni Colombo [Sat, 2 Sep 2023 13:11:58 +0000 (15:11 +0200)] 
translation(it): updated Italian xxd manpage

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1842: Need more accurate profiling v9.0.1842
Ernie Rael [Sat, 2 Sep 2023 13:09:18 +0000 (15:09 +0200)] 
patch 9.0.1842: Need more accurate profiling

Problem:  Need more accurate profiling
Solution: Improve profiling results

closes: #12192

Reduce overhead of checking if a function should be profiled,
by caching results of checking (which are done with regexp).

Cache uf_hash for uf_name in ufunc_T.

Cache cleared when regexps are changed.

Break at first match for has_profiling lookup.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agopatch 9.0.1841: style: trailing whitespace in ex_cmds.c v9.0.1841
Christian Brabandt [Sat, 2 Sep 2023 13:07:24 +0000 (15:07 +0200)] 
patch 9.0.1841: style: trailing whitespace in ex_cmds.c

Problem:  style: trailing whitespace in ex_cmds.c
Solution: remove it

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agotranslation(en_GB): Update UK English translation (#13011)
Mike Williams [Sat, 2 Sep 2023 13:04:51 +0000 (14:04 +0100)] 
translation(en_GB): Update UK English translation (#13011)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1840: [security] use-after-free in do_ecmd v9.0.1840
Christian Brabandt [Sat, 2 Sep 2023 12:40:13 +0000 (14:40 +0200)] 
patch 9.0.1840: [security] use-after-free in do_ecmd

Problem:  use-after-free in do_ecmd
Solution: Verify oldwin pointer after reset_VIsual()

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agoruntime(zserio): add zserio syntax (#13005)
Dominique Pellé [Fri, 1 Sep 2023 21:10:26 +0000 (23:10 +0200)] 
runtime(zserio): add zserio syntax (#13005)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1839: No Makefile rule to build cscope database v9.0.1839
Christian Brabandt [Fri, 1 Sep 2023 20:38:26 +0000 (22:38 +0200)] 
patch 9.0.1839: No Makefile rule to build cscope database

Problem:  No Makefile rule to build cscope database
Solution: Add rule

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agotranslation(it): updated Italian translation + xxd manpage
Antonio Giovanni Colombo [Fri, 1 Sep 2023 20:18:31 +0000 (22:18 +0200)] 
translation(it): updated Italian translation + xxd manpage

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1838: Vim9: Cannot modify class member vars from def function v9.0.1838
Yegappan Lakshmanan [Fri, 1 Sep 2023 20:05:45 +0000 (22:05 +0200)] 
patch 9.0.1838: Vim9: Cannot modify class member vars from def function

Problem:  Vim9: Cannot modify class member vars from def function
Solution: Add support for modifying class member variables from a def
          function

closes: #12995

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2 years agotests: Improve the codestyle test (#12988)
Christian Brabandt [Fri, 1 Sep 2023 16:58:35 +0000 (17:58 +0100)] 
tests: Improve the codestyle test (#12988)

Improve it by the following:

1) Also check xxd source
2) Test_source_files():
   don't stop on the first error found, continue until the
   end of the file and report all found errors like this:

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1837: Vim9: class_member_type() can be optimized v9.0.1837
Ernie Rael [Fri, 1 Sep 2023 16:54:54 +0000 (18:54 +0200)] 
patch 9.0.1837: Vim9: class_member_type() can be optimized

Problem:  Vim9: class_member_type() can be optimized
Solution: class_member_type() provides more information;
          safe an additional alloc()/free()

closes: #12989

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2 years agoFix menu localization not updated for "Open Tab..." item (#12993)
Yee Cheng Chin [Fri, 1 Sep 2023 16:53:30 +0000 (09:53 -0700)] 
Fix menu localization not updated for "Open Tab..." item (#12993)

THe menu item "Open Tab..." was changed to "Open &Tab..." in #12895 but
localization files were not updated. Update it here.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2 years agopatch 9.0.1836: display wrong with virttext, linebreak and breakindent v9.0.1836
zeertzjq [Fri, 1 Sep 2023 16:49:30 +0000 (18:49 +0200)] 
patch 9.0.1836: display wrong with virttext, linebreak and breakindent

Problem:  Wrong display with "above" virtual text and 'linebreak' or
          'breakindent' and 'showbreak'.
Solution: Exclude size of "above" virtual text when calculating them.

closes: #13000

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2 years agopatch 9.0.1835: Perl interface has problems with load PL_current_context v9.0.1835
Yee Cheng Chin [Fri, 1 Sep 2023 16:46:17 +0000 (18:46 +0200)] 
patch 9.0.1835: Perl interface has problems with load PL_current_context

Problem:  Perl interface has problems with load PL_current_context
Solution: Fix Perl interface to load PL_current_context from library

In #12914, in order to fix an issue with Perl 5.36 dynamic builds, (that
version introduced a thread-local `PL_current_context`), the file added
the variable manually so we can satisfy the linker. However, the
variable is a different one from the one in the library, so there could
be unpredictable behavior. Instead, just use `dlsym` to load the context
from the library. The fact that it's thread-local doesn't matter too
much to us because Vim's interface is single-threaded so it will work
properly.

closes: #12996

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2 years agopatch 9.0.1834: Some problems with xxd coloring v9.0.1834
K.Takata [Fri, 1 Sep 2023 16:41:04 +0000 (18:41 +0200)] 
patch 9.0.1834: Some problems with xxd coloring

Problem:  Some problems with xxd coloring
Solution: Fix the following problems:

* Support colored output on Windows.
  SetConsoleMode() is required to enable ANSI color sequences.
* Support "NO_COLOR" environment variable.
  If "NO_COLOR" is defined and not empty, colored output should be
  disabled.
  See https://no-color.org/
* "-R" should only accept "always", "never" or "auto" as the parameter.
* Adjust help and documentation. "-R" cannot omit the parameter. Remove
  surrounding brackets.

Related #12131
closes: #12997
closes: #12991
closes: #12986

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
2 years agoruntime(ruby): Update syntax, indent and ftplugin files
Doug Kearns [Fri, 1 Sep 2023 16:33:33 +0000 (18:33 +0200)] 
runtime(ruby): Update syntax, indent and ftplugin files

While making changes to the ruby ftplugin, slightly change the exepath()
conditional from patch 9.0.1833 and move it after the :cd invocation.

closes: 12981
closes: 12994

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <code@tpope.net>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2 years agopatch 9.0.1833: [security] runtime file fixes v9.0.1833
Christian Brabandt [Thu, 31 Aug 2023 21:52:30 +0000 (23:52 +0200)] 
patch 9.0.1833: [security] runtime file fixes

Problem:  runtime files may execute code in current dir
Solution: only execute, if not run from current directory

The perl, zig and ruby filetype plugins and the zip and gzip autoload
plugins may try to load malicious executable files from the current
working directory.  This is especially a problem on windows, where the
current directory is implicitly in your $PATH and windows may even run a
file with the extension `.bat` because of $PATHEXT.

So make sure that we are not trying to execute a file from the current
directory. If this would be the case, error out (for the zip and gzip)
plugins or silently do not run those commands (for the ftplugins).

This assumes, that only the current working directory is bad. For all
other directories, it is assumed that those directories were
intentionally set to the $PATH by the user.

Signed-off-by: Christian Brabandt <cb@256bit.org>