]> git.ipfire.org Git - thirdparty/vim.git/log
thirdparty/vim.git
21 months agoruntime(racket): undo some indent options only when vim9script is available (#13935)
D. Ben Knoble [Tue, 30 Jan 2024 22:32:59 +0000 (17:32 -0500)] 
runtime(racket): undo some indent options only when vim9script is available (#13935)

This copies commit 64edf95 (indent: only reset some options when has
vim9, 2024-01-30) from https://github.com/benknoble/vim-racket.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): Update help for Wayland support
Christian Brabandt [Tue, 30 Jan 2024 19:41:07 +0000 (20:41 +0100)] 
runtime(doc): Update help for Wayland support

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0065: Segfault with CompleteChanged autocommand v9.1.0065
Christian Brabandt [Mon, 29 Jan 2024 20:46:58 +0000 (21:46 +0100)] 
patch 9.1.0065: Segfault with CompleteChanged autocommand

Problem:  Segfault with CompleteChanged autocommand
          (markonm )
Solution: Test match->cp_prev for being NULL before accessing it

closes: #13929

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0064: No Wayland support v9.1.0064
lilydjwg [Mon, 29 Jan 2024 19:54:28 +0000 (20:54 +0100)] 
patch 9.1.0064: No Wayland support

Problem:  No Wayland support
Solution: Add Wayland UI support
          (lilydjwg)

closes: #9639

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0063: GTK code can be improved v9.1.0063
lilydjwg [Mon, 29 Jan 2024 19:14:01 +0000 (20:14 +0100)] 
patch 9.1.0063: GTK code can be improved

Problem:  GTK code can be improved
Solution: Improve GTK code for initial Wayland support
          (lilydjwg)

related: #9639

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines v9.1.0062
zeertzjq [Mon, 29 Jan 2024 18:32:39 +0000 (19:32 +0100)] 
patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines

Problem:  Internal error when :luado/perldo/pydo etc delete lines
Solution: Test that the line is still valid line number
          (zeertzjq)

closes: #13931

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0061: UX of visual highlighting can be improved v9.1.0061
Christian Brabandt [Sun, 28 Jan 2024 22:33:29 +0000 (23:33 +0100)] 
patch 9.1.0061: UX of visual highlighting can be improved

Problem:  UX of visual highlighting can be improved
Solution: Improve readibility of visual highlighting,
          by setting better foreground and background
          colors

The default visual highlighting currently is nice in that it overlays
the actual syntax highlighting by using a separate distinct background
color.

However, this can cause hard to read text, because the contrast
between the actual syntax element and the background color is way too
low. That is an issue, that has been bothering colorschemes authors for
quite some time so much, that they are defining the Visual highlighting
group to use a separate foreground and background color, so that the
syntax highlighting vanishes, but the text remains readable (ref:
vim/colorschemes#250)

So this is an attempt to perform the same fix for the default Visual
highlighting and just use a default foreground and background color
instead of using reverse.

I also removed the hard-coded changes to the Visual highlighting in
init_highlight. It's not quite clear to me, why those were there and not
added directly to the highlighting_init_<dark|light> struct.

closes: #13663
related: vim/colorschemes#250

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(netrw): Use :exec norm! <leftmouse> before :call mapping in netrw (#12180)
user202729 [Sun, 28 Jan 2024 22:29:21 +0000 (05:29 +0700)] 
runtime(netrw): Use :exec norm! <leftmouse> before :call mapping in netrw (#12180)

fixes: #12143

Signed-off-by: user202729 <25191436+user202729@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0060: Recorded register cannot be translated using keytrans() v9.1.0060
zeertzjq [Sun, 28 Jan 2024 18:03:00 +0000 (19:03 +0100)] 
patch 9.1.0060: Recorded register cannot be translated using keytrans()

Problem:  Recorded register cannot be translated using keytrans() when
          it involves character search (iddqd505)
Solution: Record a K_IGNORE instead of a K_NOP (zeertzjq)

related: #13916
closes: #13925

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(vim): Highlight string interpolation
thinca [Sun, 28 Jan 2024 17:57:23 +0000 (18:57 +0100)] 
runtime(vim): Highlight string interpolation

closes: #13923

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(vim): Update syntax and ftplugin files (#13924)
dkearns [Sun, 28 Jan 2024 17:54:08 +0000 (04:54 +1100)] 
runtime(vim): Update syntax and ftplugin files (#13924)

Improve matching of line-continuations and interspersed comments.

These are now also matched in multiline syntax command patterns,
dictionary literals, and parenthesised expressions and argument lists.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(ant): Update syntax file (#13926)
dkearns [Sat, 27 Jan 2024 17:20:46 +0000 (04:20 +1100)] 
runtime(ant): Update syntax file (#13926)

Remove invalid display option from syn-keyword commands.

Take over maintenance of this file.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(hurl): add hurl filetype plugin(#13921)
Melker Ulander [Sat, 27 Jan 2024 10:26:14 +0000 (11:26 +0100)] 
runtime(hurl): add hurl filetype plugin(#13921)

Signed-off-by: Melker Ulander <melker.ulander@pm.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(vim): Update syntax file (#13919)
dkearns [Sat, 27 Jan 2024 10:24:45 +0000 (21:24 +1100)] 
runtime(vim): Update syntax file (#13919)

Add foreach() function.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): style fixes in vim9.txt (#13918)
h_east [Sat, 27 Jan 2024 10:22:28 +0000 (19:22 +0900)] 
runtime(doc): style fixes in vim9.txt (#13918)

Remove backticks and a few other style fixes

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0059: No event triggered before creating a window v9.1.0059
Sergey Vlasov [Thu, 25 Jan 2024 22:07:00 +0000 (23:07 +0100)] 
patch 9.1.0059: No event triggered before creating a window

Problem:  No event is triggered before creating a window.
          (Sergey Vlasov)
Solution: Add the WinNewPre event (Sergey Vlasov)

fixes: #10635
closes: #12761

Signed-off-by: Sergey Vlasov <sergey@vlasov.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0058: Cannot map Super Keys in GTK UI v9.1.0058
Casey Tucker [Thu, 25 Jan 2024 21:44:00 +0000 (22:44 +0100)] 
patch 9.1.0058: Cannot map Super Keys in GTK UI

Problem:  Cannot map Super Keys in GTK UI
          (Casey Tucker)
Solution: Enable Super Key mappings in GTK using <D-Key>
          (Casey Tucker)

As a developer who works in both Mac and Linux using the same keyboard,
it can be frustrating having to remember different key combinations or
having to rely on system utilities to remap keys.

This change allows `<D-z>` `<D-x>` `<D-c>` `<D-v>` etc. to be recognized
by the `map` commands, along with the `<D-S-...>` shifted variants.

```vimrc
if has('gui_gtk')
nnoremap  <D-z>    u
nnoremap  <D-S-Z>  <C-r>
vnoremap  <D-x>    "+d
vnoremap  <D-c>    "+y
cnoremap  <D-v>    <C-R>+
inoremap  <D-v>    <C-o>"+gP
nnoremap  <D-v>    "+P
vnoremap  <D-v>    "-d"+P
nnoremap  <D-s>    :w<CR>
inoremap  <D-s>    <C-o>:w<CR>
nnoremap  <D-w>    :q<CR>
nnoremap  <D-q>    :qa<CR>
nnoremap  <D-t>    :tabe<CR>
nnoremap  <D-S-T>  :vs#<CR><C-w>T
nnoremap  <D-a>    ggVG
vnoremap  <D-a>    <ESC>ggVG
inoremap  <D-a>    <ESC>ggVG
nnoremap  <D-f>    /
nnoremap  <D-g>    n
nnoremap  <D-S-G>  N
vnoremap  <D-x>    "+x
endif
```

closes: #12698

Signed-off-by: Casey Tucker <dctucker@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0057: MS-Windows: Key event test still fails v9.1.0057
Christian Brabandt [Thu, 25 Jan 2024 21:28:37 +0000 (22:28 +0100)] 
patch 9.1.0057: MS-Windows: Key event test still fails

Problem:  MS-Windows: Key event test still fails
Solution: Skip testing CTRL-C, since it causes an Interrupt
          which causes a test failure (after 9.1.0053)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0056: wrong number of trailing spaces inserted after blockwise put v9.1.0056
VanaIgr [Thu, 25 Jan 2024 20:50:41 +0000 (21:50 +0100)] 
patch 9.1.0056: wrong number of trailing spaces inserted after blockwise put

Problem:  Incorrect number of trailing spaces inserted for multibyte
  characters when pasting a blockwise register in blockwise visual
          mode (VanaIgr)
Solution: Skip over trailing UTF-8 bytes when computing the number of trailing
          spaces (VanaIgr)

When pasting in blockwise visual mode, and the register type is <CTRL-V>, Vim
aligns the text after the replaced area by inserting spaces after pasted
lines that are shorter than the longest line. When a shorter line contains
multibyte characters, each trailing UTF-8 byte's width is counted in addition
to the width of the character itself. Each trailing byte counts as being 4
cells wide (since it would be displayed as <xx>).

closes: #13909

Signed-off-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0055: formatting long lines is slow v9.1.0055
kawaii-Code [Thu, 25 Jan 2024 20:40:05 +0000 (21:40 +0100)] 
patch 9.1.0055: formatting long lines is slow

Problem:  formatting long lines is slow
          (kawaii-Code)
Solution: optimize gq (internal_format) for long
          lines (kawaii-Code)

Implemented two workarounds that significantly reduce
the amount of pointless calls. Ideally the algorithm
would be rewritten not to be n^2, but it's too complicated
with too many corner cases.

closes: #13914

Signed-off-by: kawaii-Code <nia.personal.0@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0054: 'linebreak' may still apply to leading whitespace v9.1.0054
zeertzjq [Thu, 25 Jan 2024 20:27:13 +0000 (21:27 +0100)] 
patch 9.1.0054: 'linebreak' may still apply to leading whitespace

Problem:  'linebreak' may still apply to leading whitespace
          (VanaIgr)
Solution: Compare pointers instead of virtual columns.
          (zeertzjq)

related: neovim/neovim#27180
closes: #13915

Co-authored-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0053: MS-Windows: Key event test still fails v9.1.0053
Christian Brabandt [Thu, 25 Jan 2024 20:23:22 +0000 (21:23 +0100)] 
patch 9.1.0053: MS-Windows: Key event test still fails

Problem:  MS-Windows: Key event test still fails
Solution: Catch more interrupts
          (after 9.1.0051)

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0052: Patch 9.1.0041 causes regressions for users v9.1.0052
Christian Brabandt [Thu, 25 Jan 2024 19:50:49 +0000 (20:50 +0100)] 
patch 9.1.0052: Patch 9.1.0041 causes regressions for users

Problem:  Patch 9.1.0041 causes regressions for users
          (Gleb Fotengauer-Malinovskiy)
Solution: Revert 9.1.0041 and restore old behaviour

Revert "patch 9.1.0041: xxd -i may generate incorrect C statements"

This reverts commit 7062be13129985fe297b9a8e59c57b8f0db61b8f.

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0051: MS-Windows: Key event test fail v9.1.0051
Christian Brabandt [Thu, 25 Jan 2024 19:44:49 +0000 (20:44 +0100)] 
patch 9.1.0051: MS-Windows: Key event test fail

Problem:  MS-Windows: Key event test fail
          (after 9.1.0050)
Solution: Catch Interrupt and return Ctrl-C

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(mail): fix #13913 (#13917)
gi1242 [Thu, 25 Jan 2024 18:52:47 +0000 (13:52 -0500)] 
runtime(mail): fix #13913 (#13917)

switch to the DFA engine for the emoji collaction range

Co-authored-by: GI <gi1242+vim@gmail.com>
Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(netrw): Don't change global options (#13910)
K.Takata [Wed, 24 Jan 2024 19:10:19 +0000 (04:10 +0900)] 
runtime(netrw): Don't change global options (#13910)

Originally reported at: https://github.com/vim-jp/issues/issues/1428
'isk' was unintentionally changed by netrw, regression
introduced in Commit: 71badf9547e8f89571b9a095183671cbb333d528

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(fortran): update syntax and documentation (#13912)
Ajit-Thakkar [Wed, 24 Jan 2024 19:08:34 +0000 (15:08 -0400)] 
runtime(fortran): update syntax and documentation (#13912)

* runtime (doc): update Fortran section
* runtime(syntax): Complete support for Fortran 2023.
   Minor improvements.

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0050: Win32 Keyboard handling is sub-optimal v9.1.0050
Anton Sharonov [Tue, 23 Jan 2024 22:19:02 +0000 (23:19 +0100)] 
patch 9.1.0050: Win32 Keyboard handling is sub-optimal

Problem:  Win32 Keyboard handling is sub-optimal and has
          many issues with international keyboards
          (risa2000) (after v8.2.4807)
Solution: soft-rollback the change, allow the user to select
          a suitable key-translation strategy
          (Anton Sharonov)

Read about the details in the help:
    :h w32-experimental-keycode-trans-strategy

fixes: #10615
fixes: #12595
closes: #12752

Signed-off-by: Anton Sharonov <anton.sharonov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0049: Make "[Command Line]" a special buffer name v9.1.0049
Sean Dewar [Wed, 16 Aug 2023 16:15:05 +0000 (17:15 +0100)] 
patch 9.1.0049: Make "[Command Line]" a special buffer name

Problem:  E95 is possible if a buffer called "[Command Line]" already
          exists when opening the cmdwin. This can also happen if the
          cmdwin's buffer could not be deleted when closing.

Solution: Un-name the cmdwin buffer, and give it a special name instead,
          similar to what's done for quickfix buffers and for unnamed
          prompt and scratch buffers. As a result, BufFilePre/Post are
          no longer fired when opening the cmdwin. Add a "command" key
          to the dictionary returned by getbufinfo() to differentiate
          the cmdwin buffer instead. (Sean Dewar)

NOTE: This is technically a breaking change... maybe this needs a different
solution? (Or maybe this issue can be ignored...)

A GitHub search reveals some plugins expect the old behaviour. However, many of
those plugins also do not seem to account for the string being translated, so
they are subtly broken anyway (not withstanding the fact that you can call any
old buffer "[Command Line]" too...)

closes: #12819

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0048: Abort opening cmdwin if autocmds screw things up v9.1.0048
Sean Dewar [Wed, 16 Aug 2023 15:17:31 +0000 (16:17 +0100)] 
patch 9.1.0048: Abort opening cmdwin if autocmds screw things up

Problem:  Autocmds triggered from opening the cmdwin (in win_split and
          do_ecmd) can cause issues such as E199, as the current checks
          are insufficient.

Solution: Commands executed from the cmdwin apply to the old curwin/buf,
          so they should be kept in a "suspended" state; abort if
          they've changed. Also abort if cmdwin/buf was tampered with,
          and check that curwin is correct. Try to clean up the cmdwin
          buffer (only if hidden and non-current to simplify things; the
          same approach is used when closing cmdwin normally), and add a
          beep. (Sean Dewar)

It'd be nice to also check that curwin was *really* created by win_split, as
autocommands can change curwin before it returns (so it can't be assumed to be
that of the split); for now, this means that the cmdwin may not be the botwin in
that case, which is probably OK.

closes: #12819

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0047: issues with temp curwin/buf while cmdwin is open v9.1.0047
Sean Dewar [Wed, 16 Aug 2023 13:17:36 +0000 (14:17 +0100)] 
patch 9.1.0047: issues with temp curwin/buf while cmdwin is open

Problem:  Things that temporarily change/restore curwin/buf (e.g:
          win_execute, some autocmds) may break assumptions that
          curwin/buf is the cmdwin when "cmdwin_type != 0", causing
          issues.

Solution: Expose the cmdwin's real win/buf and check that instead. Also
          try to ensure these variables are NULL if "cmdwin_type == 0",
          allowing them to be used directly in most cases without
          checking cmdwin_type. (Sean Dewar)

Alternatively, we could ban win_execute in the cmdwin and audit all places that
temporarily change/restore curwin/buf, but I didn't notice any problems arising
from allowing this (standard cmdwin restrictions still apply, so things that may
actually break the cmdwin are still forbidden).

closes: #12819

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: regenerate helptags to fix CI job
Christian Brabandt [Tue, 23 Jan 2024 21:29:47 +0000 (22:29 +0100)] 
CI: regenerate helptags to fix CI job

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(c): Highlight user defined functions
Luca Saccarola [Sun, 24 Dec 2023 17:57:02 +0000 (18:57 +0100)] 
runtime(c): Highlight user defined functions

closes: #13763

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0046: :drop does not re-use empty buffer v9.1.0046
Rocco Mao [Tue, 23 Jan 2024 20:27:19 +0000 (21:27 +0100)] 
patch 9.1.0046: :drop does not re-use empty buffer

Problem:  :drop does not re-use empty buffer
          (Rocco Mao)
Solution: Make :drop re-use an empty buffer
          (Rocco Mao)

fixes: #13851
closes: #13881

Signed-off-by: Rocco Mao <dapeng.mao@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0045: --remote-* does not ignore `wilidignore` v9.1.0045
Christian Brabandt [Tue, 23 Jan 2024 20:13:58 +0000 (21:13 +0100)] 
patch 9.1.0045: --remote-* does not ignore `wilidignore`

Problem:  --remote-silent applies the wildignore option
          to each argument, which may result in "E479: No match"
          (hebaronson)
Solution: temporarily reset 'wildignore' setting when building
          the :drop command

closes: #13835

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): change "VIsual mode" to "Visual mode" in :h SafeState (#13901)
zeertzjq [Tue, 23 Jan 2024 19:39:04 +0000 (03:39 +0800)] 
runtime(doc): change "VIsual mode" to "Visual mode" in :h SafeState (#13901)

"Visual mode" is used everywhere else in the help when not referring to
something in the source code.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agotranslation(hu): use correct encoding in header of hu po file (#13902)
Zoltan Arpadffy [Tue, 23 Jan 2024 19:38:07 +0000 (20:38 +0100)] 
translation(hu): use correct encoding in header of hu po file (#13902)

closes: #13900

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(vim): Update syntax file (#13906)
dkearns [Tue, 23 Jan 2024 19:34:28 +0000 (06:34 +1100)] 
runtime(vim): Update syntax file (#13906)

Highlight :2match and :3match and add these to :help ex-cmd-index.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(qml): Use shiftwidth() in indent plugin (#13908)
dkearns [Tue, 23 Jan 2024 19:33:32 +0000 (06:33 +1100)] 
runtime(qml): Use shiftwidth() in indent plugin (#13908)

Fixes #13907

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agotranslation(it): Update Italian translation
Antonio Giovanni Colombo [Tue, 23 Jan 2024 18:51:05 +0000 (19:51 +0100)] 
translation(it): Update Italian translation

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(mail): updated syntax file
GI [Tue, 23 Jan 2024 18:46:30 +0000 (19:46 +0100)] 
runtime(mail): updated syntax file

Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): improve doc makefiles, add clean rule (#13855)
Restorer [Mon, 22 Jan 2024 19:42:44 +0000 (22:42 +0300)] 
runtime(doc): improve doc makefiles, add clean rule (#13855)

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(lang): improve makefiles, add clean rule, fix typo (#13856)
Restorer [Mon, 22 Jan 2024 19:41:47 +0000 (22:41 +0300)] 
runtime(lang): improve makefiles, add clean rule, fix typo (#13856)

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0044: po Makefiles can be improved v9.1.0044
RestorerZ [Mon, 22 Jan 2024 19:28:12 +0000 (20:28 +0100)] 
patch 9.1.0044: po Makefiles can be improved

Problem:  po Makefiles can be improved
Solution: Improve the style of the Makefiles, update
          Makefile variables, update documentation
          (RestorerZ)

closes: #13858
closes: #13857

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(tutor): simplify tutor makefiles (#13859)
Restorer [Mon, 22 Jan 2024 19:25:43 +0000 (22:25 +0300)] 
runtime(tutor): simplify tutor makefiles (#13859)

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(sh): Add handling for ksh93 shared-state comsubs and mksh valsubs (#13884)
Johnothan King [Mon, 22 Jan 2024 19:19:54 +0000 (11:19 -0800)] 
runtime(sh): Add handling for ksh93 shared-state comsubs and mksh valsubs (#13884)

This commit adds support for ksh93 shared-state command
substitutions (syntax: ${ command; }) and mksh's value
substitutions (syntax: ${|command;}) in the sh syntax script.

Also add a syntax test for ksh subshares with dumps included
to make sure it doesn't regress.

fixes: #9514

Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0043: ml_get: invalid lnum when :s replaces visual selection v9.1.0043
Christian Brabandt [Mon, 22 Jan 2024 19:12:34 +0000 (20:12 +0100)] 
patch 9.1.0043: ml_get: invalid lnum when :s replaces visual selection

Problem:  ml_get: invalid lnum when :s replaces visual selection
          (@ropery)
Solution: substitute may decrement the number of lines in a buffer,
          so validate, that the bottom lines of the visual selection
          stays within the max buffer line

fixes: #13890
closes: #13892

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(chuck): include ChucK syntax file (#13895)
Andrea C from The App [Mon, 22 Jan 2024 19:10:42 +0000 (20:10 +0100)] 
runtime(chuck): include ChucK syntax file (#13895)

Co-authored-by: gacallea <gacallea@users.noreply.github.com>
Signed-off-by: gacallea <gacallea@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(go): update Go syntax file (#13896)
Billie Cleek [Mon, 22 Jan 2024 19:08:44 +0000 (11:08 -0800)] 
runtime(go): update Go syntax file (#13896)

Update the Go syntax file with some recent changes made to vim-go.

Signed-off-by: Billie Cleek <bhcleek@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: Bump actions/cache from 3 to 4 (#13897)
dependabot[bot] [Mon, 22 Jan 2024 19:06:01 +0000 (20:06 +0100)] 
CI: Bump actions/cache from 3 to 4 (#13897)

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0042: Missing test for Chuck Filetype v9.1.0042
Christian Brabandt [Sun, 21 Jan 2024 08:40:22 +0000 (09:40 +0100)] 
patch 9.1.0042: Missing test for Chuck Filetype

Problem:  Missing test for Chuck filetype
          after commit 27a4632af6753
          (Christian Clason)
Solution: Add a filetype test

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agotranslation(sr): Update Serbian messages translation (#13889)
Ivan PeÅ¡ić [Fri, 19 Jan 2024 22:31:39 +0000 (02:31 +0400)] 
translation(sr): Update Serbian messages translation (#13889)

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(filetype): detect *.ck files as Chuck filetype (#13888)
Christian Brabandt [Fri, 19 Jan 2024 22:30:34 +0000 (22:30 +0000)] 
runtime(filetype): detect *.ck files as Chuck filetype (#13888)

closes #13886

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0041: xxd -i may generate incorrect C statements v9.1.0041
Kuratius [Wed, 17 Jan 2024 17:37:32 +0000 (18:37 +0100)] 
patch 9.1.0041: xxd -i may generate incorrect C statements

Problem:  xxd -i may generate incorrect C statements
          (Kuratius)
Solution: xxd: Make size type returned by -i option compatible
          with C standard by using type size_t instead of
          unsigned int (Kuratius)

Also change affected tests to now correctly expect size_t's

fixes: #13876
closes: #13880

Signed-off-by: Kuratius <Kuratius@gmx.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(man): man on AIX does not understand -l
Christian Brabandt [Wed, 17 Jan 2024 20:50:16 +0000 (21:50 +0100)] 
runtime(man): man on AIX does not understand -l

fixes: #13847

Co-authored-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords
James Eapen [Fri, 29 Dec 2023 16:51:40 +0000 (11:51 -0500)] 
runtime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords

See:
https://github.com/swaywm/sway/blob/0aceff74696f03d306dc9de5473d9ed7afb73f67/sway/sway.5.scd?plain=1#L680
`focus_follows_mouse yes|no|always`
https://github.com/swaywm/sway/blob/0aceff74696f03d306dc9de5473d9ed7afb73f67/sway/sway.5.scd?plain=1#L770

closes: #13797

Signed-off-by: James Eapen <james.eapen@vai.org><author>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(i3config): remove always from `focus_follows_mouse`
James Eapen [Fri, 29 Dec 2023 16:50:33 +0000 (11:50 -0500)] 
runtime(i3config): remove always from `focus_follows_mouse`

The always option does not exist in i3, only sway.

From https://i3wm.org/docs/userguide.html:
`focus_follows_mouse yes|no`

Version number incremented by 2 because the last commit did not
increment the version.

Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(netrw): minor changes to fix move cmd on windows (#13823)
MiguelBarro [Wed, 17 Jan 2024 20:35:36 +0000 (21:35 +0100)] 
runtime(netrw): minor changes to fix move cmd on windows (#13823)

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0040: issue with prompt buffer and hidden buffer v9.1.0040
zeertzjq [Wed, 17 Jan 2024 20:22:59 +0000 (21:22 +0100)] 
patch 9.1.0040: issue with prompt buffer and hidden buffer

Problem:  Modifying a hidden buffer still interferes with prompt buffer
          mode changes.
Solution: Save and restore b_prompt_insert.
          (zeertzjq)

closes: #13875

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Modifying hidden buffer still interferes with prompt buffer mode changes

21 months agopatch 9.1.0039: too vague errors for 'listchars'/'fillchars' v9.1.0039
zeertzjq [Wed, 17 Jan 2024 19:54:49 +0000 (20:54 +0100)] 
patch 9.1.0039: too vague errors for 'listchars'/'fillchars'

Problem:  too vague errors for 'listchars'/'fillchars'
Solution: Include the field name in error message.
          (zeertzjq)

related: neovim/neovim#27050
closes: #13877

Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0038: Unnecessary loop in getvcol() v9.1.0038
zeertzjq [Wed, 17 Jan 2024 19:52:13 +0000 (20:52 +0100)] 
patch 9.1.0038: Unnecessary loop in getvcol()

Problem:  Unnecessary loop in getvcol().
Solution: Compare next char position with pos->col directly.
          (zeertzjq)

The loop below already handles end of line before checking for posptr,
and the next char is after pos->col whether pos->col is at the start or
in the middle of the char in question, so neither the NUL check nor the
mb_head_off() are needed when comparing the position of the next char
with pos->col directly.

closes: #13878

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol v9.1.0037
zeertzjq [Wed, 17 Jan 2024 19:42:53 +0000 (20:42 +0100)] 
patch 9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol

Problem:  Calling get_breakindent_win() repeatedly when computing
          virtual column, and get_breakindent_win() does a STRCMP() on
          the whole line since patch 9.0.0016.
Solution: Cache the result, since the line doesn't change.
          (zeertzjq)

closes: #13879

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0036: MS-Windows: Warning about unused variable v9.1.0036
John Marriott [Wed, 17 Jan 2024 19:16:05 +0000 (20:16 +0100)] 
patch 9.1.0036: MS-Windows: Warning about unused variable

Problem:  MS-Windows: Warning about unused variable
          (after 9.1.0030, John Marriott)
Solution: Adjust #ifdef and test for HAVE_TGETENT
          (John Marriott)

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(odin): include ftplugin, syntax and indent script (#13867)
Maxim Kim [Tue, 16 Jan 2024 16:33:51 +0000 (03:33 +1100)] 
runtime(odin): include ftplugin, syntax and indent script (#13867)

Note for Neovim Contributors: this is bundled as Vim9 Script. If you want to use this on Neovim, you need to convert the Vim9 scripts to Vim Script or Lua or leave it out.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0035: i_CTRL-] triggers InsertCharPre v9.1.0035
altermo [Tue, 16 Jan 2024 16:25:17 +0000 (17:25 +0100)] 
patch 9.1.0035: i_CTRL-] triggers InsertCharPre

Problem:  i_CTRL-] triggers InsertCharPre
Solution: Return if CTRL-] is received. InsertCharPre
          is supposed to be only used for chars to be inserted
          but i_CTRL-] triggers expansion and is not inserted
          into the buffer (altermo)

closes: #13853
closes: #13864

Signed-off-by: altermo
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0034: Window scrolls unexpectedly when 'scrollbind' is set v9.1.0034
Christian Brabandt [Tue, 16 Jan 2024 16:22:38 +0000 (17:22 +0100)] 
patch 9.1.0034: Window scrolls unexpectedly when 'scrollbind' is set

Problem:  Window may unexpectedly scroll when 'scrollbind' is set
          and setting a buffer-local option using setbufvar()
          (Boris Staletic)
Solution: Save and restore the windows topline before opening the
          popup window.

fixes: #13863
closes: #13869

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden... v9.1.0033
zeertzjq [Tue, 16 Jan 2024 16:19:59 +0000 (17:19 +0100)] 
patch 9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden buffer

Problem:  Insert mode not stopped if an autocommand modifies a hidden
          buffer while closing a prompt buffer.
Solution: Don't set b_prompt_insert if stop_insert_mode is already set.
          (zeertzjq)

closes: #13872

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0032: MS-Windows installer misses keymaps v9.1.0032
Ken Takata [Tue, 16 Jan 2024 16:14:29 +0000 (17:14 +0100)] 
patch 9.1.0032: MS-Windows installer misses keymaps

Problem:  MS-Windows installer misses keymaps
          (Maxim Kim)
Solution: Include keymaps in the installer archive
          (Ken Takata)

fixes: vim/vim-win32-installer#331
closes: #13871

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0031: Link Error on Windows v9.1.0031
Christian Brabandt [Mon, 15 Jan 2024 21:51:22 +0000 (22:51 +0100)] 
patch 9.1.0031: Link Error on Windows

Problem:  Link Error on Windows
Solution: Add ifdef HAVE_TGETENT for term_strings_not_set()

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(fortran): update fortran syntax (#13870)
Ajit-Thakkar [Mon, 15 Jan 2024 21:42:03 +0000 (17:42 -0400)] 
runtime(fortran): update fortran syntax (#13870)

Support most remaining features of Fortran 2018/2023
Small improvements to folding etc,
Code cleanup: use \? instead of mix of \= and \?

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: regenerate helptags, fix ci help tags job failing
Christian Brabandt [Mon, 15 Jan 2024 21:38:48 +0000 (22:38 +0100)] 
CI: regenerate helptags, fix ci help tags job failing

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0030: Cannot use terminal alternate font v9.1.0030
PMunch [Wed, 15 Nov 2023 14:35:49 +0000 (15:35 +0100)] 
patch 9.1.0030: Cannot use terminal alternate font

Problem:  Cannot use terminal alternate fonts (PMunch)
Solution: Support terminal alternate fonts using
          CSI SGR 10-20 and t_CF code (PMunch)

Add support for alternate font highlighting

This adds support for alternate font highlighting using CSI SGR 10-20.
Few terminals currently support this, but with added tool support this
should improve over time. The change here is more or less taken from how
colors are configured and applied, but there might be some parts I
missed while implementing it. Changing fonts is done through the new
`:hi ctermfont` attribute which takes a number, 0 is the normal font, and
the numbers 1-9 select an "alternative" font. Which fonts are in use is
up to the terminal.

fixes: #13513
closes: #13537

Signed-off-by: PMunch <peterme@peterme.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(doc): Replace non-breaking space with normal space (#13868)
Yegappan Lakshmanan [Mon, 15 Jan 2024 19:08:25 +0000 (11:08 -0800)] 
runtime(doc): Replace non-breaking space with normal space (#13868)

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Doug Kearns [Sun, 14 Jan 2024 19:59:02 +0000 (20:59 +0100)] 
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"

Problem:  The "*.*" browsefilter pattern only matches all files on
  Windows (Daryl Lee)
Solution: Use "*" to filter on all platforms but keep "*.*" as the label
  text on Windows. (Fixes #12685, Doug Kearns)

The *.* browsefilter pattern used to match "All Files" on Windows is a
legacy of the DOS 8.3 filename wildcard matching algorithm.  For reasons
of backward compatibility this still works on Windows to match all
files, even those without an extension.

However, this pattern only matches filenames containing a dot on other
platforms.  This often makes files without an extension difficult to
access from the file dialog, e.g., "Makefile"

On Windows it is still standard practice to use "*.*" for the filter
label so ftplugins should use "All Files (*.*)" on Windows and "All
Files (*)" on other platforms.  This matches Vim's default browsefilter
values.

This commit also normalises the browsefilter conditional test to check
for the Win32 and GTK GUI features and an unset b:browsefilter.

closes: #12759

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0029: Cannot act on various terminal response codes v9.1.0029
Danek Duvall [Sun, 14 Jan 2024 19:19:59 +0000 (20:19 +0100)] 
patch 9.1.0029: Cannot act on various terminal response codes

Problem:  Cannot act on various terminal response codes
Solution: Add the TerminalResponseAll autocommand
          (Danek Duvall)

closes: #13829

Signed-off-by: Danek Duvall <duvall@comfychair.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0028: win32: Ctrl-D cannot be used to close a pipe v9.1.0028
GuyBrush [Sun, 14 Jan 2024 19:08:40 +0000 (20:08 +0100)] 
patch 9.1.0028: win32: Ctrl-D cannot be used to close a pipe

Problem:  win32: Ctrl-D cannot be used to close a pipe
Solution: Properly detect Ctrl-D when reading from a pipe
          (GuyBrush)

Enabling Ctrl-D for gvim pipeline input
and apply defensive programming on account of PR #12752
so that once PR 12752 is merged, CTRL-D will keep on working

closes: #13849

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoCI: Check help tags for errors (duplicates, missing, etc) (#13865)
Christian Brabandt [Sun, 14 Jan 2024 18:24:05 +0000 (18:24 +0000)] 
CI: Check help tags for errors (duplicates, missing, etc) (#13865)

- Run the doc make html awk script, which also checks, that all
  referenced help tags exists.
- Run the doc maketags awk script, which checks for duplicates
- in case of any error in the previous two steps, exit the CI with
  an error and show the errors.log file, that is generated by the
  previous 2 steps

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(help): delete duplicate help tag E741 (#13861)
errael [Sun, 14 Jan 2024 18:11:07 +0000 (10:11 -0800)] 
runtime(help): delete duplicate help tag E741 (#13861)

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0027: Vim is missing a foreach() func v9.1.0027
Ernie Rael [Sat, 13 Jan 2024 10:47:33 +0000 (11:47 +0100)] 
patch 9.1.0027: Vim is missing a foreach() func

Problem:  Vim is missing a foreach() func
Solution: Implement foreach({expr1}, {expr2}) function,
          which applies {expr2} for each item in {expr1}
          without changing it (Ernie Rael)

closes: #12166

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0026: win32: Windows default font lacking v9.1.0026
Ken Takata [Fri, 12 Jan 2024 17:09:43 +0000 (18:09 +0100)] 
patch 9.1.0026: win32: Windows default font lacking

Problem:  win32: Windows default font lacking (@clach04)
Solution: Improve default font (Ken Takata)

win32: Improve default font

Currently, Fixedsys is the default font on Windows.
It is not suitable for recent High DPI environments.

* Change the default font to Consolas.
* Allow to change the default font by the translation message. E.g.:
  ```
  msgid "DefaultFontNameForWindows"
  msgstr "Courier New"
  ```

fixes: #12919
closes: #13266

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0025: A few typos in tests and justify.vim v9.1.0025
dundargoc [Fri, 12 Jan 2024 17:02:10 +0000 (18:02 +0100)] 
patch 9.1.0025: A few typos in tests and justify.vim

Problem:  A few typos in tests and justify.vim
Solution: fix them

closes: #13848

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0024: z/OS (MVS) support can be improved v9.1.0024
Igor Todorovski [Fri, 12 Jan 2024 16:59:18 +0000 (17:59 +0100)] 
patch 9.1.0024: z/OS (MVS) support can be improved

Problem:  z/OS (MVS) support can be improved
Solution: set UTF-8 as the default encoding for z/OS

closes: #13821

Signed-off-by: Igor Todorovski <itodorov@ca.ibm.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0023: xxd: few problems with EBCDIC for z/OS (MVS) v9.1.0023
Igor Todorovski [Tue, 9 Jan 2024 21:05:48 +0000 (21:05 +0000)] 
patch 9.1.0023: xxd: few problems with EBCDIC for z/OS (MVS)

Problem:  xxd: few problems with EBCDIC for z/OS (MVS)
Solution: Fix xxd build and support ASCII and UTF-8 on z/OS (MVS)
          natively, add MVS guard checks with __CHARSET_LIB,
          support $LIBS in the Makefile
          (Igor Todorovski)

related: #13821

Signed-off-by: Igor Todorovski <itodorov@ca.ibm.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0022: Coverity complains about improper use of negative value v9.1.0022
Christian Brabandt [Fri, 12 Jan 2024 16:48:08 +0000 (17:48 +0100)] 
patch 9.1.0022: Coverity complains about improper use of negative value

Problem:  Coverity complains about improper use of negative value
Solution: Add a condition to validate that keytyped is larger or equal
          to 0

Apparently patch 9.1.0006 made it more explicit for Coverity, that the
TOLOWER_LOC() macros do not handle negative values properly. However,
that condition has always been there even before that, so add a
condition to verify that keytyped is indeed at least 0

closes: #13824

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0021: i_CTRL-R- doesn't work for multibyte chars in Replace mode v9.1.0021
zeertzjq [Fri, 12 Jan 2024 16:43:05 +0000 (17:43 +0100)] 
patch 9.1.0021: i_CTRL-R- doesn't work for multibyte chars in Replace mode

Problem:  i_CTRL-R- doesn't work for multibyte chars in Replace mode,
          Coverity complains missing return value for u_save_cursor()
Solution: Use mb_charlen() and del_chars() instead, handle failure mode
          for u_save_cursor() correctly (@zeertzjq)

closes: #13846

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0020: Vim9: cannot compile all methods in a class v9.1.0020
Yegappan Lakshmanan [Fri, 12 Jan 2024 16:36:40 +0000 (17:36 +0100)] 
patch 9.1.0020: Vim9: cannot compile all methods in a class

Problem:  Vim9: cannot compile all methods in a class
Solution: Support compiling all the methods in a class using :defcompile
          (Yegappan Lakshmanan)

closes: #13844

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0019: cmdline may disappear when changing 'cmdheight' v9.1.0019
Christian Brabandt [Fri, 12 Jan 2024 16:34:40 +0000 (17:34 +0100)] 
patch 9.1.0019: cmdline may disappear when changing 'cmdheight'

Problem:  cmdline may disappear when changing 'cmdheight'
          (after Patch 9.0.0190, @markonm)
Solution: always re-calculate the old_p_ch value, not only
          when cmdline_row was higher than expected

fixes: #13822
closes: #13826

Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0018: use of #if instead of #ifdef v9.1.0018
Ken Takata [Fri, 12 Jan 2024 16:31:07 +0000 (17:31 +0100)] 
patch 9.1.0018: use of #if instead of #ifdef

Problem:  use of #if instead of #ifdef
Solution: use correct form of #ifdef

`#if FEAT_GUI_HAIKU` was used mistakenly. Use the correct form
`#ifdef FEAT_GUI_HAIKU` instead.

closes: #13843

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agoruntime(netrw): Decode multibyte percent-encoding filename correctly (#13842)
K.Takata [Fri, 12 Jan 2024 16:30:01 +0000 (01:30 +0900)] 
runtime(netrw): Decode multibyte percent-encoding filename correctly (#13842)

Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.

Close #13787

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 months agopatch 9.1.0017: [security]: use-after-free in eval1_emsg() v9.1.0017
Yegappan Lakshmanan [Fri, 12 Jan 2024 16:21:55 +0000 (17:21 +0100)] 
patch 9.1.0017: [security]: use-after-free in eval1_emsg()

Problem:  use-after-free in eval1_emsg() when an empty
          line follows a lambda (by @yu3s)
Solution: only set evalarg->eval_using_cmdline = FALSE when
          the *arg pointer is not null

fixes: #13833
closes: #13841

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(netrw): Sync with netrw 174b (#13836)
K.Takata [Tue, 9 Jan 2024 18:21:05 +0000 (03:21 +0900)] 
runtime(netrw): Sync with netrw 174b (#13836)

* Import netrw v174b
* Revert unwanted changes
* Fix indent
* Revert some changes
* Update tags
* Break long line

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(colorschemes): Add initial support for Added/Removed/Changed highlight groups...
Maxim Kim [Mon, 8 Jan 2024 19:14:04 +0000 (06:14 +1100)] 
runtime(colorschemes): Add initial support for Added/Removed/Changed highlight groups (#13830)

For some of the colorschemes where diffAdded and diffRemoved were explicitly set up.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(tar): fix a few problems with the tar plugin
Christian Brabandt [Mon, 8 Jan 2024 19:02:14 +0000 (20:02 +0100)] 
runtime(tar): fix a few problems with the tar plugin

From: #138331:
  - Updating .tar.zst files was broken. Fixes #12639.
  - Extracting files from .tar.zst / .tzs files was also broken and
    works now.
From: #12637:
  - Fixes variable assignment and typo
From: #8109:
  - Rename .tzs to the more standard .tzst

fixes: #12639
fixes: #8105
closes: #8109
closes: #12637
closes: #13831

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(vim): accept dot in completionList for Vim9 syntax (#13832)
Maxim Kim [Mon, 8 Jan 2024 18:42:02 +0000 (05:42 +1100)] 
runtime(vim): accept dot in completionList for Vim9 syntax (#13832)

if you have autoloaded command complete function in vim9script, it shouldn't be highlighted as Error:

```
import autoload "share.vim"
command! -range=% -nargs=? -complete=custom,share.Complete Share share.Paste(<q-args>, <line1>, <line2>)
```

`share.Complete` is a valid complete function.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.1.0016: default diff highlighting is too noisy v9.1.0016
Romain Lafourcade [Sun, 7 Jan 2024 14:08:31 +0000 (15:08 +0100)] 
patch 9.1.0016: default diff highlighting is too noisy

Problem:  default diff highlighting is too noisy
Solution: Link diff highlighting groups to new
          Added/Removed/Changed, revert previous change
          (Romain Lafourcade)

Remove diff* links added in #13776 and doc added in commit b1392be

The links added in #13776 are way too noisy for the contexts in which
the `diff` syntax is applied (git commits, patches, etc.).

This commit:

- removes those links
- adds new default highlighting groups Added, Changed and
  Removed
- links the diff highlighting groups to those new defaults
- removes the doc changes
- adjusts the syntax_completion test for those newly added group
  names

Note: Changes to the default color schemes will be handled separately,
by adding links to those newly created Added/Removed/Changed
highlighting groups.

related: #13776
closes #13825

Signed-off-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agoruntime(doc): Improve the documentation for Vim9 classes (#13828)
Aliaksei Budavei [Sun, 7 Jan 2024 14:52:10 +0000 (17:52 +0300)] 
runtime(doc): Improve the documentation for Vim9 classes (#13828)

* Emend textual typos
* Emend syntactic errors in examples
* Acknowledge no support for abstract static methods
* Acknowledge the non-ubiquity of instance qualification

"This" was never allowed in method declarations, e.g.:
    class A
        def this.M()
        enddef
    endclass

and, since patch 9.0.2167, "this" can no longer be used in field
declarations, e.g.:
    class B
        var this.f: string
    endclass

* Recognise abstract child classes
* Reword an ambiguous turn of phrase

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.1.0015: i_CTRL-R- no longer works in replace mode v9.1.0015
Christian Brabandt [Fri, 5 Jan 2024 17:19:52 +0000 (18:19 +0100)] 
patch 9.1.0015: i_CTRL-R- no longer works in replace mode

Problem:  i_CTRL-R- no longer works in replace mode
Solution: delete characters in replace mode before putting, add a test,
          add a bit warning into the documentation, that i_CTRL-R-P/O
          is not supported in Replace mode for now

fixes: #13792
closes: #13816

Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.1.0014: incorrect use of W_WINROW in edit.c v9.1.0014
zeertzjq [Fri, 5 Jan 2024 17:11:43 +0000 (18:11 +0100)] 
patch 9.1.0014: incorrect use of W_WINROW in edit.c

Problem:  incorrect use of W_WINROW in edit.c
Solution: compare against curwin->w_height instead

Remove incorrect use of W_WINROW

In structs.h it is mentioned that w_wrow is relative to w_winrow, so
using W_WINROW doesn't make sense when comparing with window height.

This change won't lead to any observable behavior change:

The condition intends to check if there are 'scrolloff' lines between
the current cursor when the bottom of the window. When W_WINROW(curwin)
is added to curwin->w_height - 1 - get_scrolloff_value(), the condition
is instead satisfied when the cursor is on some screen line below that
position. However,
- If 'scrolloff' is smaller than half the window height, this condition
  can only be satisfied when W_WINROW(curwin) == 0. And if it is not
  satisfied, update_topline() does the actual scrolling.
- If 'scrolloff' is larger than half the window height, update_topline()
  will put the cursor at the center of the window soon afterwards
  anyway, because set_topline() now unsets VALID_TOPLINE flag starting
  from https://github.com/vim/vim-history/commit/7db7bb45b0f919ff0615d463ebd4fde881c69d1f.

To put it in another way, https://github.com/vim/vim-history/commit/7db7bb45b0f919ff0615d463ebd4fde881c69d1f
makes the update_topline() just below correct the mistakes made in this
block, so this incorrect use of W_WINROW() no longer affects observable
behavior.

closes: #12331

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.1.0013: Modula2 filetype support lacking v9.1.0013
Doug Kearns [Fri, 5 Jan 2024 16:59:04 +0000 (17:59 +0100)] 
patch 9.1.0013: Modula2 filetype support lacking

Problem:  Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
          dialects, add compiler plugin, update syntax highlighting,
          include syntax tests, update Makefiles (Doug Kearns)

closes: #6796
closes: #8115

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 months agopatch 9.1.0012: regression with empty inner blocks introduced v9.1.0012
Maxim Kim [Fri, 5 Jan 2024 16:52:49 +0000 (17:52 +0100)] 
patch 9.1.0012: regression with empty inner blocks introduced

Problem:  regression with empty inner blocks introduced
          (after v9.1.0007)
Solution: Set correct cursor position, Check for visual mode
          being active (Maxim Kim)

relates: #13514
closes: #13819

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>