1
0
forked from aniani/vim

18252 Commits

Author SHA1 Message Date
Dominique Pellé
acb91d3905
runtime(zserio): add zserio syntax (#13005)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-01 23:10:26 +02:00
Christian Brabandt
738ce77aa9
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>
2023-09-01 22:38:26 +02:00
Antonio Giovanni Colombo
f3db141aed
translation(it): updated Italian translation + xxd manpage
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-01 22:19:37 +02:00
Yegappan Lakshmanan
3775f777a6
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>
2023-09-01 22:05:45 +02:00
Christian Brabandt
b147d31489
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>
2023-09-01 18:58:35 +02:00
Ernie Rael
456ae556b4
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>
2023-09-01 18:57:09 +02:00
Yee Cheng Chin
c41b7a26fc
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>
2023-09-01 18:53:30 +02:00
zeertzjq
ce53e3ea55
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>
2023-09-01 18:49:30 +02:00
Yee Cheng Chin
7a9d1aa878
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>
2023-09-01 18:46:17 +02:00
K.Takata
f6fc255e8d
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>
2023-09-01 18:41:04 +02:00
Doug Kearns
da16a1b471
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>
2023-09-01 18:36:49 +02:00
Christian Brabandt
816fbcc262
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>
2023-08-31 23:52:30 +02:00
Christian Brabandt
0ffa97e8fa
patch 9.0.1832: xxd: reporting wrong version
Problem:  xxd: reporting wrong version (after 9.0.1827)
Solution: Update version string

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-31 21:04:52 +02:00
Gianmaria Bajo
6ad4a60a97
patch 9.0.1831: Vim9: failing null test
Problem:  Vim9: failing null test
Solution: Use required public keyword

closes: #12982

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
2023-08-31 20:55:35 +02:00
Gianmaria Bajo
d7085a0635
patch 9.0.1830: Vim9: crash when accessing a null object
Problem:  Vim9: crash when accessing a null object
Solution: Check accessing a NULL object in def function

An object is NULL when the variable is declared, but the constructor
isn't called. Accessing/setting a member on the object crashed Vim.

Note: this happens inside def functions, at script level things work
differently. Accessing a NULL object member results in E1360
(correctly), while setting a value on it results in E1012 (type
mismatch) so there's still something to fix.

closes: #12973

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
2023-08-31 18:15:26 +02:00
Yegappan Lakshmanan
eb91e24d5e
patch 9.0.1829: Vim9 missing access-checks for private vars
Problem:  Vim9 missing access-checks for private vars
Solution: Use the proper check for private/readonly variable.  Access
          level for a member cannot be changed in a class implementing an
          interface.  Update the code indentation

closes: #12978

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-08-31 18:10:46 +02:00
zeertzjq
ac2d8815ae
patch 9.0.1828: cursor wrong with virt text before double-width char
Problem:  Wrong cursor position with virtual text before double-width
          char at window edge.
Solution: Check for double-width char before adding virtual text size.

closes: #12977

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-31 18:07:48 +02:00
Antonio Giovanni Colombo
e102e44fc6
translation(it): updated Italian manpages
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-31 18:03:11 +02:00
Aapo Rantalainen
e2528ae111
patch 9.0.1827: xxd: no color support
Problem:  xxd: no color support
Solution: Add color support using xxd -R

Add some basic color support for xxd

The hex-value and value are both colored with the same color depending
on the hex-value, e.g.:

    0x00 = white
    0xff = blue
    printable = green
    non-printable = red
    tabs and linebreaks = yellow

Each character needs 11 more bytes to contain color. (Same color in a
row could contain only one overhead but the logic how xxd creates colums
must be then changed.) Size of colored output is increased by factor of
~6. Also grepping the output will break when colors is used.

Flag for color is "-R", because less uses "-R".

Color uses parameters auto,always,never same as less and grep (among
others).

E.g.

xxd -R always $FILE | less -R

Add some screen-tests (that currently on work on linux) to verify the
feature works as expected.

closes: #12131

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
2023-08-31 17:58:13 +02:00
xrandomname
0b8b145bf8
runtime(optwin): Fix for 'splitkeep' option (#12974)
'spk' was used as a boolean, rather than a string option.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-31 08:18:40 +02:00
dkearns
1610528cc3
runtime(forth): Update syntax and ftplugin files (#12976)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-31 08:17:16 +02:00
zeertzjq
1bed993c01
patch 9.0.1826: keytrans() doesn't translate recorded key typed in a GUI
Problem:  keytrans() doesn't translate recorded key typed in a GUI
Solution: Handle CSI like K_SPECIAL, like in mb_unescape()

closes: #12964
closes: #12966

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-30 19:38:24 +02:00
zeertzjq
6e55e85f92
patch 9.0.1825: wrong cursor position with virt text and 'linebreak'
Problem:  Wrong cursor position with virtual text before a whitespace
          character and 'linebreak'.
Solution: Always set "col_adj" to "size - 1" and apply 'linebreak' after
          adding the size of 'breakindent' and 'showbreak'.

closes: #12956

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-30 16:55:09 +02:00
Yegappan Lakshmanan
5bbcfbc4a2
patch 9.0.1824: Vim9: private members may be modifiable
Problem:  Vim9: private members may be modifiable
Solution: prevent modification for def function

closes: #12963

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-30 16:40:33 +02:00
Enno
9d8ef7cc43
runtime: cleanup :Sman command via the undo_ftplugin mechanism (#12967)
Regards to @dkearns as noticed in
2ac708b548

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-30 16:37:05 +02:00
Illia Bobyr
a96d544bc3
patch 9.0.1823: Autoconf 2.69 too old
Problem:  Autoconf 2.69 too old
Solution: Migrate to Autoconf 2.71

Autoconf 2.69 is almost 10 years old.  And 2.71 is also a few years old
as well.  Should be pretty well tested by now.  It brings a lot of
improvements and there seems to be an ongoing work on autoconf 2.72
already.

This change just addresses two minor changes `autoupdate` suggested, and
then `src/auto/configure` is regenerated by running

  cd src
  make AUTOCONF=autoconf2.71 autoconf

closes: #12958

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-08-30 16:30:15 +02:00
Yegappan Lakshmanan
e3b6c78ddc
patch 9.0.1822: Vim9: no check for duplicate members in extended classes
Problem:  Vim9: no check for duplicate members in extended classes
Solution: Check for duplicate members in extended classes.
          Fix memory leak.

closes: #12948

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-29 22:34:36 +02:00
Gianmaria Bajo
4b9777a1df
patch 9.0.1821: Vim9 constructors are always static
Problem:  Vim9 constructors are always static
Solution: make the "static" keyword an error

closes: #12945

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
2023-08-29 22:29:03 +02:00
dkearns
2ac708b548
runtime(sh): Update ftplugin (#12950)
Remove :Help command via the undo_ftplugin mechanism.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-29 22:24:37 +02:00
Doug Kearns
e06afb7860
patch 9.0.1820: Rexx files may not be recognised
Problem:  Rexx files may not be recognised
Solution: Add shebang detection and improve disambiguation of *.cls
	  files

closes: #12951

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-29 22:21:35 +02:00
ichizok
3e1e63de18
patch 9.0.1819: Github CI too complex
Problem:  Github CI too complex
Solution: CI: Tidy up matrix

Perform the following changes to the CI configuration:
 - Move common CFLAGS to ci/config.mk.sed
 - Change extra key to array to able to assign no or multiple values
   explicitly
 - Modify luaver variable handling
   - lib${{ matrix.luaver }}-dev ${{ matrix.luaver }} are confusing
     as package names
 - Deduplicate CONFOPT setting

closes: #12955

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: ichizok <gclient.gaap@gmail.com>
2023-08-29 22:20:21 +02:00
Jason King
3ac2d3da5f
runtime(heex): Add HEEX comments to match_words in ftplugin (#12957)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-29 22:11:55 +02:00
Christian Brabandt
55460da26c
patch 9.0.1818: dynamically linking perl is broken
Problem:  dynamically linking perl is broken
Solution: Fix all issues

This is a combination of several commits:

1) Fix if_perl.xs not being able to build on all versions of Perl (5.30)

This fixes the dynamic builds of Perl interface. The Perl interface file
previously had to manually copy and paste misc inline functions verbatim
from the Perl headers, because we defined `PERL_NO_INLINE_FUNCTIONS`
which prevents us form getting some function definitions. The original
reason we defined it was because those inline functions would reference
Perl functions that would cause linkage errors.

This is a little fragile as every time a new version of Perl comes out,
we inevitably have to copy over new versions of inline functions to our
file, and it's also easy to miss updates to existing functions.

Instead, remove the `PERL_NO_INLINE_FUNCTIONS` define, remove the manual
copy-pasted inline functions. Simply add stub implementations of the
missing linked functions like `Perl_sv_free2` and forward them to the
DLL version of the function at runtime. There are only a few functions
that need this treatment, and it's a simple stub so there is very low
upkeep compared to copying whole implementations to the file.

Also, fix the configure script so that if we are using dynamic linkage,
we don't pass `-lperl` to the build flags, to avoid accidental external
linkage while using dynamic builds. This is similar to how Python
integration works.

2) Fix GIMME_V deprecation warnings in Perl 5.38

Just use GIMME_V, and only use GIMME when using 5.30 to avoid needing to
link Perl_block_gimme. We could provide a stub like the other linked
functions like Perl_sv_free2, but simply using GIMME is the simplest and
it has always worked before.

3) Fix Perl 5.38 issues

Fix two issues:

3.1. Perl 5.38 links against more functions in their inline headers, so we
   need to stub them too.

3.2. Perl 5.38 made Perl_get_context an inline function, but *only* for
   non-Windows build. Fix that. Note that this was happening in Vim
   currently, as it would build, but fail to run Perl code at runtime.

4) Fix Perl 5.36/5.38 when thread local is used

Perl 5.36 introduced using `_Thread_local` for the current context,
which causes inline functions to fail. Create a stub
`PL_current_context` thread local variable to satisfy the linker for
inlined functions. Note that this is going to result in a different
`PL_current_context` being used than the one used in the library, but so
far from testing it seems to work.

5) Add docs for how to build Perl for dynamic linking to work

closes: #12827
closes: #12914

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-08-29 21:31:28 +02:00
Illia Bobyr
0e82b59df3
patch 9.0.1817: configure: using obsolete AC_HEADER_STDC
Problem:  configure: using obsolete AC_HEADER_STDC
Solution: Remove it and re-create configure

closes: #12949

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-08-29 21:17:50 +02:00
ichizok
bddc6adca6
patch 9.0.1816: configure: sed uses non-portable regex
Problem:  configure: sed uses non-portable regex
Solution: use '*' modifier instead of '\?' in regex
          for luajit version detection

closes: #12954

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: ichizok <gclient.gaap@gmail.com>
2023-08-29 20:54:32 +02:00
Christian Brabandt
a5eb6785ef
runtime(doc): mention special case of i_CTRL-R_-
closes: #12947
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-29 16:23:22 +02:00
Christian Brabandt
7129de868c
runtime(editorconfig): generate helptags, remove unused files
Remove the test suite and a few other non-used files from the
EditorConfig CI project

related: #12902
closes:  #12941

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-29 16:14:10 +02:00
Christian Brabandt
00d07a97ad
runtime(tags): update helptags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-28 21:45:55 +02:00
dkearns
0382f05dbd
runtime: Set b:undo_indent where missing (#12944)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-28 21:32:59 +02:00
dkearns
f937ab32a1
runtime: Set b:undo_ftplugin where missing (#12943)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-28 21:32:27 +02:00
James McCoy
fe1463674c
patch 9.0.1815: pango_coverage_unref() deprecated in pango > 1.51
Problem:  pango_coverage_unref() deprecated in pango > 1.51
Solution: use g_object_unref() instead

closes: #12942

Free PangoCoverage with g_object_unref for Pango >= 1.52

pango_coverage_unref was declared deprecated in Pango 1.52.0 in favor of
g_object_unref.  Adjust the call when building against a new enough
Pango to avoid the deprecation warning.

Signed-off-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-28 21:29:13 +02:00
Yegappan Lakshmanan
2ba9d2e14e
patch 9.0.1814: Vim9 no error on duplicate object member var
Problem:  Vim9 no error on duplicate object member var
Solution: detect duplicate members and error out

closes: #12938

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-28 21:26:23 +02:00
zeertzjq
1d3e0e8f31
patch 9.0.1813: linebreak incorrect drawn with breakindent
Problem: 'linebreak' is incorrectly drawn after 'breakindent'.
Solution: Don't include 'breakindent' size when already after it.

closes: #12937
closes: #12940

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-28 21:21:46 +02:00
Christian Brabandt
93ebb5e75e
patch 9.0.1812: CI still fails with sodium_mlock error()
Problem:  CI still fails with sodium_mlock error()
Solution: Catch and ignore E1230 error in test_crypt

closes: #12939

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-28 21:17:36 +02:00
Yegappan Lakshmanan
85c3a5bc26
patch 9.0.1811: still some issues with term_debug test
Problem:  still some issues with term_debug test
Solution: Use WaitForAssert()

closes: #12936

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 22:01:23 +02:00
LemonBoy
d08745040b
patch 9.0.1810: camel-case spelling has issues with digits
Problem:  camel-case spelling has issues with digits
Solution: Improve the camCase spell checking by taking digits
          and caps into account

Rewrite the conditions to check for word boundaries by taking into
account the presence of digits and all-caps sequences such as acronyms.

closes: #12644
closes: #12933

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-27 21:52:27 +02:00
Christian Brabandt
6c93c94929
patch 9.0.1809: termdebug test flayk
Problem:  termdebug test flayk
Solution: wait slightly longer

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-27 21:48:29 +02:00
Christian Brabandt
f2534434c9
patch 9.0.1808: termdebug: Typo in termdebug test
Problem:  termdebug: Typo in termdebug test
Solution: fix the typos

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-27 20:00:37 +02:00
Doug Kearns
9b73902dbe
patch 9.0.1807: runtime: crystal scripts not recognised
Problem:  runtime: crystal scripts not recognised
Solution: Filetype detect Crystal scripts by shebang line

closes: #12935

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-27 19:51:37 +02:00
dkearns
73aba18eb7
runtime: Remove outdated scripts.vim comment (#12934)
Problem:  Comment in scripts.vim is outdated
Solution: Delete the comment

runtime/autoload/dist/script.vim is now Vim9 script so =~ does not use
'ignorecase'.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-27 19:47:29 +02:00