X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FLogicalScreen.java;fp=src%2Fjexer%2Fbackend%2FLogicalScreen.java;h=22b7e95f6564aad97431ca2e60a2fec09e9d2365;hb=8d3480c7b92b79c8e774261fd6a8fe719286cf67;hp=46776fb2b0685ef9df5b7f3e623336e81f1dd487;hpb=c950b791c6c4f94ab8a1777e709ecb259de7ab4f;p=fanfix.git diff --git a/src/jexer/backend/LogicalScreen.java b/src/jexer/backend/LogicalScreen.java index 46776fb..22b7e95 100644 --- a/src/jexer/backend/LogicalScreen.java +++ b/src/jexer/backend/LogicalScreen.java @@ -1122,11 +1122,11 @@ public class LogicalScreen implements Screen { int endX = x1; int endY = y1; - if (((x1 < x0) && (y1 <= y0)) - || ((x1 <= x0) && (y1 < y0)) + if (((x1 < x0) && (y1 == y0)) + || (y1 < y0) ) { - // The user dragged from bottom-right to top-left. Reverse the - // coordinates for the inverted section. + // The user dragged from bottom-to-top and/or right-to-left. + // Reverse the coordinates for the inverted section. startX = x1; startY = y1; endX = x0; @@ -1181,11 +1181,11 @@ public class LogicalScreen implements Screen { int endX = x1; int endY = y1; - if (((x1 < x0) && (y1 <= y0)) - || ((x1 <= x0) && (y1 < y0)) + if (((x1 < x0) && (y1 == y0)) + || (y1 < y0) ) { - // The user dragged from bottom-right to top-left. Reverse the - // coordinates for the inverted section. + // The user dragged from bottom-to-top and/or right-to-left. + // Reverse the coordinates for the inverted section. startX = x1; startY = y1; endX = x0;