0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

16117 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
LemonBoy
90c27b2803
patch 9.0.1806: Vim9: bogus error on export
Problem:  Vim9: bogus error on export
Solution: Don't error out when the export command is not executed

closes: #12912
closes: #12930

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-27 19:28:15 +02:00
Yegappan Lakshmanan
639751d218
patch 9.0.1805: Vim9: problem compiling object method as function call arg
Problem:  Vim9: problem compiling object method as function call arg
Solution: After a object/class method call, remove the object/class from
          the stack.

closes: #12081
closes: #12929

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 19:26:16 +02:00
Yegappan Lakshmanan
cd7293bf6c
patch 9.0.1804: Vim9: no support for private object methods
Problem:  Vim9: no support for private object methods
Solution: Add support for private object/class methods

closes: #12920

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 19:18:23 +02:00
NTBBloodbath
03e44a1d70
patch 9.0.1803: runtime(filetype): Add norg language detection
runtime(filetype): Add norg markup language detection

closes: #12913

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: NTBBloodbath <bloodbathalchemist@protonmail.com>
2023-08-27 19:15:20 +02:00
zeertzjq
e3daa06be1
patch 9.0.1802: Multiline regex with Visual selection fails with virtual text
Problem:  Multiline regex with Visual selection fails when Visual
          selection contains virtual text after last char.
Solution: Only include virtual text after last char when getting full
          line length.

closes: #12908

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-27 19:11:46 +02:00
Yegappan Lakshmanan
b49ad28d73
patch 9.0.1801: Vim9 instanceof() fails in a def func
Problem:  Vim9 instanceof() fails in a def func
Solution: allow Objects in compile time check

closes: #12907

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 19:08:40 +02:00
zeertzjq
6a3897232a
patch 9.0.1800: Cursor position still wrong with 'showbreak' and virtual text
Problem:  Cursor position still wrong with 'showbreak' and virtual text
          after last character or 'listchars' "eol".
Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also
          fix first char of virtual text not shown at the start of a screen
          line.

closes: #12478
closes: #12532
closes: #12904

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-27 19:04:14 +02:00
RestorerZ
9a6cf34a1e
patch 9.0.1799: Russian menu translation can be improved
Problem:  Russian menu translation can be improved
Solution: update the Russian menu files

closes: #12903

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
2023-08-27 19:00:42 +02:00
Doug Kearns
6dfdff3f27
patch 9.0.1798: The 'syntax' option has no completion.
Problem:  The 'syntax' option has no completion.
Solution: Add syntax option completion.

closes: #12900

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-27 18:48:51 +02:00
Doug Kearns
f97f6bbf56
patch 9.0.1797: Vimball/Visual Basic filetype detection conflict
Problem:  Vimball/Visual Basic filetype detection conflict
Solution: runtime(vb): Improve Vimball and Visual Basic detection logic

Only run Vimball Archiver's BufEnter autocommand on Vimball archives.
Fixes #2694.

closes: #12899

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-27 18:44:09 +02:00
Ernie Rael
5c018bee0e
patch 9.0.1796: Vim9 problems with null_objects
Problem:  Vim9 problems with null_objects
Solution: Vim9 improve null_object usage

Fix "xvar == null", where xvar might have been assigned null_object.

Fix compilation failure: "var o2: C = null_object".

closes: #12890

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-08-27 18:40:26 +02:00
Yegappan Lakshmanan
d4e4ecbb37
patch 9.0.1795: Indentation issues
Problem:  Indentation issues
Solution: Fix code indentation issues.

closes: #12906

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 18:35:45 +02:00
Illia Bobyr
74e1dada41
patch 9.0.1794: autoconf: not correctly detecing include dirs
Problem:  autoconf: not correctly detecing include dirs
Solution: make use of python3 to generate includedirs

configure: Python3: Use sysconfig for -I

It seems better to use tools provided by Python for determining the
include directories, rather than construct them "manually".

Current system is broken when using virtual environments for python
3.11.4.  It used to work before, but now it detects a incorrect value
for `-I`.

It would probably make sense to switch to a similar logic for lib
folders, that is for the `-l` switch.  There are also
`sysconfig.get_config_h_filename()` and
`sysconfig.get_makefile_filename()`, that could replace more Python
specific logic in the current `configure{.ac,}`.

sysconfig provides the necessary tools since Python 2.7.

closes: #12889

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-08-27 18:26:54 +02:00
Illia Bobyr
f39842f148
patch 9.0.1793: obsolete macros in configure script
Problem:  obsolete macros in configure script
Solution: Remove those and start moving to autoconf 2.71

src/configure.ac: Remove obsolete macros

These macros are declared obsolete in autoconf 2.69, which is almost 10
years old by now:

  https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html

They generate warnings when in a subsequent upgrade to autoconf 2.71.

`autoupdate` from autoupdate 2.71 suggests most of these changes, except
that it also adds obsolete warnings, that where individually checked and
removed.

Regenerated `src/auto/configure` by running:

  cd src
  autoconf2.69 --output=auto/configure configure.ac
  sed --in-place --expression='s@>config.log@>auto/config.log@g' auto/configure

closes: #12888

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-08-27 18:24:59 +02:00
zeertzjq
d809c0a903
patch 9.0.1792: problem with gj/gk/gM and virtual text
Problem:  Normal mode "gM", "gj", "gk" commands behave incorrectly with
          virtual text.
Solution: Use linetabsize() instead of linetabsize_str().

closes: #12909

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-27 11:17:39 +02:00
Magnus Groß
8fbd9449e7
patch 9.0.1790: Redundant LSP Content-Type header
Problem:  The Content-Type header is an optional header that some LSP
          servers struggle with and may crash when encountering it.
Solution: Drop the Content-Type header from all messages, because we use
          the default value anyway.

Because pretty much all popular LSP clients (e.g. coc.nvim, VSCode) do
not send the Content-Type header, the LSP server ecosystem has developed
such that some LSP servers may even crash when encountering it.
To improve compatibility with these misbehaving LSP servers, we drop
this header as well.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Magnus Groß <magnus@mggross.com>
2023-08-27 11:11:22 +02:00
mathew
20f61d96f8
patch 9.0.1789: too early declaration of variable in pum_set_selected()
Problem:  too early declaration of variable in pum_set_selected()
Solution: Move declaration to where it is actually used

closes: #12915

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: mathew <glephunter@gmail.com>
2023-08-26 18:11:31 +02:00
K.Takata
4c215ecdaf
patch 9.0.1788: C4090 warnings in strings.c
Problem:  C4090 warnings in strings.c
Solution: Add type casts

closes: #12917

MSVC shows the following warnings:
```
strings.c(2436): warning C4090: 'function': different 'const' qualifiers
strings.c(2774): warning C4090: 'function': different 'const' qualifiers
strings.c(3865): warning C4090: 'function': different 'const' qualifiers
```

So add type casts to suppress them.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken .Takata <kentkt@csc.jp>
2023-08-26 18:05:08 +02:00
Christian Brabandt
d42f95bbfb
patch 9.0.1787: Cannot build with latest luajit
Problem:  Cannot build with latest luajit
Solution: adjust sed regexp and don't expect '-' in version output

closes: #12896

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-24 08:15:38 +02:00
LemonBoy
afe0466fb1
patch 9.0.1786: Vim9: need instanceof() function
Problem:  Vim9: need instanceof() function
Solution: Implement instanceof() builtin

Implemented in the same form as Python's isinstance because it allows
for checking multiple class types at the same time.

closes: #12867

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-23 21:08:11 +02:00
zeertzjq
1193951beb
patch 9.0.1785: wrong cursor position with 'showbreak' and lcs-eol
Problem:  wrong cursor position with 'showbreak' and lcs-eol
Solution: Add size of 'showbreak' before when 'listchars' "eol" is used.
          Also fix wrong cursor position with wrapping virtual text on
          empty line and 'showbreak'.

closes: #12891

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-23 20:58:01 +02:00
mathew
c51fa7bc46
patch 9.0.1784: redundant else in pum_set_selected()
Problem:  redundant else in pum_set_selected()
Solution: Remove it

closes: #12893

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: mathew <glephunter@gmail.com>
2023-08-23 20:55:17 +02:00
zeertzjq
b557f48982
patch 9.0.1783: Display issues with virt text smoothscroll and showbreak
Problem:  Wrong display with wrapping virtual text or unprintable chars,
          'showbreak' and 'smoothscroll'.
Solution: Don't skip cells taken by 'showbreak' in screen lines before
          "w_skipcol". Combined "n_skip" and "skip_cells".

closes: #12597

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-22 22:07:34 +02:00