]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
21 months agopatch 9.0.2019: Vim9: no support for funcrefs v9.0.2019
Yegappan Lakshmanan [Sat, 14 Oct 2023 09:18:50 +0000 (11:18 +0200)] 
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>
22 months agopatch 9.0.2018: complete_info() returns wrong index v9.0.2018
LemonBoy [Wed, 11 Oct 2023 19:55:56 +0000 (21:55 +0200)] 
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>
22 months agopatch 9.0.2017: linebreak applies for leading whitespace v9.0.2017
Christian Brabandt [Wed, 11 Oct 2023 19:51:19 +0000 (21:51 +0200)] 
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>
22 months agopatch 9.0.2016: Vim9: assignment operators don't work for class vars v9.0.2016
Yegappan Lakshmanan [Wed, 11 Oct 2023 19:43:52 +0000 (21:43 +0200)] 
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>
22 months agopatch 9.0.2015: Vim9: does not handle islocked() from a method correctly v9.0.2015
Ernie Rael [Wed, 11 Oct 2023 19:35:11 +0000 (21:35 +0200)] 
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>
22 months agopatch 9.0.2013: confusing ifdefs in if_<lang>.c v9.0.2014
Ken Takata [Wed, 11 Oct 2023 19:27:06 +0000 (21:27 +0200)] 
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>
22 months agopatch 9.0.2013: Unicode tables outdated v9.0.2013
Christian Brabandt [Wed, 11 Oct 2023 19:24:49 +0000 (21:24 +0200)] 
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>
22 months agopatch 9.0.2012: Vim9: error message can be more accurate v9.0.2012
Ernie Rael [Wed, 11 Oct 2023 19:22:12 +0000 (21:22 +0200)] 
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>
22 months agopatch 9.0.2011: INI files not detected v9.0.2011
Martin Tournoij [Wed, 11 Oct 2023 19:20:06 +0000 (21:20 +0200)] 
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>
22 months agopatch 9.0.2010: [security] use-after-free from buf_contents_changed() v9.0.2010
Christian Brabandt [Wed, 11 Oct 2023 19:08:13 +0000 (21:08 +0200)] 
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>
22 months agopatch 9.0.2009: cmdline-completion for comma-separated options wrong v9.0.2009
Yee Cheng Chin [Mon, 9 Oct 2023 16:12:31 +0000 (18:12 +0200)] 
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>
22 months agopatch 9.0.2008: test: undofile left behind v9.0.2008
Dominique Pellé [Mon, 9 Oct 2023 16:07:24 +0000 (18:07 +0200)] 
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>
22 months agopatch 9.0.2007: Vim9: covariant parameter types allowed v9.0.2007
Yegappan Lakshmanan [Mon, 9 Oct 2023 16:01:06 +0000 (18:01 +0200)] 
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>
22 months agopatch 9.0.2006: Vim9: need more tests v9.0.2006
Yegappan Lakshmanan [Mon, 9 Oct 2023 15:57:27 +0000 (17:57 +0200)] 
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>
22 months agopatch 9.0.2005: partially revert patch v9.0.1997 v9.0.2005
Christian Brabandt [Mon, 9 Oct 2023 15:52:14 +0000 (17:52 +0200)] 
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>
22 months agopatch 9.0.2004: Missing test file v9.0.2004
Christian Brabandt [Mon, 9 Oct 2023 06:15:00 +0000 (08:15 +0200)] 
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>
22 months agopatch 9.0.2003: xxd: compilation warning v9.0.2003
Christian Brabandt [Sun, 8 Oct 2023 18:36:44 +0000 (20:36 +0200)] 
patch 9.0.2003: xxd: compilation warning

Problem:  xxd: compilation warning
Solution: initialize variables

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime: make command name for &iskeywordprg more unique (#13297)
Enno [Sun, 8 Oct 2023 17:14:07 +0000 (19:14 +0200)] 
runtime: make command name for &iskeywordprg more unique (#13297)

See https://github.com/vim/vim/pull/13213/commits by @dkearns:
Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2002: Vim9: need cleanup of class related interface code v9.0.2002
Yegappan Lakshmanan [Sun, 8 Oct 2023 17:07:39 +0000 (19:07 +0200)] 
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>
22 months agotranslation(it): updated translation of xxd manpage
Antonio Giovanni Colombo [Sun, 8 Oct 2023 17:04:21 +0000 (19:04 +0200)] 
translation(it): updated translation of xxd manpage

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.2001: Vim9: segfault with islocked() v9.0.2001
Ernie Rael [Sat, 7 Oct 2023 20:05:40 +0000 (22:05 +0200)] 
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>
22 months agopatch 9.0.2000: Vim9: use-after-free in deep call stack v9.0.2000
Yegappan Lakshmanan [Sat, 7 Oct 2023 20:03:18 +0000 (22:03 +0200)] 
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>
22 months agoruntime(sh): Update ftplugin (#13213)
dkearns [Fri, 6 Oct 2023 17:59:42 +0000 (04:59 +1100)] 
runtime(sh): Update ftplugin (#13213)

Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1999: Vim9: some error messages can be improved v9.0.1999
Ernie Rael [Fri, 6 Oct 2023 17:55:52 +0000 (19:55 +0200)] 
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>
22 months agopatch 9.0.1998: xxd: cannot reverse a bit dump v9.0.1998
tristhaus [Fri, 6 Oct 2023 17:51:13 +0000 (19:51 +0200)] 
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>
22 months agopatch 9.0.1997: Some unused code in move.c and string.c v9.0.1997
dundargoc [Fri, 6 Oct 2023 17:41:14 +0000 (19:41 +0200)] 
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>
22 months agoruntime(doc): remove E1520 tag (#13289)
zeertzjq [Fri, 6 Oct 2023 17:34:04 +0000 (01:34 +0800)] 
runtime(doc): remove E1520 tag (#13289)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1996: Cannot build with python312 v9.0.1996
Ken Takata [Fri, 6 Oct 2023 17:27:13 +0000 (19:27 +0200)] 
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>
22 months agoruntime(doc): Update vim9class help (#13292)
Yegappan Lakshmanan [Fri, 6 Oct 2023 17:24:10 +0000 (10:24 -0700)] 
runtime(doc): Update vim9class help (#13292)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1995: Invalid memory access with empty 'foldexpr' v9.0.1995
zeertzjq [Fri, 6 Oct 2023 17:16:36 +0000 (19:16 +0200)] 
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>
22 months agopatch 9.0.1994: inconsistent feature description v9.0.1994
RestorerZ [Thu, 5 Oct 2023 20:25:12 +0000 (22:25 +0200)] 
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>
22 months agopatch 9.0.1993: warning about unused function definition v9.0.1993
Christian Brabandt [Thu, 5 Oct 2023 20:17:09 +0000 (22:17 +0200)] 
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>
22 months agopatch 9.0.1992: [security] segfault in exmode v9.0.1992
Christian Brabandt [Thu, 5 Oct 2023 20:08:30 +0000 (22:08 +0200)] 
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>
22 months agopatch 9.0.1991: no cmdline completion for setting the font v9.0.1991
Yee Cheng Chin [Thu, 5 Oct 2023 18:54:21 +0000 (20:54 +0200)] 
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>
22 months agopatch 9.0.1990: strange error number v9.0.1990
Christ van Willegen [Thu, 5 Oct 2023 18:48:36 +0000 (20:48 +0200)] 
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>
22 months agoruntime(netrw): diff (`df`) may open the wrong window (#13275)
KSR-Yasuda [Thu, 5 Oct 2023 18:37:15 +0000 (03:37 +0900)] 
runtime(netrw): diff (`df`) may open the wrong window (#13275)

closes: #11359

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(netrw): Update `.netrwbook` immediately on bookmark change (#13276)
KSR-Yasuda [Thu, 5 Oct 2023 18:34:17 +0000 (03:34 +0900)] 
runtime(netrw): Update `.netrwbook` immediately on bookmark change (#13276)

closes: #9738

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agotranslation(it): revert permission changes for xxd manpages again (#13277)
K.Takata [Thu, 5 Oct 2023 18:30:08 +0000 (03:30 +0900)] 
translation(it): revert permission changes for xxd manpages again (#13277)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1989: Vim9: double error message given v9.0.1989
Ernie Rael [Thu, 5 Oct 2023 18:28:16 +0000 (20:28 +0200)] 
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>
22 months agopatch 9.0.1988: Vim9: potential use-after-free for class members v9.0.1988
Yegappan Lakshmanan [Thu, 5 Oct 2023 18:24:18 +0000 (20:24 +0200)] 
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>
22 months agopatch 9.0.1987: win32: font-size calculation can be improved v9.0.1987
Ken Takata [Thu, 5 Oct 2023 18:20:58 +0000 (20:20 +0200)] 
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>
22 months agotranslation(sr): Update Serbian messages translation (#13282)
Ivan Pešić [Thu, 5 Oct 2023 18:17:28 +0000 (22:17 +0400)] 
translation(sr): Update Serbian messages translation (#13282)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1986: Vim9: accepting type-annotations v9.0.1986
Yegappan Lakshmanan [Thu, 5 Oct 2023 18:14:43 +0000 (20:14 +0200)] 
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>
22 months agoruntime(just): Correct filetype detection pattern and style (#13284)
dundargoc [Thu, 5 Oct 2023 18:11:55 +0000 (20:11 +0200)] 
runtime(just): Correct filetype detection pattern and style (#13284)

See https://github.com/vim/vim/pull/13271#discussion_r1347279686 and
https://github.com/NoahTheDuke/vim-just/blob/main/ftdetect/just.vim.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1985: CI: codecov is intrusive v9.0.1985
dundargoc [Thu, 5 Oct 2023 18:07:11 +0000 (20:07 +0200)] 
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>
22 months agopatch 9.0.1984: CI: Test_open_delay*() fails on FreeBSD 14 v9.0.1984
Christian Brabandt [Wed, 4 Oct 2023 19:58:24 +0000 (21:58 +0200)] 
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>
22 months agopatch 9.0.1983: scrolling inactive window not possible with cursorbind v9.0.1983
zeertzjq [Wed, 4 Oct 2023 19:45:33 +0000 (21:45 +0200)] 
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>
22 months agoruntime(netrw): error when trying to :bd unloaded buffer
yasuda [Wed, 4 Oct 2023 18:50:35 +0000 (20:50 +0200)] 
runtime(netrw): error when trying to :bd unloaded buffer

closes: #13215
closes: #13082

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1982: vim9: clean up from v9.0.1955 v9.0.1982
Ernie Rael [Wed, 4 Oct 2023 18:16:22 +0000 (20:16 +0200)] 
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>
22 months agopatch 9.0.1981: not being able to scroll up in diff mode v9.0.1981
zeertzjq [Wed, 4 Oct 2023 18:12:37 +0000 (20:12 +0200)] 
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>
22 months agopatch 9.0.1980: win32: issues with stable python ABI v9.0.1980
Ken Takata [Wed, 4 Oct 2023 18:05:05 +0000 (20:05 +0200)] 
patch 9.0.1980: win32: issues with stable python ABI

Problem:  win32: issues with stable python ABI
Solution: if_python3,win32: Fix Python3 stable ABI

There were some issues in current stable ABI implementation on Windows:
* Python DLL name should be `python3.dll` instead of `python311.dll` and
  so on. (See: https://docs.python.org/3/c-api/stable.html)
* Some non-stable API functions were used:
  - `_PyObject_NextNotImplemented`
  - `PyStdPrinter_Type`
* `reset_stdin()` and `hook_py_exit()` didn't work with `python3.dll`.
  `python3.dll` is a special type of DLL called forwarder DLL.
  It just forwards the functions to other DLL (e.g. `python311.dll`).
  There were two issues regarding these functions:
  - `python3.dll` doesn't have import tables. This caused a crash in
    `get_imported_func_info()`. Add a check whether the specified DLL
    has an import table.
  - `reset_stdin()` and `hook_py_exit()` should be applied to the
    forwarded DLL (e.g. `python311.dll`), not to `python3.dll`.
    Check the export directory of `python3.dll` to find the forwarded
    DLL and apply the functions to it.

closes: #13260

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.1979: Cirrus CI disabled v9.0.1979
zeertzjq [Wed, 4 Oct 2023 17:57:35 +0000 (19:57 +0200)] 
patch 9.0.1979: Cirrus CI disabled

Problem:  Cirrus CI disabled
Solution: re-enable Cirrus CI

Ref patch 9.0.1912:

> 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.

Actually enabling testing should be fine. In the last month there were
three Cirrus CI jobs and credits ran out on Sep 15, but now there is
only one Cirrus CI job, so credits shouldn't run out.

closes: #13261

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1978: No filetype detection for just files v9.0.1978
dundargoc [Wed, 4 Oct 2023 17:52:54 +0000 (19:52 +0200)] 
patch 9.0.1978: No filetype detection for just files

Problem:  No filetype detection for just files
Solution: Detect just files (*.just, justfile, etc)

closes: #13271

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
22 months agopatch 9.0.1977: Vim9: object members can change type v9.0.1977
Yegappan Lakshmanan [Wed, 4 Oct 2023 17:47:52 +0000 (19:47 +0200)] 
patch 9.0.1977: Vim9: object members can change type

Problem:  Vim9: object members can change type
Solution: Check type during assignment to object/class var

closes: #13127
closes: #13262

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agotranslation(it): update translation of xxd manpage
Antonio Giovanni Colombo [Wed, 4 Oct 2023 16:29:35 +0000 (18:29 +0200)] 
translation(it): update translation of xxd manpage

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): update xxd manpage and mention $NO_COLOR env
Christian Brabandt [Tue, 3 Oct 2023 14:55:18 +0000 (16:55 +0200)] 
runtime(doc): update xxd manpage and mention $NO_COLOR env

also regenerate the xxd.man document page.

fixes: #13257

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): fix two typos in `vim9.txt` and `options.txt` (#13258)
Aliaksei Budavei [Tue, 3 Oct 2023 14:39:53 +0000 (17:39 +0300)] 
runtime(doc): fix two typos in `vim9.txt` and `options.txt` (#13258)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): remove E1507 help tag, which is no longer used (#13254)
zeertzjq [Tue, 3 Oct 2023 06:12:56 +0000 (14:12 +0800)] 
runtime(doc): remove E1507 help tag, which is no longer used (#13254)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1976: style: space before tab in optionstr.c v9.0.1976
Christian Brabandt [Mon, 2 Oct 2023 21:21:11 +0000 (23:21 +0200)] 
patch 9.0.1976: style: space before tab in optionstr.c

Problem:  style: space before tab in optionstr.c
Solution: remove the space

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1975: xattr: permission-denied errors on write v9.0.1975
Gene C [Mon, 2 Oct 2023 20:42:26 +0000 (22:42 +0200)] 
patch 9.0.1975: xattr: permission-denied errors on write

Problem:  xattr: permission-denied errors on write
Solution: ignore those errors

closes: #13246

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gene C <arch@sapience.com>
22 months agotranslation(ru): Update Russian message translation to Vim 9.0.1968 (#13239)
Restorer [Mon, 2 Oct 2023 19:53:27 +0000 (19:53 +0000)] 
translation(ru): Update Russian message translation to Vim 9.0.1968 (#13239)

* Updated to Vim 9.0.1968. Several refinements and corrections
* typo fixed

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): add missing error numbers in the help. (#13241)
Yegappan Lakshmanan [Mon, 2 Oct 2023 19:50:45 +0000 (12:50 -0700)] 
runtime(doc): add missing error numbers in the help.  (#13241)

closes: #13240

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): mention how to disable folding in diff mode (#13242)
dundargoc [Mon, 2 Oct 2023 19:49:23 +0000 (21:49 +0200)] 
runtime(doc): mention how to disable folding in diff mode (#13242)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): fix typos.
h_east [Mon, 2 Oct 2023 19:47:13 +0000 (04:47 +0900)] 
runtime(doc): fix typos.

* Fix typo in document (Related: #12516)
* Fix E1363 duplication
* Fix one more typo.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1974: vim9: using contra-variant type-checks v9.0.1974
Yegappan Lakshmanan [Mon, 2 Oct 2023 19:43:58 +0000 (21:43 +0200)] 
patch 9.0.1974: vim9: using contra-variant type-checks

Problem:  vim9: using contra-variant type-checks (after v9.0.1959)
Solution: Use invariant type checking instead

closes: #13248

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.1973: Clean up cmdline option completion code v9.0.1973
Yee Cheng Chin [Mon, 2 Oct 2023 19:38:39 +0000 (21:38 +0200)] 
patch 9.0.1973: Clean up cmdline option completion code

Problem:  Clean up cmdline option completion code
Solution: Fix various minor problems

- Fix manual array size calculations to just use `ARRAY_LENGTH()`.
- Fix unintentional typo in comments due to copy-paste error.
- Fix assert_equal() usages to pass the expected value to first
  parameter instead of 2nd one to avoid confusion.
- Fix signed vs unsigned warnings
- Correct misplaced comments about set_op_T and set_prefix_T
  and fix a typo in another comment

closes: #13249
closes: #13237

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1972: win32: missing '**' expansion test v9.0.1972
Ken Takata [Mon, 2 Oct 2023 19:31:31 +0000 (21:31 +0200)] 
patch 9.0.1972: win32: missing '**' expansion test

Problem:  win32: missing '**' expansion test (after v9.0.1947)
Solution: Add test for MS-Windows

win32: Add "**" test

Vim supports "**" on MS-Windows. However, it is not tested by
`Test_glob_extended_bash`.

Unlike Unix, it doesn't use 'shell' and doesn't support {,} expansion.
So, I added as a separate test.

related: #13205
closes: #13250

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.1971: macOS: FEAT_SOUND guard too restrictive v9.0.1971
Yee Cheng Chin [Mon, 2 Oct 2023 19:28:50 +0000 (21:28 +0200)] 
patch 9.0.1971: macOS: FEAT_SOUND guard too restrictive

Problem:  macOS: FEAT_SOUND guard too restrictive
Solution: check for older macOS support properly

Fix macOS FEAT_SOUND guards to be less restrictive

This allows +sound to work on older macOS platforms again. The +sound
implementation uses APIs available in 10.6, but the code itself uses
generics with type parameters which was only added in Xcode 7 / clang 7,
which was released for macOS 10.11. This means as long as Vim is
compiled under 10.11+, and using a deployment target >= 10.6, the
feature will work.

closes: #13251

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
22 months agopatch 9.0.1970: win32: high-dpi support can be improved v9.0.1970
Ken Takata [Mon, 2 Oct 2023 19:26:03 +0000 (21:26 +0200)] 
patch 9.0.1970: win32: high-dpi support can be improved

Problem:  win32: high-dpi support can be improved
Solution: implement WM_GETDPISCALEDSIZE

win32: Better support of Per-Monitor V2 High DPI

Implement WM_GETDPISCALEDSIZE.
It is not so easy to calculate the new size without actually changing
the size. So, this returns an approximate size.

This doesn't work well when a bitmap font (e.g. FixedSys) is selected,
but I think this is acceptable.

closes: #11812
closes: #13252

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.1969: [security] buffer-overflow in trunc_string() v9.0.1969
Christian Brabandt [Mon, 2 Oct 2023 18:59:08 +0000 (20:59 +0200)] 
patch 9.0.1969: [security] buffer-overflow in trunc_string()

Problem:  buffer-overflow in trunc_string()
Solution: Add NULL at end of buffer

Currently trunc_string() assumes that when the string is too long,
buf[e-1] will always be writeable. But that assumption may not always be
true. The condition currently looks like this

    else if (e + 3 < buflen)
    [...]
    else
    {
// can't fit in the "...", just truncate it
buf[e - 1] = NUL;
    }

but this means, we may run into the last else clause with e still being
larger than buflen. So a buffer overflow occurs.

So instead of using `buf[e - 1]`, let's just always
truncate at `buf[buflen - 1]` which should always be writable.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1968: cmdline completion should consider key option v9.0.1968
Yee Cheng Chin [Sun, 1 Oct 2023 07:13:22 +0000 (09:13 +0200)] 
patch 9.0.1968: cmdline completion should consider key option

Problem:  cmdline completion should consider key option
Solution: Disable cmdline completion for key option, slightly
          refactor how P_NO_CMD_EXPAND is handled

Harden crypto 'key' option: turn off cmdline completion, disable set-=

"set-=" can be used maliciously with a crypto key, as it allows an
attacker (who either has access to the computer or a plugin author) to
guess a substring by observing the modified state. Simply turn off
set+=/-=/^= for this option as there is no good reason for them to be
used.

Update docs to make that clear as well.

Also, don't allow cmdline completion for 'key' as it just shows *****
which is not useful and confusing to the user what it means (if the user
accidentally hits enter they will have replaced their key with "*****"
instead).

Move logic to better location, don't use above 32-bit for flags

Move P_NO_CMD_EXPAND to use the unused 0x20 instead of going above
32-bits, as currently the flags parameter is only 32-bits on some
systems. Left a comment to warn that future additions will need to
change how the flags work either by making it 64-bit or split into two
member vars.

Also, move the logic for detecting P_NO_CMD_EXPAND earlier so it's not
up to each handler to decide, and you won't see the temporary "..." that
Vim shows while waiting for completion handler to complete.

closes: #13224

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
22 months agopatch 9.0.1967: xattr errors not translated v9.0.1967
zeertzjq [Sun, 1 Oct 2023 07:07:14 +0000 (09:07 +0200)] 
patch 9.0.1967: xattr errors not translated

Problem:  xattr errors not translated
Solution: mark for translation, consistently capitalize
          first letter.

closes: #13236

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1966: configure prints stray 6 when checking libruby v9.0.1966
Illia Bobyr [Sat, 30 Sep 2023 20:59:27 +0000 (22:59 +0200)] 
patch 9.0.1966: configure prints stray 6 when checking libruby

Problem:  configure prints stray 6 when checking libruby
Solution: redirect stdout to dev/null

configure: Do not print "6" when checking for libruby

`expr` will print the matched string length to the standard output.
Current `configure` output looks like this:

```
checking Ruby header files...  /usr/include/ruby-3.1.0
6
```

The script really only cares about `expr` exit code.

closes: #13234

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
22 months agopatch 9.0.1965: wrong auto/configure script v9.0.1965
Illia Bobyr [Sat, 30 Sep 2023 20:57:19 +0000 (22:57 +0200)] 
patch 9.0.1965: wrong auto/configure script

Problem:  wrong auto/configure script
Solution: regenerate with autoconf 2.71

configure: sys/xattr.hs: Regenerate with autoconf 2.71

It seems that `auto/configure` update in

  commit 6de4e58cf27a3bb6e81653ca63b77e29d1bb46f2 (tag: v9.0.1963)
  Author: zeertzjq <zeertzjq@outlook.com>
  Date:   Sat Sep 30 14:19:14 2023 +0200

      patch 9.0.1963: Configure script may not detect xattr

      Problem:  Configure script may not detect xattr correctly
      Solution: include sys/xattr instead of attr/xattr,
                make Test_write_with_xattr_support() test
                xattr feature correctly

      This also applies to the Smack security feature, so change the include
      and configure script for it as well.

      closes: #13229

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
was done manually, and missed an update to the generated variable name.

closes: #13235

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
22 months agopatch 9.0.1964: xattr support fails to build on MacOS X v9.0.1964
Christian Brabandt [Sat, 30 Sep 2023 16:51:36 +0000 (18:51 +0200)] 
patch 9.0.1964: xattr support fails to build on MacOS X

Problem:  xattr support fails to build on MacOS X
Solution: Disable xattr support for MacOS X

MacOS X uses the same headers and functions sys/xattr.h but the function
signatures for xattr support are much different, so building fails.

So let's for now disable xattr support there.

closes: #13230
closes: #13232

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1963: Configure script may not detect xattr v9.0.1963
zeertzjq [Sat, 30 Sep 2023 12:19:14 +0000 (14:19 +0200)] 
patch 9.0.1963: Configure script may not detect xattr

Problem:  Configure script may not detect xattr correctly
Solution: include sys/xattr instead of attr/xattr,
          make Test_write_with_xattr_support() test
          xattr feature correctly

This also applies to the Smack security feature, so change the include
and configure script for it as well.

closes: #13229

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1962: No support for writing extended attributes v9.0.1962
Christian Brabandt [Sat, 30 Sep 2023 10:49:18 +0000 (12:49 +0200)] 
patch 9.0.1962: No support for writing extended attributes

Problem:  No support for writing extended attributes
Solution: Add extended attribute support for linux

It's been a long standing issue, that if you write a file with extended
attributes and backupcopy is set to no, the file will loose the extended
attributes.

So this patch adds support for retrieving the extended attributes and
copying it to the new file. It currently only works on linux, mainly
because I don't know the different APIs for other systems (BSD, MacOSX and
Solaris).  On linux, this should be supported since Kernel 2.4 or
something, so this should be pretty safe to use now.

Enable the extended attribute support with normal builds.

I also added it explicitly to the :version output as well as make it
able to check using `:echo has("xattr")`, to have users easily check
that this is available.

In contrast to the similar support for SELINUX and SMACK support (which
also internally uses extended attributes), I have made this a FEAT_XATTR
define, instead of the similar HAVE_XATTR.

Add a test and change CI to include relevant packages so that CI can
test that extended attributes are correctly written.

closes: #306
closes: #13203

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1961: 'listchars' completion misses "multispace" and "leadmultispace" v9.0.1961
zeertzjq [Sat, 30 Sep 2023 10:43:07 +0000 (12:43 +0200)] 
patch 9.0.1961: 'listchars' completion misses "multispace" and "leadmultispace"

Problem:  Cmdline completion for 'listchars' fields doesn't include
          "multispace" and "leadmultispace" (after 9.0.1958).
Solution: Include "multispace" and "leadmultispace" in lcstab.

closes: #13225

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1960: Make CI checks more strict v9.0.1960
Yee Cheng Chin [Sat, 30 Sep 2023 10:28:50 +0000 (12:28 +0200)] 
patch 9.0.1960: Make CI checks more strict

Problem:  Make CI checks more strict
Solution: Add -Wstrict-prototypes -Wmissing-prototypes to CI,
          fix uncovered problems

Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI

Add two new warnings to CI, silence some Perl related build-warnings:

- `strict-prototypes` helps prevent declaring a function with an empty
  argument list, e.g. `int func()`. In C++, that's equivalent to `int
  func(void)`, but in C, that means a function that can take any number
  of arguments which is rarely what we want.

- `missing-prototypes` makes sure we use `static` for file-only internal
  functions. Non-static functions should have been declared on a
  prototype file.

- Add `no-compound-token-split-by-macro` to the perl cflags, since it
  throws out a bunch of perl-related warnings that make the CI log
  unnecessary verbose and hard to read. This seems to happen only with
  clang 12 and above.

When applying those changes, it already uncovered a few warnings, so fix
up the code as well (fix prototypes, make the code static, remove
shadowed var declaration)

GTK header needs to have #pragma warning suppressiong because GTK2
headers will warn on `-Wstrict-prototypes`, and it's included by gui.h
and so we can't just turn off the warning in a couple files.

closes: #13223
closes: #13226

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
22 months agopatch 9.0.1959: Vim9: methods parameters and types are covariant v9.0.1959
Yegappan Lakshmanan [Fri, 29 Sep 2023 20:50:02 +0000 (22:50 +0200)] 
patch 9.0.1959: Vim9: methods parameters and types are covariant

Problem:  Vim9: methods parameters and types are covariant
Solution: Support contra-variant type check for object method arguments
          (similar to Dart).

closes: #12965
closes: #13221

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.1958: cannot complete option values v9.0.1958
Yee Cheng Chin [Fri, 29 Sep 2023 18:42:32 +0000 (20:42 +0200)] 
patch 9.0.1958: cannot complete option values

Problem:  cannot complete option values
Solution: Add completion functions for several options

Add cmdline tab-completion for setting string options

Add tab-completion for setting string options on the cmdline using
`:set=` (along with `:set+=` and `:set-=`).

The existing tab completion for setting options currently only works
when nothing is typed yet, and it only fills in with the existing value,
e.g. when the user does `:set diffopt=<Tab>` it will be completed to
`set diffopt=internal,filler,closeoff` and nothing else. This isn't too
useful as a user usually wants auto-complete to suggest all the possible
values, such as 'iblank', or 'algorithm:patience'.

For set= and set+=, this adds a new optional callback function for each
option that can be invoked when doing completion. This allows for each
option to have control over how completion works. For example, in
'diffopt', it will suggest the default enumeration, but if `algorithm:`
is selected, it will further suggest different algorithm types like
'meyers' and 'patience'. When using set=, the existing option value will
be filled in as the first choice to preserve the existing behavior. When
using set+= this won't happen as it doesn't make sense.

For flag list options (e.g. 'mouse' and 'guioptions'), completion will
take into account existing typed values (and in the case of set+=, the
existing option value) to make sure it doesn't suggest duplicates.

For set-=, there is a new `ExpandSettingSubtract` function which will
handle flag list and comma-separated options smartly, by only suggesting
values that currently exist in the option.

Note that Vim has some existing code that adds special handling for
'filetype', 'syntax', and misc dir options like 'backupdir'. This change
preserves them as they already work, instead of converting to the new
callback API for each option.

closes: #13182

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
22 months agopatch 9.0.1957: termcap options should change when setting keyprotocol v9.0.1957
Gregory Anders [Fri, 29 Sep 2023 18:17:20 +0000 (20:17 +0200)] 
patch 9.0.1957: termcap options should change when setting keyprotocol

Problem:  termcap options should change on keyprotocol setting
Solution: Apply termcap entries when 'keyprotocol' changes

When the 'keyprotocol' option was set after startup (including in a
user's .vimrc) the termcap entries associated with the matching protocol
were not applied. Thus, setting the option has no affect.

When 'keyprotocol' is changed it should also update the termcap entries.

closes: #13211

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
22 months agopatch 9.0.1956: Custom completion skips orig cmdline if it invokes glob() v9.0.1956
zeertzjq [Fri, 29 Sep 2023 17:58:35 +0000 (19:58 +0200)] 
patch 9.0.1956: Custom completion skips orig cmdline if it invokes glob()

Problem:  Custom cmdline completion skips original cmdline when pressing
          Ctrl-P at first match if completion function invokes glob().
Solution: Move orig_save into struct expand_T.

closes: #13216

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
22 months agopatch 9.0.1955: Vim9: lockvar issues with objects/classes v9.0.1955
Ernie Rael [Fri, 29 Sep 2023 17:53:55 +0000 (19:53 +0200)] 
patch 9.0.1955: Vim9: lockvar issues with objects/classes

Problem:  Vim9: lockvar issues with objects/classes
Solution: fix `get_lhs()` object/class access and avoid `SEGV`,
          make error messages more accurate.

- `get_lval()` detects/returns object/class access
- `compile_lock_unlock()` generate code for bare static and obj_arg access
- `do_lock_var()` check lval for `ll_object`/`ll_class` and fail if so.

Details:
- Add `ll_object`/`ll_class`/`ll_oi` to `lval_T`.
- Add `lockunlock_T` to `isn_T` for `is_arg` to specify handling of `lval_root` in `get_lval()`.
- In `get_lval()`, fill in `ll_object`/`ll_class`/`ll_oi` as needed; when no `[idx] or .key`, check lval_root on the way out.
- In `do_lock_var()` check for `ll_object`/`ll_class`; also bullet proof ll_dict case
  and give `Dictionay required` if problem. (not needed to avoid lockvar crash anymore)
- In `compile_lock_unlock()` compile for the class variable and func arg cases.

closes: #13174

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
22 months agopatch 9.0.1954: CI: change netrw label in labeller bot v9.0.1954
Ken Takata [Fri, 29 Sep 2023 17:48:09 +0000 (19:48 +0200)] 
patch 9.0.1954: CI: change netrw label in labeller bot

Problem:  CI: change netrw label in labeller bot
Solution: Rename it to 'plugin-netrw'

closes: #13217

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.1953: Misplaced comment in errors.h v9.0.1953
Ken Takata [Fri, 29 Sep 2023 17:45:42 +0000 (19:45 +0200)] 
patch 9.0.1953: Misplaced comment in errors.h

Problem:  Misplaced comment in errors.h
Solution: Move it up

closes: #13218

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agopatch 9.0.1952: Vim9: unused static field v9.0.1952
Yegappan Lakshmanan [Fri, 29 Sep 2023 17:43:11 +0000 (19:43 +0200)] 
patch 9.0.1952: Vim9: unused static field

Problem:  Vim9: unused static field
Solution: remove it and simplify code

closes: #13220

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agoruntime(doc): text-objects: document how escaped delimiters are handled
Christian Brabandt [Thu, 28 Sep 2023 22:09:28 +0000 (00:09 +0200)] 
runtime(doc): text-objects: document how escaped delimiters are handled

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1951: Vim9: hard to debug vim9_class errors from CI v9.0.1951
Yegappan Lakshmanan [Thu, 28 Sep 2023 21:06:48 +0000 (23:06 +0200)] 
patch 9.0.1951: Vim9: hard to debug vim9_class errors from CI

Problem:  Vim9: hard to debug vim9_class errors from CI
Solution: Include the line number in assert_xxx() calls.  Include the
          entire error message in the tests.  Fix the indentation in the
          test file.  Add tags for new error codes.

closes: #13206

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.1950: Vim9: error codes spread out v9.0.1950
Yegappan Lakshmanan [Thu, 28 Sep 2023 20:46:37 +0000 (22:46 +0200)] 
patch 9.0.1950: Vim9: error codes spread out

Problem:  Vim9: error codes spread out
Solution: group them together and reserve 100
          more for future use

Reserve 100 error codes for future enhancements to the Vim9 class
support

closes: #13207

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.1949: Vim9: allows reserved keywords as members v9.0.1949
Yegappan Lakshmanan [Thu, 28 Sep 2023 20:28:15 +0000 (22:28 +0200)] 
patch 9.0.1949: Vim9: allows reserved keywords as members

Problem:  Vim9: allows reserved keywords as members
Solution: Disallow reserved keywords, disallow
          duplicate object and class variables

closes: #13209

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agopatch 9.0.1948: Vim9: object variable "this." should only be used in constructor v9.0.1948
h-east [Thu, 28 Sep 2023 20:18:19 +0000 (22:18 +0200)] 
patch 9.0.1948: Vim9: object variable "this." should only be used in constructor

Problem:  Vim9: object variable "this." should only be used in
          constructor
Solution: Disallow to this in normal object methods (other than
          constructors)

closes: #13152
closes: #13212

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
22 months agopatch 9.0.1947: Bash Expansion test fails on Windows/MacOS v9.0.1947
Ken Takata [Thu, 28 Sep 2023 19:59:58 +0000 (21:59 +0200)] 
patch 9.0.1947: Bash Expansion test fails on Windows/MacOS

Problem:  Bash Expansion test fails on Windows/MacOS
Solution: Disable Test_glob_extended_bash for now

This test doesn't work on Windows even if bash can be executed, since
the globstar functionality has only been enabled in Unix builds of Vim
(Commit 9eb1ce531527a7177d16373b0f8689bbcd3d5f73, patch 9.0.1946).

closes: #13205

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
22 months agoruntime(doc): regenerate xxd manpage
Christian Brabandt [Wed, 27 Sep 2023 21:33:39 +0000 (23:33 +0200)] 
runtime(doc): regenerate xxd manpage

Commit f6fc255e8d9c46a0e51e (v9.0.1834) updated xxd.1 but the xxd.man
page wasn't re-generated. So let's just regenerate it now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1946: filename expansion using ** in bash may fail v9.0.1946
Christian Brabandt [Wed, 27 Sep 2023 17:08:25 +0000 (19:08 +0200)] 
patch 9.0.1946: filename expansion using ** in bash may fail

Problem:  filename expansion using ** in bash may fail
Solution: Try to enable the globstar setting

Starting with bash 4.0 it supports extended globbing using the globstar
shell option. This makes matching recursively below a certain directory
using the ** pattern work as expected nowadays.  However, we need to
explicitly enable this using the 'shopt -s globstar' bash command.

So let's check the bash environment variable $BASH_VERSINFO (which is
supported since bash 3.0 and conditionally enable the globstar option,
if the major version is at least 4. For older bashs, this at least
shouldn't cause errors (unless one is using really ancient bash 2.X or
something).

closes: #13002
closes: #13144

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.0.1945: Vim9: missing support for ro-vars in interface v9.0.1945
Yegappan Lakshmanan [Wed, 27 Sep 2023 17:02:01 +0000 (19:02 +0200)] 
patch 9.0.1945: Vim9: missing support for ro-vars in interface

Problem:  Vim9: missing support for ro-vars in interface
Solution: Support only read-only object variables in an interface,
          add additional checks when parsing class definitions.

closes: #13183
cloess: #13184
cloess: #13185.
closes: #13188

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
22 months agoruntime(doc): mention mouse scrolling in scrollbind-quickadj (#13190)
zeertzjq [Wed, 27 Sep 2023 17:00:12 +0000 (01:00 +0800)] 
runtime(doc): mention mouse scrolling in scrollbind-quickadj (#13190)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(swayconfig): Update syntax file (#13192)
Josef Litoš [Wed, 27 Sep 2023 16:58:15 +0000 (18:58 +0200)] 
runtime(swayconfig): Update syntax file (#13192)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(i3config): update i3config syntax (#13191)
Josef Litoš [Wed, 27 Sep 2023 16:57:24 +0000 (18:57 +0200)] 
runtime(i3config): update i3config syntax (#13191)

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(rmd) Update ftplugin and syntax files (#13193)
Jakson Alves de Aquino [Wed, 27 Sep 2023 16:56:02 +0000 (13:56 -0300)] 
runtime(rmd) Update ftplugin and syntax files (#13193)

ftplugin/rmd.vim:

  - Set 'commentstring' dynamically according to code region.

syntax/rmd.vim:

  - Include syntax highlighting of fenced languages dynamically.
  - Add conceal char for line break.

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