]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0043: ml_get: invalid lnum when :s replaces visual selection v9.1.0043
authorChristian Brabandt <cb@256bit.org>
Mon, 22 Jan 2024 19:12:34 +0000 (20:12 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 22 Jan 2024 19:12:34 +0000 (20:12 +0100)
commit7c71db3a58f658b4329b82ab603efa928d17bdbc
treeb78ab8ca9bc57c2c4ee758efc2d8e029bf736c18
parent3b2c27415d7d6e97be9580b66528e8c19d19aade
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>
src/regexp.c
src/testdir/test_visual.vim
src/version.c