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

19740 Commits

Author SHA1 Message Date
Marius Gedminas
c98bfb9f59
runtime(doc): wrong return type for execute() function
The description clearly explains that this function returns a string.  I
think the 'Number' here is a copy/paste error.

closes: #15045

Signed-off-by: Marius Gedminas <marius@gedmin.as>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:00:00 +02:00
K.Takata
56f587b3f8
patch 9.1.0502: MS-Windows: too much legacy code
Problem:  MS-Windows: too much legacy code
Solution: Clean up old code
          (Ken Takata)

* Remove very old codes for Cygwin version of GCC.
  Nowadays Cygwin GCC cannot be used for building Win32 Vim.
  (The `-mno-cygwin` option was removed in Cygwin GCC4.)
* Remove old codes for old versions of MinGW.
  Remove `__MINGW32__` as much as possible.
* Adjust makefile.

closes: #15044

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0502
2024-06-19 19:56:03 +02:00
Ubaldo Tiberi
46f2823807
patch 9.1.0501: too complicated mapping restore in termdebug
Problem:  too complicated mapping restore in termdebug
Solution: simplify unmapping logic, add a few more tests
          (Ubaldo Tiberi)

closes: #15046

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0501
2024-06-19 19:50:32 +02:00
Maxim Kim
aeca7176f3
runtime(nohlsearch): simplify mapping
Use <cmd> instead of <expr> with execute(...)[-1]

closes: #15047

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 19:42:47 +02:00
Christian Brabandt
fbc37f138a
patch 9.1.0500: cannot switch buffer in a popup
Problem:  cannot switch buffer in a popup
          (Yggdroot)
Solution: add popup_setbuf() function

fixes: #15006
closes: #15026

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0500
2024-06-18 21:01:23 +02:00
LemonBoy
23c5ebeb95
patch 9.1.0499: MS-Windows: doesn't handle symlinks properly
Problem:  MS-Windows: doesn't handle symlinks properly
          (Timothy Madden)
Solution: Implement lstat() on MS-Windows
          (author)

lstat() differs from stat() in how it handles symbolic links, the former
doesn't resolve the symlink while the latter does so.

Implement a simple yet effective fallback using Win32 APIs.

fixes #14933
closes: #15014

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0499
2024-06-18 20:43:51 +02:00
zeertzjq
a821b609f9
patch 9.1.0498: getcmdcompltype() interferes with cmdline completion
Problem:  getcmdcompltype() interferes with cmdline completion.
Solution: Don't set expand context when it's already set.
          (zeertzjq)

closes: #15036

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0498
2024-06-18 20:31:08 +02:00
Ubaldo Tiberi
a48637c105
patch 9.1.0497: termdebug can be further improved
Problem:  termdebug can be further improved
Solution: refactor save/restore, update docs,
          add a new save/restore test (Ubaldo Tiberi)

closes: #15032

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0497
2024-06-18 20:24:54 +02:00
Afiq Nazrie
9718ed7ab9
runtime(filetype): update htmldjango detection
- update tags to detect djangohtml based on
  https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#built-in-tag-reference

- increase the lines to inspect to 40 lines

  10 lines is too few and might result in high false negative.
  Increasing it to 40 lines should reduce the false negative.

closes: #15037

Signed-off-by: Afiq Nazrie <afnazrie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:59:53 +02:00
Emir SARI
2dadf5304a
translation(tr): Improve Turkish documentation
closes: #15041

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:50:14 +02:00
Maxim Kim
1ce65e35ac
runtime(csv): include a simple csv filetype and syntax plugin
fixes: #15038

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:48:15 +02:00
Maxim Kim
26de90c631
runtime(nohlsearch): include the the simple nohlsearch package
fixes: #15039
closes: #15042

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:32:39 +02:00
glepnir
f189138b39
patch 9.1.0496: matched text is highlighted case-sensitively
Problem:  matched text is highlighted case-sensitively
Solution: use MB_STRNICMP, update highlighting when the base changes
          (glepnir)

fixes: #15021
closes: #15023

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0496
2024-06-17 18:35:25 +02:00
zeertzjq
d8c9340fc6
patch 9.1.0495: Matched text isn't highlighted in cmdline pum
Problem:  Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
          (zeertzjq)

closes: #15029

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0495
2024-06-17 18:25:32 +02:00
h-east
84ac2126f4
runtime(doc): Fix typos in several documents
closes: #15034

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 18:12:51 +02:00
Christian Brabandt
946f61c405
runtime(doc): clarify when text properties are cleared
related: #15030

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 13:17:58 +02:00
Christian Brabandt
ca47114532
runtime(doc): improve the vim-shebang example
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 13:09:25 +02:00
Christian Brabandt
c52a856079
runtime(doc): revert unintended formatting changes for termdebug
fixes: #15028

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 05:30:37 +02:00
Doug Kearns
0ddab582fa
runtime(java): Add a config variable for commonly used compiler options
The value of g:javac_makeprg_params, if set, is added to the value of
'makeprg' as an option string.

closes: #14999

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:58:09 +02:00
zeertzjq
63901e8963
patch 9.1.0494: Wrong matched text highlighted in pum with 'rightleft'
Problem:  Wrong matched text highlighted in pum with 'rightleft'.
Solution: Match using the original text instead of the reversed text.
          (zeertzjq)

closes: #15020

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0494
2024-06-16 16:51:25 +02:00
Mohamed Akram
917ff8a19d
runtime(html): bump length of character references in syntax script (#15022)
This allows handling longer references such as
`&CounterClockwiseContourIntegral;`.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:47:36 +02:00
shane.xb.qian
a5af73ae34
runtime(termdebug): properly check mapping variables using null_dict
closes: #15013

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:44:53 +02:00
Yinzuo Jiang
79da22de75
runtime(kdl): fix KdlIndent and kdlComment in indent script (#15019)
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:47:47 +02:00
zeertzjq
acc8746941
patch 9.1.0493: Test for patch 9.1.0489 doesn't fail without the fix
Problem:  Test for patch 9.1.0489 doesn't fail without the fix.
Solution: Use "!" flag of feedkeys() so that ex_normal_busy is not set
          and ins_compl_check_keys() is not skipped (zeertzjq).

closes: #15018

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0493
2024-06-16 08:44:05 +02:00
Aliaksei Budavei
371bab0594
runtime(java): Fold multi-line comments with the syntax kind of &fdm (#15016)
Also:

- Restore the capability to mark as an error braces nested
  in parens with g:javaInParen.
- Try not to fold top-level-type bodies.  (Defining multiple
  package-private top level types in a single source file is
  not recommended as it can impose order among compilation
  units; so it is assumed that only one such top level type
  is usually defined.)
- Compose ‘method header’ highlighting and block braces
  folding.
- Do not highlight block braces whenever ‘method header’
  highlighting is requested.

This bundling of ‘method headers’ and block braces for
highlighting can be traced back to Vim v5.0; however, no
comment or documentation entry conveys any justification.
For example, it is hard to discover the connection between
block braces for "while", "if", etc., statements and method
body block braces.  The former behaviour can be attained in,
e.g. ~/.vim/after/syntax/java.vim:

------------------------------------------------------------
if exists("g:java_highlight_functions")
    syn clear javaBlock javaInParen
    syn match javaBlockOther "[{}]"
    syn region javaBlock transparent matchgroup=javaBlockStart
	\ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold
    hi def link javaBlockStart javaFuncDef
    hi def link javaBlockOther javaBlockStart

    if exists("g:java_mark_braces_in_parens_as_errors")
	syn match javaInParen contained "[{}]"
    endif
endif
------------------------------------------------------------

Note: Read ‘a method header omitting a _throws_ clause’ for
every ‘method header’ appellation used above.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:42:55 +02:00
shane.xb.qian
f127dce188
runtime(termdebug): using wrong type for PlaceSign()
Make sure to convert them to numbers.

fixes: #14994
closes: #15015

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:37:23 +02:00
Doug Kearns
0d4d23dac0
patch 9.1.0492: filetype: Vim-script files not detected by shebang line
Problem:  Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)

closes: #15012

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0492
2024-06-16 08:32:15 +02:00
Christian Brabandt
52f2ff0363
runtime(zip): revert unintended change to zip#Write()
This was wrongly included as of patch 1c6734291295bf8aa39577840b40bb
because apparently I messed up the use of git apply :/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 16:05:35 +02:00
Christian Brabandt
f4bc59c4f6
runtime(doc): add another tag for vim-shebang feature
related: #15011

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:52:53 +02:00
zeertzjq
883018feff
patch 9.1.0491: Cmdline pum doesn't work properly with 'rightleft'
Problem:  Cmdline pum doesn't work properly with 'rightleft'.
Solution: Don't use curwin->w_p_rl in cmdline mode in pum_redraw().  Use
          a static variable since pum_may_redraw() may be called in any
          mode.  Also correct position of other popups with 'rightleft'.
          (zeertzjq)

closes: #15005

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0491
2024-06-15 15:37:11 +02:00
glepnir
105f741fac
patch 9.1.0490: minor style problems with patch 9.1.0487
Problem:  minor style problems with patch 9.1.0487
Solution: use shown_compl instead of after_first_compl variable
          (glepnir)

closes: #15008

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
fix(completion): use exist shown_compl instead after_first_compl
v9.1.0490
2024-06-15 15:32:22 +02:00
glepnir
aced8c2f4f
patch 9.1.0489: default completion may break with fuzzy
Problem:  default completion may break with fuzzy
Solution: check that completion_match_array is not null
          (glepnir)

closes: #15010

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0489
2024-06-15 15:27:09 +02:00
zeertzjq
a2324373eb
patch 9.1.0488: Wrong padding for pum "kind" with 'rightleft'
Problem:  Wrong padding for pum "kind" with 'rightleft'.
Solution: Fix off-by-one error (zeertzjq).

The screen_fill() above is end-exclusive, and
- With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`,
  so the next `col` should be `pum_col - pum_base_width - n`.
- With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`,
  so the next `col` should be `pum_col - pum_base_width + n`.

closes: #15004

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0488
2024-06-15 15:08:27 +02:00
dkearns
ae321b51f7
runtime(vim): Update base-syntax, match shebang lines (#15011)
Match shebang lines in Vim9 and legacy script.

Mark these as an error if they appear anywhere other than the first line
of a legacy-script file.  In Vim9 script these match as normal line
comments rather than an error.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:06:17 +02:00
Christian Brabandt
1c67342912
runtime(zip): MS-Windows: handle files with spaces properly
This change does the following 3 things:

1) non need to quote the file to be extracted

The zipfile plugin used to quote and fnameescape() the path to the
file to be extracted. However testing with unzip showed, that while this
works on Linux on Windows you shall not escape the blanks in filenames.

As long as the pathname is properly quoted, this words on Linux and
Windows.

2) reset shellslash (MS-Windows only)

When shellslash is set, filenames to the zip archive will be forward
quoted. However since the filename is eventually handed over to the
unzip command, we need to make sure to use native paths so that the
command will understand what file to open. Therefore, if shellslash is
set (and the shell is cmd.exe), replace any forward slashes by the
expected backslashes

3) style:
Use tabs for the Header, remove a few comments in the s:Escape() and
zip#read() functions

fixes: #14998

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 14:51:07 +02:00
Doug Kearns
6dd5840fdf
runtime(html): Restore HTML syntax file tests
Rendered element content results in test failures on macOS and FreeBSD.

The included content for these elements was incidental to the primary
intent of the test to check element tag highlighting so set
g:html_no_rendering to disable content rendering.

FreeBSD fails for even an empty <strike> element.

See #13591 and #14215.

closes: #13595

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 21:18:33 +02:00
glepnir
f94c9c482a
patch 9.1.0487: completed item not update on fuzzy completion
Problem:  completed item not update on fuzzy completion
Solution: reset compl_shown_match when at original match position
          (glepnir)

closes: #14955

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0487
2024-06-14 21:11:56 +02:00
Riley Bruins
82a579e15a
patch 9.1.0486: filetype: Snakemake files are not recognized
Problem:  filetype: Snakemake files are not recognized
Solution: Detect '*.smk' and Snakefile files as snakemake filetype
          (Riley Bruins)

See:
https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility

closes: #14992

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0486
2024-06-14 20:47:05 +02:00
Damien Riegel
17e702a51a
runtime(termdebug): make TermDebugSendCommand() a global function again
TermDebugSendCommand lost it's global visibility when converted to
vim9script. Restore it.

Fixes: 23f29ffc6427 ("runtime(termdebug): convert termdebug plugin to
       Vim9 script")
closes: #14997

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:42:35 +02:00
Damien Riegel
fce324f557
runtime(termdebug): close all buffers in the same way
For ASM and Variables buffer, check were done to make sure they existed
before attempting to close them, but not for debugged program or gdb
communication. The debugged program window is a user-facing one and
user might close it manually, so it's better to check if it exists.

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:41:36 +02:00
zeertzjq
afbe5359e9
patch 9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"
Problem:  Matched text shouldn't be highlighted in "kind" and "menu".
Solution: Pass hlf_T instead of the attribute.  Fix indent.
          (zeertzjq)

closes: #14996

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0485
2024-06-14 20:24:22 +02:00
Christian Brabandt
c509c009bb
runtime(doc): fix wrong helptag for :defer
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:23:00 +02:00
Doug Kearns
262e25e5a1
runtime(vim): Update base-syntax, match :sleep arg
Match :sleep arg properly including a lone "m" with a leading count.

closes: #15003

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:16:35 +02:00
Misho
79a14c061b
runtime(keymap): include Georgian keymap
closes: #15002

Signed-off-by: Misho <nnamper@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:13:39 +02:00
zeertzjq
8e56747fd2
patch 9.1.0484: Sorting of completeopt+=fuzzy is not stable
Problem:  Sorting of completeopt+=fuzzy is not stable.
Solution: Compare original indexes when scores are the same.
          (zeertzjq)

closes: #14988

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0484
2024-06-14 20:04:42 +02:00
Christian Brabandt
440746158c
runtime(netrw): correctly test for windows in NetrwGlob()
use has("win32") instead of has("win64") otherwise it
won't work on x86 systems.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 08:19:22 +02:00
Christian Brabandt
1487947fb6
runtime(netrw): glob() on windows fails with [] in directory name
fixes: #14952
closes: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:25:35 +02:00
Christian Brabandt
d6d4e13336
runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:24:51 +02:00
Christian Brabandt
8b34aea1b0
patch 9.1.0483: glob() not sufficiently tested
Problem:  glob() not sufficiently tested
Solution: Add more tests for directory containing [] chars

related: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0483
2024-06-13 21:20:20 +02:00
Christian Brabandt
1cd31a4501
runtime(doc): update return type for job_info()
related: #14982

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 20:46:23 +02:00