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

18506 Commits

Author SHA1 Message Date
Gregory Anders
83ad2726ff
patch 9.1.0004: reloading colorscheme when not changing 'background'
Problem:  reloading colorscheme when not changing 'background'
Solution: Check, if the background option value actually changed,
          if not, return early.

Only reload colorscheme when bg is changed

Currently the highlight groups are re-initialized and the colorscheme
(if any) is reloaded anytime 'background' is set, even if it is not
changed. This is unnecessary, because if the value was not changed then
there is no need to change highlight groups or do anything with the
colorscheme. Instead, only reload the colorscheme if the value of
'background' was actually changed.

closes: #13700

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:53:59 +01:00
Isao Sato
443657b32b
patch 9.1.0003: Cannot build against Ruby 33 dynamically
Problem:  Cannot build against Ruby 33 dynamically
Solution: Ruby 33 removed transient heap, so do not use
          rb_ary_transient anymore, NoMethodError format changed,
          so update test for expected error message
          (Isao Sato)

- ruby-3.3 removed transient heap for ruby/dyn

when +ruby/dyn with ruby-3.3 do command :ruby, E448 occur.
ruby-3.3 has no transient heap anymore, so disable rb_ary_transient etc.

$ LC_ALL=C VIMRUNTIME=runtime ./src/vim -u NONE -c 'ruby puts RUBY_VERSION'
"=> Error detected while processing command line:
"=> E448: Could not load library function rb_ary_detransient
"=> E266: Sorry, this command is disabled, the Ruby library could not be
    loaded.

- ruby-3.3 changed NoMethodError format:

$ rvm 3.2.2, 3.3.0-rc1 do ruby -e 'begin; nil.name; rescue => e; puts "%s : %s"%[RUBY_VERSION, e.message]; end '
=> 3.2.2 : undefined method `name' for nil:NilClass
=> 3.3.0 : undefined method `name' for nil

so loose pattern in Test_ruby_Vim_buffer_get()

closes: #13741

Signed-off-by: Isao Sato <svardew@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:46:42 +01:00
Shota Nozaki
0689b87059
patch 9.1.0002: a closing fold expr, may start a new fold
Problem:  a closing fold expression may unexpectedly start a new fold
          when it should end a fold
          (reported by Shota Nozaki)
Solution: if a fold hasn't started yet, do not immediately
          start a new fold with level 1
          (Shota Nozaki)

fixes: #12768
closes: #13748

Signed-off-by: Shota Nozaki <emonkak@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:18:43 +01:00
Sean Dewar
bf44b69d1f
patch 9.1.0001: when closing window, wincmd p may fail
Avoid `prevwin == curwin` when closing `curwin`

Problem:  When closing the current window (or when moving it to a tabpage), the
          previous window may refer to the new current window
          (`winnr() == winnr('#')`) if that window is selected as the
          new current window.

Solution: Set `prevwin = NULL` when switching away from an invalid `curwin` and
          the target window was the `prevwin`.
          (Sean Dewar)

related: #4537
closes: #13762

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:07:21 +01:00
Christian Brabandt
b4ddc6c11e
patch 9.1.0000: Vim 9.1 release
Problem:  Need a new release
Solution: Release Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-02 16:51:11 +01:00
Christian Brabandt
6a950da86d
patch 9.0.2190: proto files need update
Problem:  proto files need update
Solution: re-generate them

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 20:19:09 +01:00
Christian Brabandt
d36f590d41
translation(de): Updated German translation (#13796)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-29 16:34:04 +01:00
zeertzjq
7e4f62a257
patch 9.0.2189: Wrong display with 'briopt=sbr' and 'nobreakindent'
Problem:  Wrong display when 'breakindentopt' contains "sbr" and
          'showbreak' and 'nobreakindent' are set.
Solution: Always reset wlv->need_showbreak regardless of the values of
          'breakindent' and 'showbreak', as they aren't checked when
          setting wlv->need_showbreak (zeertzjq)

closes: #13785

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:19:52 +01:00
Zoltan Arpadffy
0efa58184b
translation(hu): add Hungarian translation (#13782)
* add Hungarian translation
* Add hu.po to the Make_all file

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:15:19 +01:00
Restorer
9f239f169a
translation(ru): Updated Russian translation (#13788)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:13:10 +01:00
Antonio Giovanni Colombo
7d0abf2cb6
translation(it): Update Italian translations
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:45:02 +01:00
Gary Johnson
9e6549d2fb
patch 9.0.2188: cursor wrong after { in single line buffer
Problem:  cursor wrong after { in single line buffer
          (Edwin Chan)
Solution: do not place the cursor at the end for a single
          line buffer when moving backwards
          (Gary Johnson)

closes: #13780
closes: #13783

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:12:43 +01:00
zeertzjq
23627722d3
patch 9.0.2187: Visual not drawn with 'breakindent' when line doesn't fit
Problem:  Visual selection isn't drawn with 'breakindent' when the line
          doesn't fit in the window (Jaehwang Jung)
Solution: Adjust wlv->fromcol also for 'breakindent' (zeertzjq)

closes: #13767
closes: #13768

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:08:53 +01:00
Saleem Abdulrasool
38bea30f53
patch 9.0.2186: LTCG compile error ARM64 for write_chars
Problem:  LTCG compile error on Win/ARM64 for `write_chars()`
Solution: Explicitly initialise the storage to use data rather than BSS
          (Saleem Abdulrasool)

win32: add a workaround for a LTCG issue on Windows ARM64

It appears that the implicit initialisation which would push `g_coords`
into BSS causes an aliasing issue with LTCG on ARM64.  By explicitly
initialising the value, we use usual data storage but prevent the
aliasing.  This allows the console version of VIM to run on Windows
ARM64 again.

fixes:  #13453
closes: #13775

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 18:57:12 +01:00
Anatolii Sakhnik
377372ed5b
translation(ua): Update Ukrainian translation (#13760)
Signed-off-by: Anatolii Sakhnik <sakhnik@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-25 10:19:25 +01:00
Christian Brabandt
6b9492e299
patch 9.0.2185: Coverity complains about not checking return value
Problem:  Coverity complains about not checking return value
          in compare_isn_not_values (after 9.0.2184)
Solution: cast return value to "(void)" to make intention clear

closes: #13751

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-24 11:14:37 +01:00
Ernie Rael
e75fde6b04
patch 9.0.2184: Vim9: inconsistent :type/:class messages
Problem:  Vim9: inconsistent :type/:class messages
Solution: Update the Messages (Ernie Rael)

closes: #13706

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:18:54 +01:00
zeertzjq
fe583b1e59
patch 9.0.2183: Maximum callback depth is not configurable
Problem:  Maximum callback depth is not configurable.
Solution: Revert patch 9.0.2103.  Set 'maxfuncdepth' in test.
          (zeertzjq)

fixes: #13732
closes: #13736

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:03:31 +01:00
Ivan Pešić
632b38b45f
translation(sr): Update Serbian messages translation (#13737)
Updated with newly added E1411

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:58:33 +01:00
Yegappan Lakshmanan
ff6f0d5c38
patch 9.0.2182: Vim9: need a way to reserve future extension
Problem:  Vim9: need a way to reserve future extension
Solution: reserve double underscore prefix for future use
          (Yegappan Lakshmanan)

related: #13238
closes: #13742

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:46:18 +01:00
Ernie Rael
5e13315778
patch 9.0.2181: Vim9: missing error messages
Problem:  Vim9: missing error messages
Solution: Add one more error message

closes: #13729

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 22:15:27 +01:00
Zoltan Arpadffy
6fdb628082
patch 9.0.2180: POSIX function name in exarg causes issues
Problem:  POSIX function name in exarg struct causes issues
          on OpenVMS
Solution: Rename getline member in exarg struct to ea_getline,
          remove isinf() workaround for VMS

There are compilers that do not treat well POSIX functions - like
getline - usage in the structs.

Older VMS compilers could digest this... but the newer OpenVMS compilers
( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these
structs. This could be limited to getline() that is defined via
getdelim() and might not affect all POSIX functions in general - but
avoiding POSIX function names usage in the structs is a "safe side"
practice without compromising the functionality or the code readability.

The previous OpenVMS X86 port used a workaround limiting the compiler
capabilities using __CRTL_VER_OVERRIDE=80400000
In order to make the OpenVMS port future proof, this pull request
proposes a possible solution.

closes: #13704

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:53:07 +01:00
Mazunki Hoksaas
63210c214a
patch 9.0.2179: no filetype detection for execline scripts
Problem:  no filetype detection for execline scripts
Solution: Add filetype detection for execline

as a prior to adding syntax support for execline (see
https://github.com/djpohly/vim-execline/issues/2), i went ahead and made
the filetype detection for execline scripts.

closes: #13689

Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:44:41 +01:00
zeertzjq
615202bd0e
patch 9.0.2178: reg_executing() wrong for :normal with range
Problem:  reg_executing() returns wrong result in :normal with range
          when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.

closes: #13707

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:35:40 +01:00
zeertzjq
ec14924368
patch 9.0.2177: Wrong cursor position when dragging out of window
Problem:  Wrong cursor position when dragging out of window.
Solution: Don't use ScreenCols[] when mouse is not in current window.

closes: #13717

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:28:31 +01:00
Ivan Pešić
f01bee1bc0
translation(sr): Update Serbian messages translation (#13719)
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:24:30 +01:00
K.Takata
ef07a7651e
translation(ja): Update Japanese translation (#13723)
ref: https://github.com/vim-jp/lang-ja/releases/tag/20231219

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:21:40 +01:00
Ken Takata
18d0d29b42
patch 9.0.2175: Compile error with Motif UI + mouse support
Problem:  Compile error with Motif UI + mouse support (after v9.0.1262)
Solution: Use correct oldval option pointer

Fix compilation error introduced by 9.0.1262 and found in #13704.

closes: #13726

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:12:29 +01:00
Antonio Giovanni Colombo
2afe381a35
translation(it): Update Italian translations
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 09:09:54 +01:00
Emir SARI
2f05ad162e
translation(tr): Update Turkish translations (#13710)
Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 09:02:04 +01:00
Yegappan Lakshmanan
38ce1a7ac8
patch 9.0.2175: Compiler warning for uninitialized var
Problem:  Compiler warning for uninitialized var
Solution: initialize variable to NULL

closes: #13711

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 08:58:29 +01:00
Ernie Rael
b501108986
patch 9.0.2174: Vim9: segfault when assigning to type
Problem:  Vim9: segfault when assigning to type
Solution: do not clear typeval, add missing patch number

closes: #13714
closes: #13715

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 08:34:41 +01:00
Yegappan Lakshmanan
062bb6b909
patch 9.0.2173: Vim9: crash when compiling for statement and non-existing type
Problem:  Vim9: Vim crashes when compiling a for statement with a
          non-existing type
Solution: Error out when  lhs_type is not null

closes: #13703

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:46:40 +01:00
Yegappan Lakshmanan
a185a31fc0
patch 9.0.2172: Vim9: compiling :defer may fail
Problem:  Vim9: compiling :defer may fail
Solution: compile defer, when ctx_skip is not SKIP_YES

compiling defer fails in an if statement with false condition,
so check the ctx_skip value when compiling :defer

fixes:  #13698
closes: #13702

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:36:08 +01:00
Kevin Scannell
535e8f5941
translation(ie): Updated Irish translation (#13699)
Signed-off-by: Kevin Scannell <kscanne@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:30:12 +01:00
zeertzjq
ffba4e952b
patch 9.0.2171: The options[] array is still not sorted alphabetically
Problem:  The options[] array is still not sorted alphabetically
          (after: v9.0.2154), causing test failures
Solution: Sort the remaining items

This causes an failure for the vim/vim-win32-installer builds, so make
sure it is completely sorted.

closes: #13690

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:14:36 +01:00
Yegappan Lakshmanan
e5437c5427
patch 9.0.2170: Vim9: no support for const/final class/objects vars
Problem:  Vim9: no support for const/final class/objects vars
Solution: Support final and const object and class variables

closes: #13655

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:11:19 +01:00
Ernie Rael
d8bf87c9fb
patch 9.0.2169: Vim9: builtin funcs may accept a non-value
Problem:  Vim9: builtin funcs may accept a non-value
Solution: Restrict builtin functions that accept `type`

This PR finishes off detection and prevention of using a type as a
value. It takes care of builtin functions. However there are some
builtin functions, that need to be able to handle types as well as
non-args: instanceof(), type(), typename(), string().

A "bit", FE_X, is added to funcentry_T; when set, the builtin function
can handle a type (class or type-alias) in addition to a value.

Noteworthy change: Discovered that in compile_call() the builtin add()
is compiled inline instead of calling the builtin. Had to add a check
there.

closes: #13688

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:03:33 +01:00
Christian Brabandt
df12e39b8b
patch 9.0.2168: Moving tabpages on :drop may cause an endless loop
Problem:  Moving tabpages on :drop may cause an endless loop
Solution: Disallow moving tabpages on :drop when cleaning up the arglist
          first

Moving tabpages during drop command may cause an endless loop

When executing a :tab drop command, Vim will close all windows not in
the argument list. This triggers various autocommands. If a user has
created an 'au Tabenter * :tabmove -' autocommand, this can cause Vim to
end up in an endless loop, when trying to iterate over all tabs (which
would trigger the tabmove autocommand, which will change the tpnext
pointer, etc).

So instead of blocking all autocommands before we actually try to edit
the given file, lets simply disallow to move tabpages around. Otherwise,
we may change the expected number of events triggered during a :drop
command, which users may rely on (there is actually a test, that expects
various TabLeave/TabEnter autocommands) and would therefore be a
backwards incompatible change.

Don't make this an error, as this could trigger several times during the
drop command, but silently ignore the :tabmove command in this case (and
it should in fact finally trigger successfully when loading the given
file in a new tab). So let's just be quiet here instead.

fixes:  #13676
closes: #13686

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 13:55:32 +01:00
iam28th
323dda1484
runtime(termdebug): add Tbreak command
closes: #13656

Signed-off-by: iam28th <artyom28th@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:33:43 +01:00
Doug Kearns
74da0ee0a2
patch 9.0.2167: Vim9: not consistently using :var for declarations
Problem:  Vim9-script object/class variable declarations use syntax
	  that is inconsistent with the rest of the language.
Solution: Use :var to declare object and class variables.

closes: #13670

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:26:26 +01:00
Zdenek Dohnal
549f8c0b4e
patch 9.0.2166: Memory leak in Configure Script when checking GTK
Problem:  Memory leak in Configure Script when checking GTK
Solution: Free the allocated memory

If the memory is not freed, GTK GUI VIM cannot be build with address
sanitizer for debugging purposes - configure script will report missing
GTK, because the testing file compilation fails due reported memory
leak.

closes: #13672

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:22:49 +01:00
Ernie Rael
a8f7f92b56
patch 9.0.2165: Vim9: can simplify arg type checking code
Problem:  Vim9: can simplify arg type checking code
Solution: In `f_argcheck` array use `arg_any`, instead of NULL

closes: #13674

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:19:54 +01:00
Ernie Rael
b077b58809
patch 9.0.2164: Vim9: can use type a func arg/return value
Problem:  Vim9: can use type a func arg/return value
Solution: Check if using type as function argument or return value

closes: #13675

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:14:13 +01:00
Ernie Rael
fa831102c3
patch 9.0.2163: Vim9: type can be assigned to list/dict
Problem:  Vim9: type can be assigned to list/dict
Solution: Prevent assigning a `type` to a `list` or `dict`

closes: #13683

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:06:39 +01:00
Yegappan Lakshmanan
2a71b54d35
patch 9.0.2162: Vim9: type documentation out-dated
Problem:  Vim9: type documentation out-dated
Solution: Update documentation, fix typo in type alias
          definition

closes: #13684

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:03:03 +01:00
Yegappan Lakshmanan
d2e1c83962
patch 9.0.2161: Vim9: not able to use imported interfaces and classes
Problem:  Vim9: not able to use imported interfaces and classes
Solution: Detect imported class/interfaces names correclty

fixes:  #13661
closes: #13685

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 19:59:45 +01:00
Ernie Rael
2025af165e
patch 9.0.2160: instanceof() should use varargs as second arg
Problem:  instanceof() should use varargs as second arg
Solution: Modify `instanceof()` to use varargs instead of list

Modify `instanceof()` to use varargs instead of list
Valid `instanceof()` arguments are `type`s. A `type` is not a value;
it cannot be added to a list.

This change is non-compatible with the current usage of instanceof;
but instanceof is relatively new and it's a trivial change.

fixes: #13421
closes: #13644

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-12 16:58:00 +01:00
zeertzjq
ec54af4e26
patch 9.0.2159: screenpos() may crash with neg. column
Problem:  screenpos() may crash with neg. column
Solution: validate and correct column

closes: #13669

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-12 16:43:44 +01:00
Christian Brabandt
0f28791b21
patch 9.0.2158: [security]: use-after-free in check_argument_type
Problem:  [security]: use-after-free in check_argument_type
Solution: Reset function type pointer when freeing the function type
          list

function pointer fp->uf_func_type may point to the same memory, that was
allocated for fp->uf_type_list. However, when cleaning up a function
definition (e.g. because it was invalid), fp->uf_type_list will be
freed, but fp->uf_func_type may still point to the same (now) invalid
memory address.

So when freeing the fp->uf_type_list, check if fp->func_type points to
any of those types and if it does, reset the fp->uf_func_type pointer to
the t_func_any (default) type pointer

closes: #13652

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:53:25 +01:00