Commit Graph

18557 Commits

Author SHA1 Message Date
2ce070c27a patch 9.0.1913: if_python: undefined behaviour for function pointers
Problem:  if_python: undefined behaviour for function pointers
Solution: Fix if_python undefined behavior for function pointer casts

Identified by clang 17 UBSAN (see #12745). Make sure to cast function
pointers with the same signature only.

closes: #13122

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
v9.0.1913
2023-09-19 20:30:22 +02:00
6f00d17e8d patch 9.0.1912: Cirrus-CI running out of credits
Problem:  Cirrus-CI running out of credits
Solution: disable Cirrus-CI for now

We are running out of credits for Cirrus CI already at the middle of the
month and unfortunately this means our CI now consistently fails. This
all hapens because cirrus ci is not enforcing the free-tier limits (see also
https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/).

Perhaps at the beginning of the next month we can revisit and
enable just a build without testing it.  Hopefully this is won't take
too many credits and we can at least verify that building works.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.1912
2023-09-19 20:19:08 +02:00
3da696db6a patch 9.0.1911: Vim9: segfault with null object and instanceof()
Problem:  Vim9: segfault with null object and instanceof()
Solution: return early

closes: #13121

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
v9.0.1911
2023-09-19 20:14:18 +02:00
346ac1429c runtime(doc): add help tag describing object-selection
closes: #13114

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-18 20:12:22 +02:00
063c562a37 patch 9.0.1910: Mac OS X: missing sound support on older versions
Problem:  Mac OS X: missing sound support on older versions
Solution: Check Macro MAC_OS_X_VERSION_MIN_REQUIRED

Extend guard for sound support on OS X

Fixes build on legacy versions where required coreaudio functionality
may not be available. NSSoundDelegate apparently was introduced in Snow
Leopard yet the build breaks on it. Guarding off enabling sound support
to El Capitan as that's the next version I had access to for testing (it
may work on earlier versions)
https://developer.apple.com/documentation/appkit/nssounddelegate Vim
builds on OS X Tiger 10.4 and newer with this change.

closes: #13115

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
v9.0.1910
2023-09-18 20:04:32 +02:00
00cd18222e patch 9.0.1909: Vim9: problem calling class method from other class
Problem:  Vim9: problem calling class method from other class
Solution: Fix this problem, fix readonly object access, update error
          messages.

Calling a class method from another method without the class name prefix
doesn't work properly.

A readonly object variable is modifiable outside the class using a
nested object assignment.

Remove the unused E1338 error message.

Update error messages.

closes: #13116

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.1909
2023-09-18 19:56:49 +02:00
d25021cf03 patch 9.0.1908: undefined behaviour upper/lower function ptrs
Problem:  undefined behaviour upper/lower function ptrs
Solution: Fix UBSAN error in regexp and simplify upper/lowercase
          modifier code

The implementation of \u / \U / \l / \L modifiers in the substitute
command relies on remembering the state by setting function pointers on
func_all/func_one in the code. The code signature of `fptr_T` is
supposed to return void* (due to C function signatures not being able to
return itself due to type recursion), and the definition of the
functions (e.g. to_Upper) didn't follow this rule, and so the code tries
to cast functions of different signatures, resulting in undefined
behavior error under UBSAN in Clang 17. See #12745.

We could just fix `do_Upper`/etc to just return void*, which would fix
the problem. However, these functions actually do not need to return
anything at all. It used to be the case that there was only one pointer
"func" to store the pointer, which is why the function needs to either
return itself or NULL to indicate whether it's a one time or ongoing
modification. However, c2c355df6f
(7.3.873) already made that obsolete by introducing `func_one` and
`func_all` to store one-time and ongoing operations separately, so these
functions don't actually need to return anything anymore because it's
implicit whether it's a one-time or ongoing operation. Simplify the code
to reflect that.

closes: #13117

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
v9.0.1908
2023-09-18 19:51:56 +02:00
d8b86c937a runtime(netrw): fix filetype detection for remote editing files
closes: #12990
closes: #12992

this partially reverses commit 71badf9 by commenting out the line that
intentionally sets the filetype to an empty string.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 18:52:56 +02:00
e30d8e4ce0 runtime(kotlin): Add Kotlin runtime files (#13110)
Closes udalov/kotlin-vim#39

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 18:51:22 +02:00
6b5efcdd8e patch 9.0.1907: No support for liquidsoap filetypes
Problem:  No support for liquidsoap filetypes
Solution: Add liquidsoap filetype detection code

closes: #13111

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Romain Beauxis <toots@rastageeks.org>
v9.0.1907
2023-09-17 18:49:20 +02:00
92d9ee5f4c patch 9.0.1906: Vim9: Interfaces should not support class methods and variables
Problem:  Vim9: Interfaces should not support class methods and
          variables
Solution: Make sure interface follow the interface specification

Vim9 interface changes to follow the new interface specification:

1) An interface can have only read-only and read-write instance
   variables.
2) An interface can have only public instance methods.
3) An interface cannot have class variables and class methods.
4) An interface cannot have private instance variables and private
   instance methods.
5) A interface can extend another interface using "extends". The
   sub-interface gets all the variables and methods in the super
   interface.

That means:
- Interfaces should not support class methods and variables.
- Adjust error numbers and add additional tests.
- Interface methods can be defined in one of the super classes.
- Interface variables can be defined in one of the super classes.
  and instance variables can be repeated in sub interfaces.
- Check the class variable types with the type in interface.

closes: #13100

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.1906
2023-09-17 17:03:19 +02:00
0483e49f90 patch 9.0.1905: FEAT_FLOAT no longer defined
Problem:  FEAT_FLOAT no longer defined
Solution: Remove last existing FEAT_FLOAT ifdefs in
          message_test

Remove FEAT_FLOAT as that should always be true

FEAT_FLOAT has been removed in v9.0.0491 (73e28dcc61) but
unfortunately, it was forgotten to remove it from message_test.c. So
let's remove the last mentioned ifdefs which are now unused.

closes: #13106

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
v9.0.1905
2023-09-17 16:58:22 +02:00
e6059c321b patch 9.0.1904: Cirrus-CI fails because we have used all credits
Problem:  Cirrus-CI fails because we have used all credits
Solution: Remove FreeBSD 13.1 and MacOS M1

Cirrus CI has started introducing monthly limits. Vim has exceeded the
monthly limit which means our CI unfortunately starts to fail. So let's
remove some CI tasks, so that in the future we won't run out of credits
so fast.

closes: #13108

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
v9.0.1904
2023-09-17 16:53:18 +02:00
177437cc6f doc(INSTALLpc): mention additional packages for msys2
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 16:36:33 +02:00
a66feb5fb5 patch 9.0.1903: CI fails because snd-dummy modules missing
Problem:  Github Actions fails because snd-dummy modules missing
          in current runner images
Solution: ignore modprobe error

related: actions/runner-images#8295

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.1903
2023-09-16 18:29:42 +02:00
249a208803 runtime(man): Man plugin does not respect 'gdefault'
Fix the issue introduced by #12557. `:substitute` commands in plugins
need to take into account whether `gdefault` is set or not because
that depends on the user.

closes: #13097

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-16 18:12:14 +02:00
e2deb7e598 patch 9.0.1902: Vim9: Coverity complains about dead code
Problem:  Vim9: Coverity complains about dead code
Solution: Copy only object methods from the super class
          to a subclass when extending a class.  Fix
          Coverity warning.

closes: #13103

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.1902
2023-09-16 18:05:07 +02:00
ad29f6af0a 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>
v9.0.1901
2023-09-16 13:56:02 +02:00
e7d79eb98a 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>
v9.0.1900
2023-09-16 13:38:26 +02:00
ffb13674d1 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>
v9.0.1899
2023-09-15 20:22:02 +02:00
c30a90d9b2 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>
v9.0.1898
2023-09-15 20:14:55 +02:00
35928ee8f8 runtime(vim): Highlight all :loadkeymap abbreviations in vim syntax (#13092)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-15 20:12:50 +02:00
c1f8bb37c6 runtime(forth): Fix :unlet error in ftplugin (#13090)
Fixes #13089.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-15 15:47:06 +01:00
6ffcc58be3 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>
2023-09-12 21:08:54 +02:00
8b2457a381 runtime(swayconfig): improve syntax highlighting (#13060)
* syntax(swayconfig): improved highlighting
* syntax(swayconfig): adapt to i3config structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 20:24:47 +02:00
fc93594d56 runtime(rust): sync rust runtime files with upstream (#13075)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 20:23:38 +02:00
f5356bf675 runtime(i3config): syntax structure cleanup (#13080)
* syntax(i3config): improved i3config highlighting
* syntax(i3config): refactor structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 20:20:25 +02:00
596ad66d1d 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>
2023-09-11 20:23:11 +02:00
62145db91b syntax(i3config): improved i3config highlighting (#13054)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 20:12:48 +02:00
504543f98b 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>
v9.0.1897
2023-09-11 20:08:50 +02:00
6b9c202549 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>
v9.0.1896
2023-09-11 20:01:17 +02:00
4d00b835c4 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>
v9.0.1895
2023-09-11 19:57:52 +02:00
f787ee8451 runtime(doc): Add g:c_syntax_for_h to filetype-overrule docs
closes: #13074

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 19:50:09 +02:00
213c323184 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>
2023-09-11 19:43:33 +02:00
e5f7cd0a60 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>
v9.0.1894
2023-09-10 19:26:47 +02:00
983d808674 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>
v9.0.1893
2023-09-10 19:06:09 +02:00
24a95f42b8 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>
v9.0.1892
2023-09-10 18:31:51 +02:00
e7833e7347 runtime(masm): add support for AVX-2 and AVX-512 (#13061)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-10 18:27:31 +02:00
0ce2c594d0 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>
v9.0.1891
2023-09-10 18:23:04 +02:00
f36bbcd402 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>
v9.0.1890
2023-09-10 18:19:06 +02:00
0661033075 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>
2023-09-10 18:16:51 +02:00
0405405536 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>
v9.0.1889
2023-09-10 18:12:56 +02:00
733bbcde77 runtime(nasm): updated syntax file
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-09 12:00:09 +02:00
342f4f626e 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>
v9.0.1888
2023-09-09 11:37:23 +02:00
23c92d93c1 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>
v9.0.1887
2023-09-09 11:33:29 +02:00
ee17b6f70d 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>
v9.0.1886
2023-09-09 11:31:38 +02:00
7bcd25cad3 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>
v9.0.1885
2023-09-08 19:29:31 +02:00
86cfb39030 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>
2023-09-08 19:20:01 +02:00
1bd2cb1169 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>
v9.0.1884
2023-09-08 19:18:58 +02:00
4e554d282c runtime(perl): Update ftplugin and indent files (#13052)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-08 19:16:03 +02:00