I asked a question and got a comment which hinted on a solution of the problem. Then I followed that hint and after some (but not much) work I solved the original issue.
I then commented that this solved my issue and suggested to the hint giver that he should post his hint as an answer (otherwise I was proposing to answer my question myself). He did, but just as a one-liner which was just a copy of the comment, so I suggested to extend his answer a little in order to be a valuable answer also to future users with the same problem.
He then removed his answer stub and all of his comments, leaving my comments without context (so I also removed my comments).
I then answered my question myself and gave credit to the hint giver in the text like:
Thanks to XY who by now removed his answer-stub and even all of his helpful comments—for whatever reason—for hinting on how to solve this.
This credit I felt was necessary to avoid the impression I solved the issue myself (in other words: I didn't want to take credit for sth I didn't deserve it for).
Now, another editor felt this line was not necessary and edited it out. I would like to keep it in and found nothing appropriate on MSO concerning this special case.
For pointers to some more specific guidelines covering this case or in lack of them just your opinions, I would be grateful.