0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

19166 Commits

Author SHA1 Message Date
Yee Cheng Chin
5d03525cde
patch 9.0.2028: confusing build dependencies
Problem:  confusing build dependencies
Solution: clean them up, make them parallelizable

Separate vim binary and unittest dependencies, make them parallelizable

Clean up make dependencies so Vim and unit test binaries only depend on
the object files they need. This fixes an existing issue where after
running unit tests, the Vim binary would be invalidated, which results
in it having to be linked again when running script tests, even though
Vim was already previously built.

Make link.sh (script we use to link those binaries) generate namespaced
temporary files for each app to avoid them colliding with each other.
This allows `unittesttargets` to be built in parallel.

These fixes are useful when using link-time-optimization as the link
phase could now take minutes rather than a few seconds.

closes: #13344

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-15 09:50:53 +02:00
Yegappan Lakshmanan
de3295dd0c
patch 9.0.2027: Vim9: no support for bitwise operators in lambda funcs
Problem:  Vim9: no support for bitwise operators in lambda funcs
Solution: move "evaluate" assignment a bit up in order to decide
          to perform bitwise operations

closes: #13342
closes: #13345

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-15 09:44:50 +02:00
Ken Takata
ae3cfa47d3
patch 9.0.2026: win32: python3 dll loading can be improved
Problem:  win32: python3 dll loading can be improved
Solution: Load DLL from registry path

Support loading python3.dll and/or python3xx.dll from the path written
in the registry.  To support Stable ABI's forwarder DLL (python3.dll),
use the `LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR` flag for `LoadLibraryExW()`
because python3xx.dll is placed in the same directory of python3.dll.

If Stable ABI is used, search the latest version from the registry (both
from HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE).  If Stable ABI is not
used, search only the matching version.

closes: #13315

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-14 11:49:09 +02:00
Yee Cheng Chin
989426be6e
patch 9.0.2025: no cmdline completion for ++opt args
Problem:  no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
          [++options]

closes: #13319

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-14 11:46:51 +02:00
James McCoy
bd734c3bea
patch 9.0.2024: no filetype detection for Debian sources
Problem:  no filetype detection for Debian sources
Solution: Add new deb822sources filetype

closes: #13320

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
2023-10-14 11:41:34 +02:00
Christian Brabandt
ba9aed4497
patch 9.0.2023: need more tests for :cq
Problem:  need more tests for :cq
Solution: Add more tests, including wraparound on linux

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:39:40 +02:00
zeertzjq
b583eda703
patch 9.0.2022: getmousepos() returns wrong index for TAB char
Problem:  When clicking in the middle of a TAB, getmousepos() returns
          the column of the next char instead of the TAB.
Solution: Break out of the loop when the vcol to find is inside current
          char. Fix invalid memory access when calling virtcol2col() on
          an empty line.

closes: #13321

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-14 11:32:28 +02:00
Christian Brabandt
cd6ee69358
patch 9.0.2021: Coverity complains about change in charset
Problem:  Coverity complains about change in charset (after v9.0.2017)
Solution: check pointer t at index 0

closes: #13322

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:29:28 +02:00
Ivan Pešić
5ae6f9985e
translation(sr): Update Serbian messages translation (#13324)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:28:05 +02:00
Ernie Rael
0f058d1320
patch 9.0.2020: Vim9: islocked() needs more work
Problem:  Vim9: islocked() needs more work
Solution: rework islocked() and remove sync_root
          from get_lval()

closes: #13329

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-14 11:25:04 +02:00
Yegappan Lakshmanan
29bb67f1be
patch 9.0.2019: Vim9: no support for funcrefs
Problem:  Vim9: no support for funcrefs
Solution: Add support for object/class funcref members

closes: #11981 #12417 #12960 #12324 #13333

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-14 11:18:50 +02:00
LemonBoy
69fb5afb3b
patch 9.0.2018: complete_info() returns wrong index
Problem:  complete_info() returns wrong index
Solution: Make order of 'info' in completion_info consistent

Start the iteration from the same point and follow the same direction as
done when assigning the completion numbers. This way we remove the
dependence on the completion direction and make the order of 'info'
consistent.

closes: #12230
closes: #12971

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-10-11 21:55:56 +02:00
Christian Brabandt
dd75fcfbdf
patch 9.0.2017: linebreak applies for leading whitespace
Problem:  linebreak applies for leading whitespace
Solution: only apply linebreak, once we have found non-breakat chars in
          the line

closes: #13228
closes: #13243

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:53:52 +02:00
Yegappan Lakshmanan
1ea428883f
patch 9.0.2016: Vim9: assignment operators don't work for class vars
Problem:  Vim9: assignment operators don't work for class vars
Solution: implement it

closes: #13306

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-11 21:43:52 +02:00
Ernie Rael
4c8da025ef
patch 9.0.2015: Vim9: does not handle islocked() from a method correctly
Problem:  Vim9: does not handle islocked() from a method correctly
Solution: Handle islocked() builtin from a method.

- Setup `lval_root` from `f_islocked()`.
- Add function `fill_exec_lval_root()` to get info about executing method.
- `sync_root` added in get_lval to handle method member access.
- Conservative approach to reference counting.

closes: #13309

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-11 21:38:24 +02:00
Ken Takata
c97b3febc8
patch 9.0.2013: confusing ifdefs in if_<lang>.c
Problem:  confusing ifdefs in if_<lang>.c
Solution: refactor ifndefs to #ifdefs

if_x: Avoid using #ifndef - #else - #endif

Using #ifndef - #else - #endif is sometimes confusing.
Use #ifdef - #else - #endif instead.

closes: #13310

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-11 21:27:06 +02:00
Christian Brabandt
a634b92b96
patch 9.0.2013: Unicode tables outdated
Problem: Unicode tables outdated
Solution: Update Unicode tables to v15.1 (released 23.09.2023)

closes: #13311

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:24:49 +02:00
Ernie Rael
f8da324619
patch 9.0.2012: Vim9: error message can be more accurate
Problem:  Vim9: error message can be more accurate
Solution: Fix the error messages

Fix message for some single use error messages.

closes: #13312

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-11 21:22:12 +02:00
Martin Tournoij
4a82bdfaa8
patch 9.0.2011: INI files not detected
Problem:  INI files not detected
Solution: detect uppercase .INI as dosini files

It previo~1 only worked for lower-case .ini files, but upperc~1 .INI is
also somewhat common on account of DOS' old 8.3 upperc~2 only filena~1.

closes: #13316

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Tournoij <martin@arp242.net>
2023-10-11 21:20:06 +02:00
Christian Brabandt
41e6f7d6ba
patch 9.0.2010: [security] use-after-free from buf_contents_changed()
Problem:  [security] use-after-free from buf_contents_changed()
Solution: block autocommands

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:09:53 +02:00
Yee Cheng Chin
54844857fd
patch 9.0.2009: cmdline-completion for comma-separated options wrong
Problem:  cmdline-completion for comma-separated options wrong
Solution: Fix command-line expansions for options with filenames with
          commas

Fix command-line expansions for options with filenames with commas

Cmdline expansion for option values that take a comma-separated list
of file names is currently not handling file names with commas as the
commas are not escaped. For such options, the commas in file names need
to be escaped (to differentiate from a comma that delimit the list
items). The escaped comma is unescaped in `copy_option_part()` during
option parsing.

Fix as follows:
- Cmdline completion for option values with comma-separated file/folder
  names will not start a new match when seeing `\\,` and will instead
  consider it as one value.
- File/folder regex matching will strip the `\\` when seeing `\\,` to
  make sure it can match the correct files/folders.
- The expanded value will escape `,` with `\\,`, similar to how spaces
  are escaped to make sure the option value is correct on the cmdline.

This fix also takes into account the fact that Win32 Vim handles file
name escaping differently. Typing '\,' for a file name results in it
being handled literally but in other platforms '\,' is interpreted as a
simple ',' and commas need to be escaped using '\\,' instead.

Also, make sure this new logic only applies to comma-separated options
like 'path'. Non-list options like 'set makeprg=<Tab>' and regular ex
commands like `:edit <Tab>` do not require escaping and will continue to
work.

Also fix up documentation to be clearer. The original docs are slightly
misleading in how it discusses triple slashes for 'tags'.

closes: #13303
related: #13301

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-09 18:12:31 +02:00
Dominique Pellé
b07b9dc4da
patch 9.0.2008: test: undofile left behind
Problem:  test: undofile left behind
Solution: cleanup undofile

fix: tmp file not deleted when running make test_undo

Temporary file `.Xtestfile.txt.un~` was left running `make test_undo`
and vim was configured with:
```
./configure --with-features=normal --enable-gui=no --enable-terminal
```

closes: #13304

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-10-09 18:09:20 +02:00
Yegappan Lakshmanan
e467189022
patch 9.0.2007: Vim9: covariant parameter types allowed
Problem:  Vim9: covariant parameter types allowed when assigning
          functions
Solution: Enforce invariant type check for arguments and return value
          when assigning a funcref

closes: #13299
closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-09 18:01:06 +02:00
Yegappan Lakshmanan
f4ee1cb74b
patch 9.0.2006: Vim9: need more tests
Problem:  Vim9: need more tests
Solution: add additional disassembly tests

closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-09 17:57:27 +02:00
Christian Brabandt
b56cef0be0
patch 9.0.2005: partially revert patch v9.0.1997
Problem:  partially revert patch v9.0.1997
Solution: add a comment, to make clear it's not used

related: #13288

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-09 17:55:02 +02:00
Christian Brabandt
d4afbdd071
patch 9.0.2004: Missing test file
Problem:  Missing test file
Solution: git-add the file to the repo

closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-09 08:15:00 +02:00
Christian Brabandt
7879bc5c13
patch 9.0.2003: xxd: compilation warning
Problem:  xxd: compilation warning
Solution: initialize variables

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-08 20:38:43 +02:00
Yegappan Lakshmanan
b852305dbf
patch 9.0.2002: Vim9: need cleanup of class related interface code
Problem:  Vim9: need cleanup of class related interface code
Solution: Remove the unused class variable and class method related code
          for interfaces.

Remove unused class variable and class method related code for
interfaces.

Refactor the code.

Optimize the object/class member double lookup in compile_lhs().

Change unused global functions to static functions.

closes: #13302

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-08 19:07:39 +02:00
Ernie Rael
9771b2a67f
patch 9.0.2001: Vim9: segfault with islocked()
Problem:  Vim9: segfault with islocked()
Solution: Check that the lval pointer is not null for objects and
          class variables

closes: #13295

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-07 22:10:26 +02:00
Yegappan Lakshmanan
1087b8c29a
patch 9.0.2000: Vim9: use-after-free in deep call stack
Problem:  Vim9: use-after-free in deep call stack
Solution: Get the objct pointer from execution stack

closes: #13296

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-07 22:03:18 +02:00
Ernie Rael
e6c9aa5e6a
patch 9.0.1999: Vim9: some error messages can be improved
Problem:  Vim9: some error messages can be improved
Solution: Mention the defining class for variable access error message

closes: #13272

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-06 19:55:52 +02:00
tristhaus
85f4521808
patch 9.0.1998: xxd: cannot reverse a bit dump
Problem:  xxd: cannot reverse a bit dump
Solution: implement reversing the bit dump using -b -r

closes: #13286

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: tristhaus <tristhaus@yahoo.de>
2023-10-06 19:51:13 +02:00
dundargoc
580c1fcb4a
patch 9.0.1997: Some unused code in move.c and string.c
Problem:  Some unused code in move.c and string.c
Solution: Remove it

closes: #13288

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-06 19:41:14 +02:00
Ken Takata
fa145f2009
patch 9.0.1996: Cannot build with python312
Problem:  Cannot build with python312
Solution: Define wrapper types and functions for python 3.12

Py_SIZE() uses PyLong_Type and PyBool_Type starting from Python 3.12.
We need to define our own Py_SIZE() to replace Py{Bool,Long}_Type with
py3_Py{Bool,Long}_Type.
We also need to redefine PyTuple_GET_SIZE() and PyList_GET_SIZE(), because
they use Py_SIZE().

closes: #13281
closes: #13290

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-06 19:27:13 +02:00
zeertzjq
a991ce9c08
patch 9.0.1995: Invalid memory access with empty 'foldexpr'
Problem:  Invalid memory access when 'foldexpr' returns empty string.
Solution: Check for NUL.

closes: #13293

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-06 19:18:12 +02:00
RestorerZ
ac9c6d5c78
patch 9.0.1994: inconsistent feature description
Problem:  inconsistent feature description
Solution: delete old mentioned feature sets small and big

The may however still be mentioned for historical reasons. e.g. The
last Amiga built version is for Vim6.2 and is still a big version.

closes: #13273

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
2023-10-05 22:25:12 +02:00
Christian Brabandt
9960ebcace
patch 9.0.1993: warning about unused function definition
Problem:  warning about unused function definition
Solution: add ifdefs

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 22:17:09 +02:00
Christian Brabandt
20d161ace3
patch 9.0.1992: [security] segfault in exmode
Problem:  segfault in exmode when redrawing
Solution: skip gui_scroll when exmode_active

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 22:10:10 +02:00
Yee Cheng Chin
290b887e8c
patch 9.0.1991: no cmdline completion for setting the font
Problem:  no cmdline completion for setting the font
Solution: enable it on Win32 and GTK builds

Add guifont cmdline completion (for Windows and GTK)

For Windows, auto-complete will only suggest monospace fonts as that's
the only types allowed. Will also suggest font options after the colon,
including suggesting the current font size for convenience, and misc
charset and quality options like `cANSI` and `qCLEARTYPE`.

For GTK, auto-complete will suggest only monospace fonts for `guifont`
but will include all fonts for `guifontwide`. The completion code
doesn't currently suggest the current font size, as the GTK guifont
format does not have a clear delimiter (':' for other platforms).

closes: #13264

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-05 20:54:21 +02:00
Christ van Willegen
ea746f9e86
patch 9.0.1990: strange error number
Problem:  strange error number
Solution: change error number,
          add doc tag for E1507

closes: #13270

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-10-05 20:48:36 +02:00
Ernie Rael
d615a3122a
patch 9.0.1989: Vim9: double error message given
Problem:  Vim9: double error message given
Solution: Only give second error message, if ther
          wasn't one given before

closes: #13278

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-05 20:28:16 +02:00
Yegappan Lakshmanan
d2f4800099
patch 9.0.1988: Vim9: potential use-after-free for class members
Problem:  Vim9: potential use-after-free for class members
Solution: Use the class-related grow array for storing the
          member type instead of using a temporary type
          list grow array

Use the type list grow array associated with the class than using a
temporary type list grow array to allocate the class member type.

For simple types, a predefined type is used. For complex types, the type
is dynamically allocated from a grow array. For class variables, the
type grow array in the class should be used. So that the lifetime of the
type is same as the lifetime of the class.

closes: #13279

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-05 20:24:18 +02:00
Ken Takata
da5da654de
patch 9.0.1987: win32: font-size calculation can be improved
Problem:  win32: font-size calculation can be improved
Solution: calculate font size before the window size

Support calculating the new size even if a bitmap font is used.
Calculate the new font size before actually change the Window size.

closes: #13280
related: #11812, #13252

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-05 20:20:58 +02:00
Ivan Pešić
c661e11e9c
translation(sr): Update Serbian messages translation (#13282)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 20:17:28 +02:00
Yegappan Lakshmanan
b5a0719cb7
patch 9.0.1986: Vim9: accepting type-annotations
Problem:  Vim9: accepting type-annotations
Solution: Reject type annotations outside of declarations.

closes: #13267
closes: #13283

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-05 20:16:06 +02:00
dundargoc
9a00e7c7cf
patch 9.0.1985: CI: codecov is intrusive
Problem:  CI: codecov is intrusive
Solution: disable codecov comments

The codecov report is incredibly intrusive, and getting a notification
for every PR to vim that codecov codecoved is annoying. If anyone is
interested in the report the information is readily available by
clicking on the job.

closes: #13285

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-05 20:07:11 +02:00
Christian Brabandt
85ff0c1912
patch 9.0.1984: CI: Test_open_delay*() fails on FreeBSD 14
Problem:  CI: Test_open_delay*() fails on FreeBSD 14
Solution: Skip it on BSD

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-04 21:58:24 +02:00
zeertzjq
8e5f26ec6a
patch 9.0.1983: scrolling inactive window not possible with cursorbind
Problem:  Scrolling non-current window using mouse is inconsistent
          depending on 'scrollbind'/'scrolloff' and different from GUI
          vertical scrollbar when 'cursorbind' is set.
Solution: Don't move cursor in non-current windows for 'cursorbind' if
          cursor in the current window didn't move.

closes: #13219
closes: #13210

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-04 21:45:33 +02:00
Ernie Rael
64885645e7
patch 9.0.1982: vim9: clean up from v9.0.1955
Problem:  vim9: clean up from v9.0.1955
Solution: Fix a few remaining issues, improve error message

- Use `cl_exec`, the executing class, to check permissions in `get_lval()`.
- Handle lockvar of script variable from class.
- Add 'in class "Xxx"' to e_cannot_access_private_variable_str.

closes: #13222

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-04 20:16:22 +02:00
zeertzjq
0583491277
patch 9.0.1981: not being able to scroll up in diff mode
Problem:  Cannot scroll up in diff mode with many filler lines and zero
          'scrolloff'.
Solution: Invalidate w_cline_row before calling comp_botline().

closes: #13256

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-04 20:12:37 +02:00