I recently bought this house, so know very little of the history. However, in prepping for painting, I found that there is a substantial gap between my window sill trim and drywall. You can see the thickness in the photo. It runs for about 6ft, with the thickness varying a bit across the run.
I am looking for suggestions for the best way to patch it. My first thought was to use some spray foam, cut that flat, tape it, then use joint compound. But I am not at all confident that is the right approach, so very much appreciate your thoughts!