From 4901270af3c12d98f5d302c0e1b031780db40976 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sun, 7 Feb 2016 18:01:43 -0200 Subject: [PATCH] Fix an error invoking the contextual menu. If the ide window was too small (e.g. default size 80x25) and a subwindow was being shown (help window) drawing the contextual menu caused an error. --- source/ide/ide_methods.bas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 9b26803f4..ac6a2b477 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -3353,10 +3353,14 @@ DO NEXT yy = 2 IF idecontextualmenu = 1 THEN + actual.idewy = idewy + if idesubwindow <> 0 then + actual.idewy = idewy + idesubwindow + end if xx = idectxmenuX if xx < 3 then xx = 3 yy = idectxmenuY - if yy + menusize(m) + 2 > idewy then yy = idewy - 2 - menusize(m) + if yy + menusize(m) + 2 > actual.idewy then yy = actual.idewy - 2 - menusize(m) END IF IF xx > idewx - w - 3 THEN xx = idewx - w - 3