The selection should remain and the color be replaced only on the selected part. However, I don't know what Command - does. The tools you want to use after the selection is the bucket-fill(*).
Of course if your new color isn't in the color map, you won't get the color you want, see https://www.gimp-forum.net/Thread-What-a...-all-wrong
(*) While checking this, I found that the brush seems to ignore the selection in some cases, and this could be a bug, so if you are using the brush, use the bucket.
Of course if your new color isn't in the color map, you won't get the color you want, see https://www.gimp-forum.net/Thread-What-a...-all-wrong
(*) While checking this, I found that the brush seems to ignore the selection in some cases, and this could be a bug, so if you are using the brush, use the bucket.