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

17680 Commits

Author SHA1 Message Date
zeertzjq
62d861741b
patch 9.1.0658: Coverity warns about dereferencing NULL pointer.
Problem:  Coverity warns about dereferencing NULL pointer.
Solution: Bail out if vim_strrchr() returns NULL.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1616019:    (NULL_RETURNS)
/src/help.c: 834 in fix_help_buffer()
828                                  continue;
829                              t2 = gettail(f2);
830                              e2 = vim_strrchr(t2, '.');
831                              if (e1 - f1 != e2 - f2
832                                          || fnamencmp(f1, f2, e1 - f1) != 0)
833                                  continue;
>>>     CID 1616019:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "(char_u *)e2" when calling "vim_fnamecmp".
834                              if (fnamecmp(e1, ".txt") == 0
835                                             && fnamecmp(e2, fname + 4) == 0)
836                                  // use .abx instead of .txt
837                                  VIM_CLEAR(fnames[i1]);
838                          }
839                      }
/src/help.c: 816 in fix_help_buffer()
810                      // the same directory.
811                      for (i1 = 0; i1 < fcount; ++i1)
812                      {
813                          f1 = fnames[i1];
814                          t1 = gettail(f1);
815                          e1 = vim_strrchr(t1, '.');
>>>     CID 1616019:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "(char_u *)e1" when calling "vim_fnamecmp".
816                          if (fnamecmp(e1, ".txt") != 0
817                                             && fnamecmp(e1, fname + 4) != 0)
818                          {
819                              // Not .txt and not .abx, remove it.
820                              VIM_CLEAR(fnames[i1]);
821                              continue;

closes: #15420

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:52:00 +02:00
Ken Takata
87d63d34b6
patch 9.1.0657: MS-Windows: MSVC build time can be optimized
Problem:  MS-Windows: MSVC build time can be optimized
Solution: Stop using Powershell, show detected version, read _MSC_VER
          and _MSC_FULL_VER in a single cl execution. (Ken Takata)

closes: #15421

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:40:35 +02:00
Ken Takata
cdf1c7a73a
patch 9.1.0656: MS-Windows: MSVC Makefile CPU handling can be improved
Problem:  MS-Windows: MSVC Makefile CPU handling can be improved
Solution: Update Makefile and also remove some old code
          (Ken Takata)

* The variable `ASSEMBLY_ARCHITECTURE` was originally used to generate
  the manifest file. However, this was removed in v7.0.198.  Remove
  `ASSEMBLY_ARCHITECTURE` and use `CPU` instead.
* `/arch:AVX512` is available starting from Visual C++ 2017.
* ARM64 was not considered when validating CPUNR.
  Skip the validation for ARM64 for now.
* Remove old code for VC6/7 and Win9x.

closes: #15422

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:36:37 +02:00
Adam Monsen
0aa65b48fb
patch 9.1.0655: filetype: goaccess config file not recognized
Problem:  filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
          include a basic syntax and ftplugin (Adam Monsen)

Add syntax highlighting for GoAccess configuration file.

GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.

GoAccess home page: https://goaccess.io

closes: #15414

Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:58:00 +02:00
glepnir
b9de1a057f
patch 9.1.0654: completion does not respect completeslash with fuzzy
Problem:  completion does not respect completeslash with fuzzy
          (egesip)
Solution: Change path separator on Windows, depending on 'completeslash'
          option value (glepnir)

fixes: #15392
closes: #15418

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:14:38 +02:00
Christian Brabandt
a0b5bc1285
patch 9.1.0653: Patch v9.1.0648 not completely right
Problem:  Patch v9.1.0648 not completely right
          (zeertzjq)
Solution: Remove always true condition

closes: #15415

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:06:41 +02:00
John Marriott
b4ea77185c
patch 9.1.0652: too many strlen() calls in syntax.c
Problem:  too many strlen() calls in syntax.c
Solution: refactor code to reduce the number or strlen() calls,
          get rid of un-used SYN_NAMELEN macro
          (John Marriott)

closes: #15368

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 23:01:25 +02:00
Mohamed Akram
0214680a8e
patch 9.1.0651: ex: trailing dot is optional for :g and :insert/:append
Problem:  ex: trailing dot is optional for :g and :insert/:append
Solution: don't break out early, when the next command is empty.
          (Mohamed Akram)

The terminating period is optional for the last command in a global
command list.

closes: #15407

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:53:01 +02:00
zeertzjq
e8feaa354e
patch 9.1.0650: Coverity warning in cstrncmp()
Problem:  Coverity warning in cstrncmp()
          (after v9.1.0645)
Solution: Change the type of n2 to int.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
/src/regexp.c: 1757 in cstrncmp()
1751                 n1 -= mb_ptr2len(s1);
1752                 MB_PTR_ADV(p);
1753                 n2++;
1754             }
1755             // count the number of bytes to advance the same number of chars for s2
1756             p = s2;
>>>     CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "n2--", which is equal to 18446744073709551615, where "n2" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide.
1757             while (n2-- > 0 && *p != NUL)
1758                 MB_PTR_ADV(p);
1759
1760             n2 = p - s2;
1761
1762             result = MB_STRNICMP2(s1, s2, *n, n2);

closes: #15409

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:48:53 +02:00
zeertzjq
c1ed788c1b
patch 9.1.0649: Wrong comment for "len" argument of call_simple_func()
Problem:  Wrong comment for "len" argument of call_simple_func().
Solution: Remove the "or -1 to use strlen()".  Also change its type to
          size_t to remove one cast. (zeertzjq)

closes: #15410

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:46:54 +02:00
Christian Brabandt
b29f4abcd4
patch 9.1.0648: [security] double-free in dialog_changed()
Problem:  [security] double-free in dialog_changed()
          (SuyueGuo)
Solution: Only clear pointer b_sfname pointer, if it is different
          than the b_ffname pointer.  Don't try to free b_fname,
          set it to NULL instead.

fixes: #15403

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-46pw-v7qw-xc2f

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:35:18 +02:00
Christian Brabandt
8a0bbe7b8a
patch 9.1.0647: [security] use-after-free in tagstack_clear_entry
Problem:  [security] use-after-free in tagstack_clear_entry
          (Suyue Guo )
Solution: Instead of manually calling vim_free() on each of the tagstack
          entries, let's use tagstack_clear_entry(), which will
          also free the stack, but using the VIM_CLEAR macro,
          which prevents a use-after-free by setting those pointers
          to NULL

This addresses CVE-2024-41957

Github advisory:
https://github.com/vim/vim/security/advisories/GHSA-f9cr-gv85-hcr4

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:35:18 +02:00
Ernie Rael
164096927b
patch 9.1.0646: Vim9: imported function may not be found
Problem:  Vim9: imported function may not be found
Solution: Try to find the function by name (Ernie Rael)

fixes: #15381
closes: #15382

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:18:11 +02:00
Christian Brabandt
22e8e12d9f
patch 9.1.0645: regex: wrong match when searching multi-byte char case-insensitive
Problem:  regex: wrong match when searching multi-byte char
          case-insensitive (diffsetter)
Solution: Apply proper case-folding for characters and search-string

This patch does the following 4 things:

1) When the regexp engine compares two utf-8 codepoints case
   insensitive it may match an adjacent character, because it assumes
   it can step over as many bytes as the pattern contains.

   This however is not necessarily true because of case-folding, a
   multi-byte UTF-8 character can be considered equal to some
   single-byte value.

   Let's consider the pattern 'ſ' and the string 's'. When comparing and
   ignoring case, the single character 's' matches, and since it matches
   Vim will try to step over the match (by the amount of bytes of the
   pattern), assuming that since it matches, the length of both strings is
   the same.

   However in that case, it should only step over the single byte value
   's' by 1 byte and try to start matching after it again. So for the
   backtracking engine we need to ensure:
   * we try to match the correct length for the pattern and the text
   * in case of a match, we step over it correctly

   There is one tricky thing for the backtracing engine. We also need to
   calculate correctly the number of bytes to compare the 2 different
   utf-8 strings s1 and s2. So we will count the number of characters in
   s1 that the byte len specified. Then we count the number of bytes to
   step over the same number of characters in string s2 and then we can
   correctly compare the 2 utf-8 strings.

2) A similar thing can happen for the NFA engine, when skipping to the
   next character to test for a match. We are skipping over the regstart
   pointer, however we do not consider the case that because of
   case-folding we may need to adjust the number of bytes to skip over.
   So this needs to be adjusted in find_match_text() as well.

3) A related issue turned out, when prog->match_text is actually empty.
   In that case we should try to find the next match and skip this
   condition.

4) When comparing characters using collections, we must also apply case
   folding to each character in the collection and not just to the
   current character from the search string.  This doesn't apply to the
   NFA engine, because internally it converts collections to branches
   [abc] -> a\|b\|c

fixes: #14294
closes: #14756

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 20:39:18 +02:00
zeertzjq
74011dc1fa
patch 9.1.0644: Unnecessary STRLEN() when applying mapping
Problem:  Unnecessary STRLEN() when applying mapping.
          (after v9.1.0642)
Solution: Use m_keylen and vim_strnsave().
          (zeertzjq)

closes: #15394

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 19:17:56 +02:00
Christian Brabandt
1254e6db83
patch 9.1.0643: terminal: cursor may end up on invalid position
Problem:  terminal: cursor may end up on invalid position after reducing
          the scrollback lines (user202729)
Solution: After reducing the scrollback size, check the cursor position,
          making sure it does not end up on an invalid line

fixes: #15351

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 21:19:51 +02:00
zeertzjq
9d997addc7
patch 9.1.0642: Check that mapping rhs starts with lhs fails if not simplified
Problem:  Check that mapping rhs starts with lhs doesn't work if lhs is
          not simplified.
Solution: Keep track of the mapblock containing the alternative lhs and
          also compare with it (zeertzjq).

fixes: #15376
closes: #15384

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 21:10:07 +02:00
Ken Takata
baaf6deb95
patch 9.1.0641: MS-Windows: OLE enabled in console version
Problem:  MS-Windows: OLE enabled in console version, may cause hang
          (Linda_pp)
Solution: Disable OLE for console version (Ken Takata)

If VIMDLL was enabled, a message box for registering OLE might be shown
even if Vim was executed in a console. (See #15372)

Enabling OLE in a console is not so useful.  Disable it.

fixes: #15372
closes: #15385

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:57:19 +02:00
Ken Takata
3da011871a
patch 9.1.0640: Mingw: Makefile can be improved
Problem:  Mingw: Makefile can be improved
Solution: Reduce nesting level, directly check if the '-Wl,--entry'
          option is required (Ken Takata)

closes: #15386

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:43:21 +02:00
Ken Takata
0bee82b1d0
patch 9.1.0639: channel timeout may wrap around
Problem:  channel timeout may wrap around
Solution: Correct timeout calculation when GetTickCount() wraps around
          (Ken Takata)

closes: #15390

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:39:12 +02:00
zeertzjq
0dff31576a
patch 9.1.0638: E1510 may happen when formatting a message for smsg()
Problem:  E1510 may happen when formatting a message
          (after 9.1.0181).
Solution: Only give E1510 when using typval. (zeertzjq)

closes: #15391

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:28:14 +02:00
Ken Takata
81a65000c5
patch 9.1.0637: MS-Windows: Style issues in MSVC Makefile
Problem:  MS-Windows: Style issues in MSVC Makefile
Solution: Fix style issues, simplify logic
          (Ken Takata)

* Add space around the operators for consistency.
* Remove unnecessary ren command. Use the /Fe option to create
  install.exe directly.
* Remove unnecessary mkdir auto command. src/auto should always exist.

closes: #15389

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 19:52:03 +02:00
EliSauder
f4572cee35
patch 9.1.0636: filetype: ziggy files are not recognized
Problem:  filetype: ziggy files are not recognized
Solution: detect '*.ziggy' files as ziggy filetype,
          detect '*.ziggy-schema' files as ziggy-schema filetype
          (EliSauder)

References: https://ziggy-lang.io/

fixes: #15355
closes: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:32:38 +02:00
EliSauder
e57c9a19ed
patch 9.1.0635: filetype: SuperHTML template files not recognized
Problem:  filetype: SuperHTML template files not recognized
Solution: Update the filetype detection code to detect '*.shtml' either
          as HTML (Server Side Includes) or SuperHTML (template files)
          (EliSauder)

related: #15355
related: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:28:11 +02:00
Christian Brabandt
13032a49b7
patch 9.1.0634: Ctrl-P not working by default
Problem:  Ctrl-P not working by default
          (Jesse Pavel, after v9.1.0598)
Solution: Revert part of v9.1.0598 and set cur_match_pos
          correctly according to compl_dir_forward()

fixes: #15370
closes: #15379

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:16:48 +02:00
Dominique Pellé
0268ff3af3
patch 9.1.0633: Compilation warnings with -Wunused-parameter
Problem:  Compilation warnings with `-Wunused-parameter`
Solution: Add the `UNUSED` macro where needed, and remove some
          superfluous ones (Dominique Pellé)

Change fixes these kind of warnings when building without the channel
feature:

```
eval.c:6122:15: warning: unused parameter ‘tv’ [-Wunused-parameter]
     typval_T *tv,
               ^
eval.c:6123:14: warning: unused parameter ‘tofree’ [-Wunused-parameter]
     char_u **tofree,
              ^
eval.c:6124:13: warning: unused parameter ‘numbuf’ [-Wunused-parameter]
     char_u *numbuf,
             ^
eval.c:6125:10: warning: unused parameter ‘composite_val’ [-Wunused-parameter]
     int  composite_val)
```

closes: #15378

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:12:20 +02:00
Ken Takata
073cb02cb5
patch 9.1.0632: MS-Windows: Compiler Warnings
Problem:  MS-Windows: Compiler Warnings
Solution: Fix the warnings (Ken Takata)

* Unused variable.
* Conversion from size_t to int.

closes: #15369

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 17:08:15 +02:00
glepnir
6b6280c4a2
patch 9.1.0631: wrong completion list displayed with non-existing dir + fuzzy completion
Problem:  wrong completion list displayed with non-existing dir + fuzzy
          completion (kawarimidoll)
Solution: clear list of matches, if leader did not use fuzzy match
          (glepnir)

fixes: #15357
closes: #15365

Signed-off-by: glepnir <glephunter@gmail.com>
2024-07-27 16:25:45 +02:00
Ken Takata
f0ce176b5f
patch 9.1.0630: MS-Windows: build fails with VIMDLL and mzscheme
Problem:  MS-Windows: build fails with VIMDLL and mzscheme
Solution: define scheme_register_tls_space() inside gvim.exe
          and refer to it from the dll (Ken Takata).

`scheme_register_tls_space()` doesn't support a thread-local variable in
a DLL:
https://docs.racket-lang.org/inside/im_memoryalloc.html#%28cpp._scheme_register_tls_space%29

closes: #15363

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:25:34 +02:00
zeertzjq
4100852e09
patch 9.1.0629: Rename of pum hl_group is incomplete
Problem:  Rename of pum hl_group is incomplete in source.
Solution: Also rename the test function.  Rename to user_hlattr in code
          to avoid confusion with pum_extra.  Add test with matched text
          highlighting (zeertzjq).

closes: #15348

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:21:49 +02:00
Ken Takata
f08865ce83
patch 9.1.0628: MinGW: coverage files are not cleaned up
Problem:  MinGW: coverage files are not cleaned up
Solution: Adjust clean rule to remove the coverage files
          (Ken Takata)

closes: #15361

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:16:43 +02:00
Ken Takata
e4486bad10
patch 9.1.0627: MinGW: build-error when COVERAGE is enabled
Problem:  MinGW: build-error when COVERAGE is enabled
          (after v9.1.0621)
Solution: Fix regressions in v9.1.0621 and v9.1.0622
          (Ken Takata)

* Fix build error when COVERAGE=yes.
* Fix if_lua with USE_GC_SECTIONS=yes.

related: #15361

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:16:38 +02:00
Ernie Rael
94082b60d5
patch 9.1.0626: Vim9: need more tests with null objects
Problem:  Vim9: need more tests with null objects
          (after v9.1.0620)
Solution: add one more test with null_object
          (Ernie Rael)

closes: #15360

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:40:29 +02:00
Christian Brabandt
6ed8ae837b
patch 9.1.0625: tests: test output all translated messages for all translations
Problem:  tests: test output all translated messages for all
          translations
Solution: Redirect the output of check.vim to /dev/null, it's not that
          useful.

closes: #15354

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:21:03 +02:00
Christian Brabandt
70a11a6bf6
patch 9.1.0624: ex command modifiers not found
Problem:  ex command modifiers are not found
          (Ingo Karkat, after v9.1.0352)
Solution: partly revert patch v9.1.0352, ignore :{ and :}
          when expanding ex commands

The issue is, that the :keepmarks command can be abbreviated to :kee or
:keep or :keepm but not to e.g. :ke (because that would be the :exe
command :k with register e).

This basically means, we need `:kee` sorted before `:keepalt` but at the
same time `:keepmarks` sorted after the `:keepalt` command in the
cmdmod_info_tab table. Due to this, the binary search may not work
correctly, so let's revert that part of patch v9.1.0352.

fixes: #15305
closes: #15336

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:13:55 +02:00
Ken Takata
325420ebe4
patch 9.1.0623: Mingw: errors when trying to delete non-existing files
Problem:  Mingw: warnings when trying to delete non-existing files
Solution: Use "rm -f" instead of "rm" to suppress errors for
          non-existing files (Ken Takata)

closes: #15350

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:07:48 +02:00
Ken Takata
032accd98b
patch 9.1.0622: MS-Windows: mingw-build can be optimized
Problem:  MS-Windows: mingw-build can be optimized
Solution: use --gc-sections to reduce the size of the executable
          (Ken Takata)

Use the --gc-sections linker option and the -ffunction-sections compiler
option to reduce the size of the executable files.  To make these work,
the -fno-asynchronous-unwind-tables compiler option is also needed.

This is enabled by default and can be disabled by `USE_GC_SECTIONS=no`.

Note: A similar feature has been already used in MSVC. (The /OPT linker
option.)

related: #15350

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:07:41 +02:00
Ken Takata
b32d0a479d
patch 9.1.0621: MS-Windows: startup code can be improved
Problem:  MS-Windows: startup code can be improved
Solution: Re-work and optimize win32 startup code
          (Ken Takata)

* Revise the code and reduce #ifdefs.
* For VIMDLL, stop using the default CRT startup code to reduce the file
  size.
  The file size becomes ~130 KB -> ~34 KB on MSVC.
* Update comments. Make them consistent between os_w32dll.c and
  os_w32exe.c.

closes: #15352

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 18:46:54 +02:00
Ernie Rael
be82825687
patch 9.1.0620: Vim9: segfauls with null objects
Problem:  Vim9: segfauls with null objects
          (after v9.1.0219)
Solution: Check object pointer being NULL
          (Ernie Rael)

fixes: #15338
closes: #15349

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 18:39:52 +02:00
glepnir
8754efe437
patch 9.1.0619: tests: test_popup fails
Problem:  tests: test_popup fails
          (after v9.1.0618)
Solution: Correct test, move combining extra attributes to
          pum_compute_text_attrs() (glepnir)

closes: #15353

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 18:15:27 +02:00
glepnir
508e7856ec
patch 9.1.0618: cannot mark deprecated attributes in completion menu
Problem:  cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
          (glepnir)

closes: #15314

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 21:39:08 +02:00
Luuk van Baal
dc373d456b
patch 9.1.0617: Cursor moves beyond first line of folded end of buffer
Problem:  Cursor moves beyond start of a folded range at the end of a buffer.
Solution: Move cursor to start of fold when going beyond end of buffer.
          Check that cursor moved to detect FAIL in outer cursor function.
          (Luuk van Baal)

closes: #15344

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 21:24:32 +02:00
Ken Takata
eb4b903c9b
patch 9.1.0616: filetype: Make syntax highlighting off for MS Makefiles
Problem:  filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
          (Ken Takata)

Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
2979cfc262/src/Make_mvc.mak (L1331)

Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.

Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test

closes: #15341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ken Takata <kentkt@csc.jp>
2024-07-25 21:16:37 +02:00
zeertzjq
242667ae14
patch 9.1.0615: Unnecessary STRLEN() in make_percent_swname()
Problem:  Unnecessary STRLEN() in make_percent_swname()
Solution: Pass the end of "dir" to make_percent_swname()
          (zeertzjq)

closes: #15340

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 20:58:42 +02:00
Doug Kearns
377a085ea3
patch 9.1.0614: tests: screendump tests fail due to recent syntax changes
Problem:  Vim syntax file changes to :set command highlighting render
          some test dump files invalid.
          (zeertzjq, after commit ddbb6fe)
Solution: Regenerate the affected dump files (Doug Kearns)

closes: #15342

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 20:43:50 +02:00
Christian Brabandt
2979cfc262
patch 9.1.0613: tests: termdebug test may fail and leave file around
Problem:  tests: termdebug test may fail and leave temp file around
          (Dominique Pellé)
Solution: only run balloon_show() if the function exists, validate
          termdebug is running using the g: termdebug_is_running var,
          use defer to delete temporary files

fixes: #15334

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 21:41:55 +02:00
カワリミ人形
df77c8ad39
patch 9.1.0612: filetype: deno.lock file not recognized
Problem:  filetype: deno.lock file not recognized
Solution: detect 'deno.lock' as json filetype
          (カワリミ人形)

Reference:
https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files

closes: #15333

Signed-off-by: カワリミ人形 <kawarimidoll+git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:10:58 +02:00
Oleg Goncharov
56904f90d1
patch 9.1.0611: ambiguous mappings not correctly resolved with modifyOtherKeys
Problem:  ambiguous mappings not correctly resolved with modifyOtherKeys
Solution: Check for termcode when an upper case mapping is received and
          does not match (Oleg Goncharov)

Fix for mapping processing when capital leters are represented with terminal codes.

Problem: there are two mappings and
1) the first mapping is substring of the second,
2) the first non-matching letter is capital,
3) capital letters are represented with termcodes "ESC[27;2;<ascii code>~" in given system
then first mapping is applied instead of second.

Example:

    :map B b
    :map BBB blimp!

and then

    BBB -> bbb

instead of

    BBB -> blimp!

Solution: force termcodes check if capital letter does not match.

closes: #15251

Signed-off-by: Oleg Goncharov <goncharovoi@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-23 20:42:02 +02:00
Gregory Anders
e4b991ed36
patch 9.1.0610: filetype: OpenGL Shading Language files are not detected
Problem:  filetype: OpenGL Shading Language files are not detected
Solution: detect various file extensions as GLSL filetype, include
          indent and syntax script, do no longer recognize '*.comp'
          as Mason filetype (Gregory Anders)

closes: #15317

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-22 20:33:48 +02:00
Shane Harper
4c3616d7a2
patch 9.1.0609: outdated comments in Makefile
Problem:  outdated comments in Makefile
Solution: update outdated comments, update rule for vimtags
          (Shane Harper)

related: commit b81109192f

Here are the changes and the reasons for them:

- Delete the comment preceding the assignment to VIMPROG. Since b81109192f
  there's no need for VIMPROG to be set to something else when this is executed
  from src/Makefile. (The comment was wrong anyway; VIMPROG was being set to
  "$$BUILD_DIR/$(VIMTARGET)".)

```
    # Set to $(VIMTARGET) when executed from src/Makefile.
     VIMPROG = ../../src/vim
```

- Delete "`and installed`" in the following comment; The vimtags rule doesn't
  require that Vim has been installed.

```
    # Use Vim to generate the tags file.  Can only be used when Vim has been
    # compiled and installed.  Supports multiple languages.
    vimtags: $(DOCS)
```

- With commit b81109192f there is no longer a need to set VIMPROG here:

```
       -@BUILD_DIR="`pwd`"; cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
               $(MAKE) VIMPROG="$$BUILD_DIR/$(VIMTARGET)" vimtags; fi
```

The new code below will use the same vim executable as the old code:
```
       -@cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
               $(MAKE) vimtags; fi
```

- Delete the following comment which was related to setting VIMPROG as it no longer has any value:
```
       # We can assume Vim was build, but it may not have been installed,
       # thus use the executable in the current directory.
```
Note: this comment used to be (unnecessarily) echoed to the terminal (because
      it was indented) when making installrtbase.

closes: #15320

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-22 20:09:26 +02:00