As we know, it is undecidable whether a string belong to the language accepted by a particular turing machine or not [Membership problem of Turing Machine]. So, How can it, in the first place, recognise whether some sub-string 'w' is a part of given input string 's'(say) or not. Only after it recognises whether substring 'w' is a part of string "s" which belongs to language accepted by it (i.e. whether it is present on tape or not) it can decide whether to write on that part or not.
So to conclude the answer to this question should be "it is undecidable"