Commit: patch 9.1.0071: Need a diff() Vim script function

2024-02-01 Fir de Conversatie Christian Brabandt
patch 9.1.0071: Need a diff() Vim script function

Commit: 
https://github.com/vim/vim/commit/fa37835b8c0ed0f83952978fca4c332335ca7c46
Author: Yegappan Lakshmanan 
Date:   Thu Feb 1 22:05:27 2024 +0100

patch 9.1.0071: Need a diff() Vim script function

Problem:  Need a diff() Vim script function
Solution: Add the diff() Vim script function using the
  xdiff internal diff library, add support for
  "unified" and "indices" mode.
  (Yegappan Lakshmanan)

fixes: #4241
closes: #12321

Signed-off-by: Yegappan Lakshmanan 
Signed-off-by: Christian Brabandt 

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 5001205ea..19b9bc9f6 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2024 Jan 29
+*builtin.txt*  For Vim version 9.1.  Last change: 2024 Feb 01
 
 
  VIM REFERENCE MANUALby Bram Moolenaar
@@ -147,6 +147,8 @@ delete({fname} [, {flags}]) Number  delete the file or 
directory {fname}
 deletebufline({buf}, {first} [, {last}])
Number  delete lines from buffer {buf}
 did_filetype() Number  |TRUE| if FileType autocmd event used
+diff({fromlist}, {tolist} [, {options}])
+   Listdiff two Lists of strings
 diff_filler({lnum})Number  diff filler lines about {lnum}
 diff_hlID({lnum}, {col})   Number  diff highlighting at {lnum}/{col}
 digraph_get({chars})   String  get the |digraph| of {chars}
@@ -2046,6 +2048,67 @@ did_filetype()   Returns |TRUE| when autocommands are 
being executed and the
editing another buffer to set 'filetype' and load a syntax
file.
 
+diff({fromlist}, {tolist} [, {options}])   *diff()*
+   Returns a String or a List containing the diff between the
+   strings in {fromlist} and {tolist}.  Uses the Vim internal
+   diff library to compute the diff.
+
+   *E106*
+   The optional "output" item in {options} specifies the returned
+   diff format.  The following values are supported:
+   indices Return a List of the starting and ending
+   indices and a count of the strings in each
+   diff hunk.
+   unified Return the unified diff output as a String.
+   This is the default.
+
+   If the "output" item in {options} is "indices", then a List is
+   returned.  Each List item contains a Dict with the following
+   items for each diff hunk:
+   from_idxstart index in {fromlist} for this diff hunk.
+   from_count  number of strings in {fromlist} that are
+   added/removed/modified in this diff hunk.
+   to_idx  start index in {tolist} for this diff hunk.
+   to_countnumber of strings in {tolist} that are
+   added/removed/modified in this diff hunk.
+
+   The {options} Dict argument also specifies diff options
+   (similar to 'diffopt') and supports the following items:
+   iblank  ignore changes where lines are all
+   blank.
+   icase   ignore changes in case of text.
+   iwhite  ignore changes in amount of white
+   space.
+   iwhiteall   ignore all white space changes.
+   iwhiteeol   ignore white space changes at end of
+   line.
+   indent-heuristicuse the indent heuristic for the
+   internal diff library.
+   algorithm   Dict specifying the diff algorithm to
+   use.  Supported boolean items are
+   "myers", "minimal", "patience" and
+   "histogram".
+   For more information about these options, refer to 'diffopt'.
+
+   Returns an empty List or String if {fromlist} and {tolist} are
+   identical.
+
+   Examples:
+   :echo diff(['abc'], ['xxx'])
+@@ -1 +1 @@
+-abc
++xxx
+
+   :echo diff(['abc'], ['xxx'], {'output': 'indices'})
+[{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 
1}]
+   :echo diff(readfile('oldfile'), readfile('newfile'))
+   :echo diff(getbufline(5, 1, '$'), getbufline(6, 1, '$'))
+
+   For 

Re: [vim/vim] Visual mode highlighting broken in 9.1.0067 (Issue #13954)

2024-02-01 Fir de Conversatie Steve Mynott
On Thu, 1 Feb 2024 at 20:00, Christian Brabandt 
wrote:

> Please show the output of :hi Visual before and after. What is :set term?
> set to?
>
patch 9.1.0068
:hi Visual
Visual xxx cterm=reverse ctermfg=0 guibg=#575757

bdb9d9a
:hi Visual
Visual xxx term=reverse cterm=reverse guibg=DarkGrey

term=xterm-256color
(kitty)

Steve



-- 
Steve Mynott 
rsa3072/629FBB91565E591955B5876A79CEFAA4450EBD50

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CANuZA8TXYHqniNbs0CgsSVH04Gg45_tU_5SzZL7ObPZHfz2xXg%40mail.gmail.com.


Commit: runtime(vim): Update syntax file (#13948)

2024-02-01 Fir de Conversatie Christian Brabandt
runtime(vim): Update syntax file (#13948)

Commit: 
https://github.com/vim/vim/commit/e3e3934bb18294b1a5636ed65299d3479f289a8e
Author: dkearns 
Date:   Fri Feb 2 07:44:26 2024 +1100

runtime(vim): Update syntax file (https://github.com/vim/vim/issues/13948)

Improve string escape sequence and special key matching.

Signed-off-by: Doug Kearns 
Signed-off-by: Christian Brabandt 

diff --git a/runtime/syntax/testdir/dumps/vim_expr_00.dump 
b/runtime/syntax/testdir/dumps/vim_expr_00.dump
index 6330599d7..91ae9390d 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_00.dump
@@ -4,17 +4,17 @@
 |e+0#af5f00255&|c|h|o| +0#000&|'+0#e02&|t|a|b|:| |\|t|,| |n|e|w| 
|l|i|n|e|:| |\|n|,| |b|a|c|k|s|l|a|s|h|:| |\@1|'| +0#000&@31
 |e+0#af5f00255&|c|h|o| +0#000&|"+0#e02&|t|a|b|:| 
|\+0#e000e06&|t|,+0#e02&| |n|e|w| |l|i|n|e|:| |\+0#e000e06&|n|,+0#e02&| 
|b|a|c|k|s|l|a|s|h|:| |\+0#e000e06&@1|"+0#e02&| +0#000&@31
 @75
-|"+0#e05&| |S|t|r|i|n|g| |i|n|t|e|r|p|o|l|a|t|i|o|n| +0#000&@52
+|"+0#e05&| |S|t|r|i|n|g| |e|s|c|a|p|e| |s|e|q|u|e|n|c|e|s| +0#000&@49
 @75
-|e+0#af5f00255&|c|h|o| +0#000&|'+0#e02&|D|o|n|'@1|t| 
|h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|'| 
+0#000&@22
-|e+0#af5f00255&|c|h|o| +0#000&|"+0#e02&|D|o|n|'|t| |h|i|g|h|l|i|g|h|t| 
|i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|"| +0#000&@23
-|e+0#af5f00255&|c|h|o| +0#000&|$+0#e02&|'|H|i|g|h|l|i|g|h|t| 
|i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e02&|{+0#000&| 
|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e02&|f|o@1|'|:+0#000&| 
|'+0#e02&|b|a|r|'|}+0#e000e06&|)| +0#000&|}| 
+0#e02&|}+0#e000e06&@1|'+0#e02&| +0#000&@8
-|e+0#af5f00255&|c|h|o| +0#000&|$+0#e02&|'|H|i|g|h|l|i|g|h|t| 
|i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e02&|{+0#000&| 
|$+0#e02&|'|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e02&|{+0#000&|1| 
|++0#af5f00255&| +0#000&|2|}| +0#e02&|}+0#e000e06&@1|'+0#e02&| 
+0#000&|}| +0#e02&|}+0#e000e06&@1|'+0#e02&| +0#000&@6
-|e+0#af5f00255&|c|h|o| +0#000&|$+0#e02&|"|H|i|g|h|l|i|g|h|t| 
|i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e02&|{+0#000&| 
|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|"+0#e02&|f|o@1|"|:+0#000&| 
|"+0#e02&|b|a|r|"|}+0#e000e06&|)| +0#000&|}| 
+0#e02&|}+0#e000e06&@1|"+0#e02&| +0#000&@8
-|e+0#af5f00255&|c|h|o| +0#000&|$+0#e02&|"|H|i|g|h|l|i|g|h|t| 
|i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e02&|{+0#000&| 
|$+0#e02&|"|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e02&|{+0#000&|1| 
|++0#af5f00255&| +0#000&|2|}| +0#e02&|}+0#e000e06&@1|"+0#e02&| 
+0#000&|}| +0#e02&|}+0#e000e06&@1|"+0#e02&| +0#000&@6
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|"+0#000&|i|n|p|u|t|/|v|i|m|_|e|x|p|r|.|v|i|m|"| |1|4|L|,| |5|2@1|B| 
@26|1|,|1| @10|A|l@1| 
+|e+0#af5f00255&|c|h|o| +0#000&|"+0#e02&|\+0#e000e06&|3|1|6| 
+0#e02&|-| |\+0#e000e06&|3|1| +0#e02&|-| |\+0#e000e06&|3| 
+0#e02&|-| |\+0#e000e06&|x|1|f| +0#e02&|-| |\+0#e000e06&|x|f| 
+0#e02&|-| |\+0#e000e06&|X|1|F| +0#e02&|-| |\+0#e000e06&|X|F| 
+0#e02&|-| |\+0#e000e06&|u|0|2|a|4| +0#e02&|-| 
|\+0#e000e06&|U|0@4|2|a|4| +0#e02&|-| |\+0#e000e06&|b| +0#e02&
+|-| |\+0#e000e06&|e| +0#e02&|-| |\+0#e000e06&|f| +0#e02&|-| 
|\+0#e000e06&|n| +0#e02&|-| |\+0#e000e06&|r| +0#e02&|-| 
|\+0#e000e06&|t| +0#e02&|-| |\+0#e000e06&@1| +0#e02&|-| 
|\+0#e000e06&|"| +0#e02&|-| |\+0#e000e06&|<|C|-|W|>|"+0#e02&| 
+0#000&@30
+|e+0#af5f00255&|c|h|o| +0#000&|'+0#e02&|\|3|1|6| |\|3|1| |\|3| 
|\|x|1|f| |\|x|f| |\|X|1|F| |\|X|F| |\|u|0|2|a|4| |\|U|0@4|2|a|4| |\|b| |\|e| 
|\|f| |\|n| |\|r| |\|t| |\@1| 
+|\|"| |\|<|C|-|W|>|'| +0#000&@64
+|e+0#af5f00255&|c|h|o| 
+0#000&|"+0#e02&|\+0#e000e06&|3|1|6|0+0#e02&| |-| 
|\+0#e000e06&|x|1|f|0+0#e02&| |-| |\+0#e000e06&|X|1|F|0+0#e02&| |-| 
|\+0#e000e06&|u|0|2|a|4|0+0#e02&| |-| 
|\+0#e000e06&|U|0@4|2|a|4|0+0#e02&|"| +0#000&@22
+@75
+|e+0#af5f00255&|c|h|o| +0#000&|$+0#e02&|"|\+0#e000e06&|3|1|6| 
+0#e02&|-| |\+0#e000e06&|3|1| +0#e02&|-| |\+0#e000e06&|3| 
+0#e02&|-| |\+0#e000e06&|x|1|f| +0#e02&|-| |\+0#e000e06&|x|f| 
+0#e02&|-| |\+0#e000e06&|X|1|F| +0#e02&|-| |\+0#e000e06&|X|F| 
+0#e02&|-| |\+0#e000e06&|u|0|2|a|4| +0#e02&|-| 
|\+0#e000e06&|U|0@4|2|a|4| +0#e02&|-| |\+0#e000e06&|b
+| +0#e02&|-| |\+0#e000e06&|e| +0#e02&|-| |\+0#e000e06&|f| 
+0#e02&|-| |\+0#e000e06&|n| +0#e02&|-| |\+0#e000e06&|r| +0#e02&|-| 
|\+0#e000e06&|t| +0#e02&|-| |\+0#e000e06&@1| +0#e02&|-| 
|\+0#e000e06&|"| +0#e02&|-| |\+0#e000e06&|<|C|-|W|>|"+0#e02&| 
+0#000&@29
+|e+0#af5f00255&|c|h|o| +0#000&|$+0#e02&|'|\|3|1|6| |\|3|1| 

Commit: runtime(fortran): update syntax (#13953)

2024-02-01 Fir de Conversatie Christian Brabandt
runtime(fortran): update syntax (#13953)

Commit: 
https://github.com/vim/vim/commit/9204f39580bde807808b352df178fa02b5503a81
Author: Ajit-Thakkar <142174202+ajit-thak...@users.noreply.github.com>
Date:   Thu Feb 1 16:43:01 2024 -0400

runtime(fortran): update syntax (https://github.com/vim/vim/issues/13953)

* runtime (Fortran) update syntax
* runtime (Fortran) small fix

Signed-off-by: Ajit-Thakkar 
<142174202+ajit-thak...@users.noreply.github.com>
Signed-off-by: Christian Brabandt 

diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index 34245b30d..8167e4d73 100644
--- a/runtime/syntax/fortran.vim
+++ b/runtime/syntax/fortran.vim
@@ -1,6 +1,6 @@
 " Vim syntax file
 " Language:Fortran 2023 (and Fortran 2018, 2008, 2003, 95, 90, and 77)
-" Version: (v112) 2024 January 24
+" Version: (v113) 2024 February 01
 " Maintainers: Ajit J. Thakkar ; 
 "  Joshua Hollett 
 " Usage:   For instructions, do :help fortran-syntax from Vim
@@ -84,14 +84,14 @@ syn match fortranConstructName  
"\%(\
 syn match fortranUnitName   
"\%(\<\%(end\s*\)\?\%(subroutine\|function\|module\|program\|submodule\)\s\+\)\@12<=
 \w*"
 syn match fortranUnitHeader "\\ze\s*\%(!.*\)\?$"
 
-syn keyword fortranIntrinsic   abs acos aimag aint anint asin atan atan2 cmplx 
conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt 
tan tanh
+syn keyword fortranIntrinsic   abs acos aimag aint anint asin atan atan2 cmplx 
conjg cos cosh exp ichar index int log log10 max min nint sin sinh sqrt tan tanh
 syn keyword fortranIntrinsicR  achar iachar transfer dble dprod dim lge lgt 
lle llt mod
 syn keyword fortranIntrinsiccommand_argument_count get_command 
get_command_argument get_environment_variable is_iostat_end is_iostat_eor 
move_alloc new_line same_type_as extends_type_of
 syn keyword fortranIntrinsicselected_real_kind selected_int_kind 
selected_logical_kind selected_char_kind next previous
 syn keyword fortranIntrinsicacosh asinh atanh bessel_j0 bessel_j1 
bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma 
hypot norm2
 syn keyword fortranIntrinsicadjustl adjustr all allocated any associated 
bit_size btest ceiling cshift date_and_time digits
 syn keyword fortranIntrinsicdot_product eoshift exponent floor fraction 
iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent 
maxloc merge minexponent minloc
-syn keyword fortranIntrinsicmodulo mvbits nearest pack precision present 
radix random_number random_seed range repeat reshape rrspacing scale scan 
set_exponent shape size spacing
+syn keyword fortranIntrinsicmodulo mvbits nearest pack precision present 
radix random_number random_seed range repeat reshape rrspacing scale scan 
set_exponent shape spacing
 " intrinsic names often used for variables in older Fortran code
 syn match fortranIntrinsic  
'\<\%(count\|epsilon\|maxval\|minval\|product\|sum\|huge\|tiny\|char\)\>\ze\s*('
 syn keyword fortranIntrinsicspread system_clock transpose trim ubound 
unpack verify is_contiguous event_query
@@ -112,17 +112,19 @@ syn keyword fortranIntrinsic  ieee_unordered 
ieee_value ieee_get_flag ieee_get_ha
 syn keyword fortranIntrinsic   ieee_set_flag ieee_set_halting_mode 
ieee_set_modes ieee_set_status ieee_support_flag ieee_support_halting
 syn keyword fortranIntrinsiciso_c_binding c_loc c_funloc c_sizeof 
c_associated c_f_pointer c_f_procpointer c_f_strpointer f_c_string
 syn keyword fortranIntrinsiciso_fortran_env compiler_options 
compiler_version
-syn keyword fortranIntrinsic   out_of_range reduce random_init coshape 
get_team team_number split tokenize
+syn keyword fortranIntrinsic   out_of_range reduce random_init coshape 
get_team split tokenize
 syn keyword fortranIntrinsicacosd asind atand atan2d cosd sind tand acospi 
asinpi atanpi atan2pi cospi sinpi tanpi
 syn match fortranIntrinsic  "\%(^\s*\|type *is *(\s*\)\@12\ze\s*('
+syn match fortranIntrinsic  '\<\%(sign\|size\|team_number\)\>\ze\s*('
 " Obsolescent type-specific intrinsics
 syn keyword fortranIntrinsicOb alog alog10 amax0 amax1 amin0 amin1 amod cabs 
ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp 
dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float 
iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl
 if exists("fortran_vendor_intrinsics")
   syn keyword fortranIntrinsicVen  algama cdabs cdcos cdexp cdlog cdsin 
cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat 
dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos 
qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod 
qnint qsign qsin qsinh qsqrt qtan qtanh
 endif
 
-syn keyword fortranType generic final enumerator import classof typeof
+syn keyword fortranType generic final 

Commit: patch 9.1.0070: CI: testsuite not run on M1 Mac

2024-02-01 Fir de Conversatie Christian Brabandt
patch 9.1.0070: CI: testsuite not run on M1 Mac

Commit: 
https://github.com/vim/vim/commit/e93d5cadec6323d6be90f1ec29066441ffbc9477
Author: rhysd 
Date:   Thu Feb 1 21:22:14 2024 +0100

patch 9.1.0070: CI: testsuite not run on M1 Mac

Problem:  CI: testsuite not run on M1 Mac
Solution: Make it run on gh runners for M1, disable failing tests for
  now, until we figure the problem with the failings tests out
  (rhysd)

closes: #13943

Signed-off-by: rhysd 
Signed-off-by: Christian Brabandt 

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ebac88216..69fb7a41d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -299,7 +299,7 @@ jobs:
   done
 
   macos:
-runs-on: macos-latest
+runs-on: ${{ matrix.runner }}
 
 env:
   CC: clang
@@ -312,17 +312,24 @@ jobs:
   fail-fast: false
   matrix:
 features: [tiny, normal, huge]
+runner: [macos-latest, macos-14]
 
 steps:
   - name: Checkout repository from github
 uses: actions/checkout@v4
 
-  - name: Install packages
-if: matrix.features == 'huge'
+  - name: Install packages on Intel Mac
+if: matrix.features == 'huge' && matrix.runner == 'macos-latest'
 run: |
   brew install lua
   echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
 
+  - name: Install packages on M1 Mac
+if: matrix.features == 'huge' && matrix.runner == 'macos-14'
+run: |
+  brew install lua libtool
+  echo "LUA_PREFIX=/opt/homebrew" >> $GITHUB_ENV
+
   - name: Set up environment
 run: |
   (
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 930fd7b83..64a8818d6 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -871,6 +871,10 @@ func VerifyInternal(buf, dumpfile, extra)
 endfunc
 
 func Test_diff_screen()
+  if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64'
+throw 'Skipped: FIXME: This test fails on M1 Mac on GitHub Actions'
+  endif
+
   let g:test_is_flaky = 1
   CheckScreendump
   CheckFeature menu
diff --git a/src/testdir/test_sound.vim b/src/testdir/test_sound.vim
index e97ac6198..020d45891 100644
--- a/src/testdir/test_sound.vim
+++ b/src/testdir/test_sound.vim
@@ -15,6 +15,9 @@ func Test_play_event()
   if has('win32')
 throw 'Skipped: Playing event with callback is not supported on Windows'
   endif
+  if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64'
+throw 'Skipped: FIXME: Running this test on M1 Mac hangs on GitHub Actions'
+  endif
   let g:playcallback_count = 0
   let g:id = 0
   let event_name = 'bell'
@@ -35,6 +38,10 @@ func Test_play_event()
 endfunc
 
 func Test_play_silent()
+  if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64'
+throw 'Skipped: FIXME: Running this test on M1 Mac hangs on GitHub Actions'
+  endif
+
   let fname = fnamemodify('silent.wav', '%p')
   let g:playcallback_count = 0
 
diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim
index 9798c5194..c7d1a9a7b 100644
--- a/src/testdir/test_terminal2.vim
+++ b/src/testdir/test_terminal2.vim
@@ -536,6 +536,10 @@ endfunc
 
 " Test for term_gettitle()
 func Test_term_gettitle()
+  if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64'
+throw 'Skipped: FIXME: Title got on M1 Mac is broken on GitHub Actions'
+  endif
+
   " term_gettitle() returns an empty string for a non-terminal buffer
   " and for a non-existing buffer.
   call assert_equal('', bufnr('%')->term_gettitle())
diff --git a/src/version.c b/src/version.c
index b70c90a26..75038dd6e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+70,
 /**/
 69,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rVdhE-00807V-06%40256bit.org.


Commit: patch 9.1.0069: ScreenLines may not be correctly initialized, causing hang

2024-02-01 Fir de Conversatie Christian Brabandt
patch 9.1.0069: ScreenLines may not be correctly initialized, causing hang

Commit: 
https://github.com/vim/vim/commit/fd472655a93fd539c731c8daf3adc4e65ddce341
Author: Olaf Seibert 
Date:   Thu Feb 1 21:11:16 2024 +0100

patch 9.1.0069: ScreenLines may not be correctly initialized, causing hang

Problem:  ScreenLines may not be correctly initialized, causing hang
  (Olaf Seibert, after 9.0.0220)
Solution: always initialize ScreneLines when allocating a screen
  (Olaf Seibert)

ScreenLines and related structures could be left uninitialized
causing a screen update to run into an infinite loop when using latin1
encoding.

Partly caused because by patch 9.0.0220, which makes mb_ptr2len return
zero for NUL

related: #12671
closes: #13946

Signed-off-by: Olaf Seibert 
Signed-off-by: Christian Brabandt 

diff --git a/src/screen.c b/src/screen.c
index 032e447a9..939a33599 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2569,6 +2569,25 @@ give_up:
new_LineOffset[new_row] = new_row * Columns;
new_LineWraps[new_row] = FALSE;
 
+   (void)vim_memset(new_ScreenLines + new_row * Columns,
+ ' ', (size_t)Columns * sizeof(schar_T));
+   if (enc_utf8)
+   {
+   (void)vim_memset(new_ScreenLinesUC + new_row * Columns,
+  0, (size_t)Columns * sizeof(u8char_T));
+   for (int i = 0; i < p_mco; ++i)
+   (void)vim_memset(new_ScreenLinesC[i]
+ + new_row * Columns,
+  0, (size_t)Columns * sizeof(u8char_T));
+   }
+   if (enc_dbcs == DBCS_JPNU)
+   (void)vim_memset(new_ScreenLines2 + new_row * Columns,
+  0, (size_t)Columns * sizeof(schar_T));
+   (void)vim_memset(new_ScreenAttrs + new_row * Columns,
+   0, (size_t)Columns * sizeof(sattr_T));
+   (void)vim_memset(new_ScreenCols + new_row * Columns,
+   0, (size_t)Columns * sizeof(colnr_T));
+
/*
 * If the screen is not going to be cleared, copy as much as
 * possible from the old screen to the new one and clear the rest
@@ -2577,24 +2596,6 @@ give_up:
 */
if (!doclear)
{
-   (void)vim_memset(new_ScreenLines + new_row * Columns,
- ' ', (size_t)Columns * sizeof(schar_T));
-   if (enc_utf8)
-   {
-   (void)vim_memset(new_ScreenLinesUC + new_row * Columns,
-  0, (size_t)Columns * sizeof(u8char_T));
-   for (int i = 0; i < p_mco; ++i)
-   (void)vim_memset(new_ScreenLinesC[i]
- + new_row * Columns,
-  0, (size_t)Columns * sizeof(u8char_T));
-   }
-   if (enc_dbcs == DBCS_JPNU)
-   (void)vim_memset(new_ScreenLines2 + new_row * Columns,
-  0, (size_t)Columns * sizeof(schar_T));
-   (void)vim_memset(new_ScreenAttrs + new_row * Columns,
-   0, (size_t)Columns * sizeof(sattr_T));
-   (void)vim_memset(new_ScreenCols + new_row * Columns,
-   0, (size_t)Columns * sizeof(colnr_T));
old_row = new_row + (screen_Rows - Rows);
if (old_row >= 0 && ScreenLines != NULL)
{
diff --git a/src/version.c b/src/version.c
index ce3c4fde2..b70c90a26 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+69,
 /**/
 68,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rVdhC-00806p-Ns%40256bit.org.


Commit: patch 9.1.0068: Visual highlighting can still be improved

2024-02-01 Fir de Conversatie Christian Brabandt
patch 9.1.0068: Visual highlighting can still be improved

Commit: 
https://github.com/vim/vim/commit/59bafc8171b08cf326ed40ccb4ee917f9643290e
Author: Maxim Kim 
Date:   Thu Feb 1 21:07:51 2024 +0100

patch 9.1.0068: Visual highlighting can still be improved

Problem:  Visual highlighting can still be improved
Solution: Update Visual highlighting for 8 color terminals,
  use uniform grey highlighting for dark and light bg
  (Maxim Kim)

Update terminal Visual

1. Use `ctermbg=Grey ctermfg=Black` for both dark and light

This uniforms Visual highlighting between default dark and light colors
And should work for vim usually detecting light background for terminals
with black/dark background colors.

Previously used `ctermfg=White` leaks `cterm=bold` if available colors
are less than 16.

2. Use `term=reverse cterm=reverse ctermbg=NONE ctermfg=NONE`
   for terminals reporting less than 8 colors available

If the terminal has less than 8 colors, grey just doesn't work right

closes: #13940

Signed-off-by: Maxim Kim 
Signed-off-by: Christian Brabandt 

diff --git a/src/highlight.c b/src/highlight.c
index 85726f828..7fbeeb72a 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -221,8 +221,8 @@ static char *(highlight_init_light[]) = {
 CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue",
 "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey 
guifg=DarkBlue"),
 #endif
-CENT("Visual ctermbg=DarkGrey ctermfg=White",
-"Visual ctermbg=DarkGrey ctermfg=White guibg=LightGrey"),
+CENT("Visual ctermbg=Grey ctermfg=Black",
+"Visual ctermbg=Grey ctermfg=Black guibg=LightGrey"),
 #ifdef FEAT_DIFF
 CENT("DiffAdd term=bold ctermbg=LightBlue",
 "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"),
@@ -433,8 +433,11 @@ init_highlight(
 for (i = 0; pp[i] != NULL; ++i)
do_highlight((char_u *)pp[i], reset, TRUE);
 
-// Reverse looks ugly, but grey may not work for 8 colors.  Thus let it
-// depend on the number of colors available.
+// Reverse looks ugly, but grey may not work for less than 8 colors.  Thus
+// let it depend on the number of colors available.
+if (t_colors < 8)
+   do_highlight((char_u *)"Visual term=reverse cterm=reverse ctermbg=NONE 
ctermfg=NONE",
+   FALSE, TRUE);
 // With 8 colors brown is equal to yellow, need to use black for Search fg
 // to avoid Statement highlighted text disappears.
 // Clear the attributes, needed when changing the t_Co value.
diff --git a/src/testdir/dumps/Test_balloon_eval_term_02.dump 
b/src/testdir/dumps/Test_balloon_eval_term_02.dump
index 4771b3295..f3bd6331c 100644
--- a/src/testdir/dumps/Test_balloon_eval_term_02.dump
+++ b/src/testdir/dumps/Test_balloon_eval_term_02.dump
@@ -1,6 +1,6 @@