Merge pull request #12698 from erw7/fix-popupmenu-with-rl

ui: fix problem with the popupmenu when rightleft is set
This commit is contained in:
Jan Edmund Lazo
2020-11-13 23:09:57 -05:00
committed by GitHub
2 changed files with 20 additions and 0 deletions

View File

@@ -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;