diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-13 23:09:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 23:09:57 -0500 |
commit | d8c69adbabe963142f433a2ddad172ff46413f15 (patch) | |
tree | 286aa67984fa18395c77a872b8d088ddca3e5348 /src | |
parent | 7c4f349661bd7e66f22b3a0903ffb7b8db1222e7 (diff) | |
parent | f1bd2c1dd9d7b0de0a291c690d828a112f8b6cae (diff) | |
download | rneovim-d8c69adbabe963142f433a2ddad172ff46413f15.tar.gz rneovim-d8c69adbabe963142f433a2ddad172ff46413f15.tar.bz2 rneovim-d8c69adbabe963142f433a2ddad172ff46413f15.zip |
Merge pull request #12698 from erw7/fix-popupmenu-with-rl
ui: fix problem with the popupmenu when rightleft is set
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ui_compositor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c index 325ad31eaf..9d3ec21949 100644 --- a/src/nvim/ui_compositor.c +++ b/src/nvim/ui_compositor.c @@ -312,6 +312,9 @@ ScreenGrid *ui_comp_mouse_focus(int row, int col) static void compose_line(Integer row, Integer startcol, Integer endcol, LineFlags flags) { + // If rightleft is set, startcol may be -1. In such cases, the assertions + // will fail because no overlap is found. Adjust startcol to prevent it. + startcol = MAX(startcol, 0); // in case we start on the right half of a double-width char, we need to // check the left half. But skip it in output if it wasn't doublewidth. int skipstart = 0, skipend = 0; |