Filling an off-canvas selection floods the image
GIMP V2.99.18 flatpak Linux Mint 21.3 Cinnamon
Issue:
If a script defines a selection that is entirely off the canvas and then fills the selection with the foreground colour the whole of the image is filled with the foreground colour - this is wrong. If even one point of the selection is within the image than only the part of the selection that overlaps the image is filled - this is as expected.
Expected:
If the selection doesn't intersect with the image then there should be no change to the image.
Reproduction:
Define a 400 x 400 image filled with the background colour
Run the attached script - this will appear in Tools/Problem/Fill selection off canvas
Selecting the first option from the combobox illustrates the problem
Selecting the second option from the combobox fills in a triangular area on the right of the image that represents the intersection of the image and the selection - this is the expected behaviour.