]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0488: Wrong padding for pum "kind" with 'rightleft' v9.1.0488
authorzeertzjq <zeertzjq@outlook.com>
Sat, 15 Jun 2024 13:08:27 +0000 (15:08 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 15 Jun 2024 13:08:27 +0000 (15:08 +0200)
commita2324373eb1c3f1777bc40cb6dcd5e895a15fe10
tree8b33542779f38ea2f85e815fb0ab46e9e20166d3
parentae321b51f7531b23545d64c3a98ed991a31dd5ee
patch 9.1.0488: Wrong padding for pum "kind" with 'rightleft'

Problem:  Wrong padding for pum "kind" with 'rightleft'.
Solution: Fix off-by-one error (zeertzjq).

The screen_fill() above is end-exclusive, and
- With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`,
  so the next `col` should be `pum_col - pum_base_width - n`.
- With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`,
  so the next `col` should be `pum_col - pum_base_width + n`.

closes: #15004

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/popupmenu.c
src/testdir/dumps/Test_pum_highlights_06.dump
src/version.c