1
0
forked from aniani/vim

21079 Commits

Author SHA1 Message Date
Boris Staletic
13c1153eef
patch 9.1.0949: popups inconsistently shifted to the left
Problem:  popups inconsistently shifted to the left
Solution: always shift non-fixed popups to the left when the
          text would be truncated
          (no matter whether 'wrap' is set or not)
          (Boris Staletic)

fixes: #16231
closes: #16247

Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0949
2024-12-19 20:22:19 +01:00
Christian Brabandt
83029a354e
git: ignore reformatting change of netrw plugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:17:17 +01:00
Luca Saccarola
c363ca1ecd
runtime(netrw): change indent size from 1 to 2
closes: #16248

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:16:18 +01:00
zeertzjq
3baf19a2b1
patch 9.1.0948: Missing cmdline completion for :pbuffer
Problem:  Missing cmdline completion for :pbuffer.
Solution: Add cmdline completion for :pbuffer like :buffer.
          (zeertzjq)

fixes: #16250
closes: #16251

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0948
2024-12-19 20:05:28 +01:00
Ken Takata
b183f50280
runtime(tutor): Reformat tutor1
* Fix lesson number.
* Fold a long line.
* Adjust newlines.

  It seems that each lesson is written in 23 lines to fit the 80x25
  monitor.

closes: #16253

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:03:10 +01:00
Yegappan Lakshmanan
59c8880ade
patch 9.1.0947: short-description
Problem:  Coverity comlains about un-initialized var
          (after v9.1.0943)
Solution: initialize variable (Yegappan Lakshmanan)

closes: #16256

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0947
2024-12-19 20:00:31 +01:00
Brandon Maier
cbdc3c1f7a
patch 9.1.0946: cross-compiling fails on osx-arm64
Problem:  cross-compiling fails on osx-arm64
Solution: use vim_cv_timer_create_with_lrt() instead of
          vim_cv_timer_create_works() (Brandon Maier)

Cross-compiling to osx-arm64 fails with the following

  In file included from json.c:17:
  In file included from ./vim.h:457:
  ./macros.h:304:24: error: expected identifier or '('
    304 |      static inline int isnan(double x)
        |                        ^
  .../MacOSX11.0.sdk/usr/include/math.h:165:7: note: expanded from macro 'isnan'
    165 |     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))
        |       ^

This can be traced back to ./configure incorrectly detecting the
compiler support for `isnan()`, from the config.log:

  configure:14567: checking for isnan()
  configure:14588: arm64-apple-darwin20.0.0-clang <...> -L$PREFIX/lib conftest.c  -lncurses -ltinfo -lrt >&5
  ld: library not found for -lrt
  arm64-apple-darwin20.0: error: linker command failed with exit code 1 (use -v to see invocation)

The `-lrt` linking is added by ./configure script when it detects
compiler support for `timer_create()`. On the osx-arm64 platform
`timer_create()` works but does not link with `-lrt`. This results in
the following settings from config.log:

  vim_cv_timer_create=yes
  vim_cv_timer_create_with_lrt=no
  vim_cv_timer_create_works=yes

But the configure.ac incorrectly uses `timer_create_works` to add
`-lrt`, instead of using `timer_create_with_lrt`.

fixes: https://github.com/conda-forge/vim-feedstock/pull/1664
closes: #16242

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0946
2024-12-18 21:18:01 +01:00
zeertzjq
f25d8f9312
patch 9.1.0945: ComplMatchIns highlight doesn't end after inserted text
Problem:  ComplMatchIns highlight doesn't end after inserted text.
Solution: Handle ComplMatchIns highlight more like search highlight.
          Fix off-by-one error. Handle deleting text properly.
          (zeertzjq)

closes: #16244

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0945
2024-12-18 21:12:25 +01:00
Fredrik
beccb33977
translation(sv): re-include the change from #16240
related: #16240

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 21:09:27 +01:00
Christian Brabandt
b2a8df35e8
patch 9.1.0944: tests: test_registers fails when not run under X11
Problem:  tests: test_registers fails when not run under X11
Solution: filter out warning message

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0944
2024-12-18 20:40:48 +01:00
Yegappan Lakshmanan
d0186c54c2
patch 9.1.0943: Vim9: vim9compile.c can be further improved
Problem:  vim9compile.c can be further improved
Solution: Refactor the compile_lhs function
          (Yegappan Lakshmanan)

closes: #16245

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0943
2024-12-18 20:16:20 +01:00
Christian Brabandt
80d72aa547
runtime(doc): Update README and mention make check to verify
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:13:46 +01:00
Christian Brabandt
116d2787ad
translation(sv): partly revert commit 98874dca6d0b60ccd6fc3a140b3ec
This partly reverts commit 98874dca6d0b60ccd6fc3a140b3ec1cc3e560f95,
but keeps the added changes from #16240, since the re-generated sv.po
file fails the Vim check.vim script in the CI test suite.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:10:33 +01:00
Christian Brabandt
21c37d7f69
runtime(vim): update base-syntax after v9.1.0936
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 21:01:24 +01:00
zeertzjq
d32bf0a067
patch 9.1.0942: a few typos were found
Problem:  a few typos were found
Solution: fix them (zeertzjq)

closes: #16232

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0942
2024-12-17 20:55:13 +01:00
zeertzjq
f4ccada5c3
patch 9.1.0941: ComplMatchIns doesn't work after multibyte chars
Problem:  ComplMatchIns doesn't work after multibyte chars
          (after v9.1.0936)
Solution: Use (ptr - line) instead of wlv.col (zeertzjq).

closes: #16233

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0941
2024-12-17 20:50:19 +01:00
h-east
a977883ef3
runtime(doc): Fix style in fold.txt
closes: #16236

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:48:42 +01:00
Yee Cheng Chin
38281e1b96
ci: Update macOS from macos-14 to macos-15
Make sure to use the latest Xcode (16.2) which contains fixes in the
compiler, as GitHub Actions defaults to using 16.0 still. See #15764.

closes: #16239

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:36:10 +01:00
Fredrik
98874dca6d
translation(sv): Fix typo in Swedish translation
- "kind file" not as opposed to unkind, but two separate columns

- also regenerate sv.po

fixes: #16237
closes: #16240

Signed-off-by: Fredrik <fredrik.oljemark@helsinki.fi>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:32:44 +01:00
zeertzjq
6c3027744e
patch 9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Problem:  Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Solution: Update cursor and mouse shape after restoring old_State.
          (zeertzjq)

closes: #16241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Solution: Update cursor and mouse shape after restoring old_State.
v9.1.0940
2024-12-17 20:26:45 +01:00
Christian Brabandt
9c3330de28
runtime(doc): fix some small errors
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:24:24 +01:00
Christian Brabandt
3353833f89
patch 9.1.0939: make installtutor fails
Problem:  make installtutor fails
          (Antonio Giovanni Colombo, after v9.1.0932)
Solution: Fix Makefile rule

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0939
2024-12-17 20:16:58 +01:00
Christian Brabandt
bb95589473
patch 9.1.0938: exclusive selection not respected when re-selecting block mode
Problem:  exclusive selection not respected when re-selecting block mode
          (Matt Ellis)
Solution: advance selection by another character when using
          selection=exclusive and visual block mode

fixes: #16202
closes: #16219

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0938
2024-12-16 22:49:15 +01:00
Christian Brabandt
381ff7726e
patch 9.1.0937: test_undolist() is flaky
Problem:  test_undolist() is flaky
Solution: allow to match one additional optional whitespace char

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0937
2024-12-16 22:28:28 +01:00
glepnir
6a38aff218
patch 9.1.0936: cannot highlight completed text
Problem:  cannot highlight completed text
Solution: (optionally) highlight auto-completed text using the
          ComplMatchIns highlight group (glepnir)

closes: #16173

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0936
2024-12-16 21:56:16 +01:00
Aliaksei Budavei
368ef5a48c
patch 9.1.0935: SpotBugs compiler can be improved
Problem:  SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
          SpotBugs; update test_compiler.vim (Aliaksei Budavei)

runtime(compiler): Improve defaults and error handling for SpotBugs

* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
  do not assign its Funcref to the "PreCompilerTestAction"
  key of "g:spotbugs_properties": there are no default and
  there can only be introduced arbitrary "*sourceDirPath"
  entries; therefore, this assignment is confusing at best,
  given that the function's implementation delegates to
  whatever "PreCompilerAction" is.

* Allow for the possibility of relative source pathnames
  passed as arguments to Vim for the Javac default actions,
  and the necessity to have them properly reconciled when
  the current working directory is changed.

* Do not expect users to remember or know that new source
  files ‘must be’ ":argadd"'d to be then known to the Javac
  default actions; so collect the names of Java-file buffers
  and Java-file Vim arguments; and let users providing the
  "@sources" file-lists in the "g:javac_makeprg_params"
  variable update these file-lists themselves.

* Strive to not leave behind a fire-once Syntax ":autocmd"
  for a Java buffer whenever an arbitrary pre-compile action
  errors out.

* Only attempt to run a post-compiler action in the absence
  of failures for a pre-compiler action.  Note that warnings
  and failures are treated alike (?!) by the Javac compiler,
  so when previews are tried out with "--enable-preview",
  remember about passing "-Xlint:-preview" too to also let
  SpotBugs have a go.

* Properly group conditional operators when testing for key
  entries in a user-defined variable.

* Also test whether "javaExternal" is defined when choosing
  an implementation for source-file parsing.

* Two commands are provided to toggle actions for buffer-local
  autocommands:
  - SpotBugsRemoveBufferAutocmd;
  - SpotBugsDefineBufferAutocmd.

For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
	SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------

And ":doautocmd java_spotbugs User" can be manually used at will.

closes: #16140

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0935
2024-12-16 21:38:47 +01:00
Yinzuo Jiang
a2a2fe841e
patch 9.1.0934: hard to view an existing buffer in the preview window
Problem:  hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)

Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.

`:pbuffer` can also open special buffer, for example terminal buffer.

closes: #16222

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0934
2024-12-16 21:22:09 +01:00
Konfekt
3920bb4356
runtime(doc): document how to minimize fold computation costs
closes: #16224

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:11:55 +01:00
Yegappan Lakshmanan
468db1f8af
patch 9.1.0933: Vim9: vim9compile.c can be further improved
Problem:  Vim9: vim9compile.c can be further improved
Solution: further refactor the compile assignment code
          (Yegappan Lakshmanan)

closes: #16230

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0933
2024-12-16 20:56:56 +01:00
Christian Brabandt
3f7d584e96
patch 9.1.0932: new Italian tutor not installed
Problem:  new Italian tutor not installed
Solution: add Makefile rule, include it into the Filelist
          ("Philip H." <47042125+pheiduck@users.noreply.github.com>),
          update the tutors help file

closes: #16215

Co-authored-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0932
2024-12-16 20:38:31 +01:00
Christian Brabandt
0a4e57f44a
runtime(doc): fix a few minor errors from the last doc updates
1) move the section at :h inclusive-motion-selection-exclusive a few
lines below, so that it doesn't live in between the 2 exceptions.

2) remove the tag :h :!-range. It's not accurate (because it is actually
a filter) and this command is already described at :h :range!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 10:20:51 +01:00
Antonio Giovanni Colombo
b100477190
translation(it): add Italian translation for the interactive tutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 21:36:55 +01:00
Antonio Giovanni Colombo
41d6de2974
runtime(doc): update the change.txt help file
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 21:17:49 +01:00
Shougo Matsushita
6fea0a5480
runtime(help): Add Vim lang annotation support for codeblocks
closes: #16215

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 20:52:45 +01:00
h-east
3a3a2c921c
patch 9.1.0931: ml_get error in terminal buffer
Problem:  ml_get error in terminal buffer (user202729)
Solution: call update_topline() in win_enter_ext() for terminal buffers
          (h-east)

fixes: #16024
closes: #16211

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0931
2024-12-15 19:36:11 +01:00
h-east
b34622579c
patch 9.1.0930: tests: test_terminal2 may hang in GUI mode
Problem:  tests: test_terminal2 may hang in GUI mode
Solution: break the loop in gui_mch_update() after at most 99 iterations
          (h-east)

related: #16211

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0930
2024-12-15 19:32:39 +01:00
David Thievon
5a2e0cf5f1
patch 9.1.0929: filetype: lalrpop files are not recognized
Problem:  filetype: lalrpop files are not recognized
Solution: detect '*.lalrpop' files as lalrpop filetype
          (David Thievon)

References:
https://github.com/lalrpop/lalrpop

closes: #16223

Signed-off-by: David Thievon <pdkfan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0929
2024-12-15 19:22:17 +01:00
Christian Brabandt
b48108d58e
patch 9.1.0928: tests: test_popupwin fails because the filter command fails
Problem:  tests: test_popupwin fails because the filter command fails
Solution: add the "e" flag to the :s command to normalize the
          screendumps Last Change header so that it doesn't fail on
          "Pattern not found"

The test might still fail, because the "Last Change" hader should always
be part of the screendump, but at least the filter command should not
cause aborting of the test script.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0928
2024-12-15 10:38:57 +01:00
Yinzuo Jiang
3c5d782dbc
editorconfig: set trim_trailing_whitespace = false for src/testdir/test*.vim
closes: #16220

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 10:31:19 +01:00
glepnir
6e19993991
patch 9.1.0927: style issues in insexpand.c
Problem:  style issues in insexpand.c
Solution: add braces, use ternary operator to improve style
          (glepnir)

closes: #16210

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0927
2024-12-14 21:13:27 +01:00
Brandon Maier
7d1bb90dcf
patch 9.1.0926: filetype: Pixi lock files are not recognized
Problem:  filetype: Pixi lock files are not recognized
Solution: detect "pixi.lock" file as yaml filetype
          (Brandon Maier)

Reference:
https://pixi.sh/latest/features/lockfile/

closes: #16212

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0926
2024-12-14 20:56:34 +01:00
Yinzuo Jiang
fbe9a6903a
runtime(doc): Add a reference to |++opt| and |+cmd| at :h :pedit
closes: #16217

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 20:28:51 +01:00
Christian Brabandt
ed89206efe
runtime(doc): add a note about inclusive motions and exclusive selection
related: #16202

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 20:23:39 +01:00
Yegappan Lakshmanan
e203841e0d
patch 9.1.0925: Vim9: expression compiled when not necessary
Problem:  Vim9: expression compiled when not necessary
Solution: do not compile when ctx_skip is set, add a few more
          Vim9 expressions tests (Yegappan Lakshmanan)

closes: #16218

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0925
2024-12-14 19:59:24 +01:00
Christian Brabandt
6cc3027e54
patch 9.1.0924: patch 9.1.0923 causes issues
Problem:  patch 9.1.0923 causes issues (Shane-XB-Qian)
Solution: back-out the change

This reverts commit e29c8bafa78847414419522baecd008e287389db (v9.1.0923)

fixes: #16213
related: #16160

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0924
2024-12-13 17:56:46 +01:00
John Marriott
e29c8bafa7
patch 9.1.0923: too many strlen() calls in filepath.c
Problem:  too many strlen() calls in filepath.c
Solution: refactor filepath.c and remove calls to STRLEN(),
          unify dos_expandpath() and unix_expandpath() into
          a single function

closes: #16160

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0923
2024-12-13 13:58:53 +01:00
Christian Brabandt
618c4d36ca
patch 9.1.0923: wrong MIN macro in popupmenu.c
Problem:  wrong MIN macro in popupmenu.c (after v9.1.0921)
          (zeertzjq)
Solution: change it to MAX()

Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0922
2024-12-13 12:30:20 +01:00
glepnir
c942f84aad
patch 9.1.0921: popupmenu logic is a bit convoluted
Problem:  popupmenu logic is a bit convoluted
Solution: slightly refactor logic and use MIN/MAX() macros to simplify
          (glepnir)

Define the MAX/MIN macros. Since we support some older platforms, C
compilers may not be as smart. This helps reduce unnecessary if
statements and redundant ternary expressions. Pre-calculate some
expressions by defining variables. Remove unnecessary parentheses.
Adjust certain lines to avoid exceeding 80 columns.

closes: #16205

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0921
2024-12-13 12:13:23 +01:00
Yegappan Lakshmanan
95a03fc321
patch 9.1.0920: Vim9: compile_assignment() too long
Problem:  Vim9: compile_assignment() too long
Solution: refactor compile_assignment() function and split up into
          smaller parts (Yegappan Lakshmanan)

closes: #16209

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0920
2024-12-13 11:54:54 +01:00
Wu, Zhenyu
d66d68763d
patch 9.1.0919: filetype: some assembler files are not recognized
Problem:  filetype: some assembler are files not recognized
Solution: detect '*.nasm' files as nasm filetype and '*.masm' as masm
          filetype (Wu, Zhenyu)

closes: #16194

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0919
2024-12-12 19:39:19 +01:00