diff --git a/uppsrc/GridCtrl/GridCtrl.cpp b/uppsrc/GridCtrl/GridCtrl.cpp index a0c8122d1..406153646 100644 --- a/uppsrc/GridCtrl/GridCtrl.cpp +++ b/uppsrc/GridCtrl/GridCtrl.cpp @@ -1978,6 +1978,8 @@ void GridCtrl::SyncPopup() int y = vi.npos + p0.y - p.y - 1 - sby.Get() * int(!fr); GetItemAttrs(it, hi.id, hi, vi, popup.style, popup.gd, popup.fg, popup.bg, popup.fnt); + popup.gd->row = -1; + popup.gd->col = -1; Size scrsz = GetScreenSize(); int margin = popup.gd->lm + popup.gd->rm; int cx = min(600, min((int) (scrsz.cx * 0.4), max(it.rcx + margin + 2, hi.nsize + 1))); @@ -5544,8 +5546,8 @@ void GridCtrl::Clear(bool columns) else { total_height = fixed_height; - firstVisRow = fixed_rows; - lastVisRow = fixed_rows; + firstVisRow = fixed_rows - 1; + lastVisRow = fixed_rows - 1; } valid_cursor = false;