Buttonhole edging can be fiddly. Let me see if I can explain. Firstly, open up this URL in a separate window and scroll down to the bit about buttonhole edging:
http://www.needlework-tips-and-techniqu ... ttern.html" target="_blank
Now. This is what you do in words (mostly Mary Hickmott's words, to be precise): when your thread is getting short and you need to change to a new thread, stop at the stage of the stitch when you've just come through the loop. Set this thread to one side on the needle.
Thread a second needle with a new length of thread, fastening it behind the existing stitches. Begin your blanket stitch as if you were totally starting again, coming up in the hole right next to the one your old thread is currently occupying.
Do a couple of stitches, bearing in mind that, at the moment, you have a stitch "missing".
After a couple of stitches (mostly to get the new thread out of the way!), go back to your old thread (and needle). Take your thread down through the "loop" of the starting stitch of the new thread and take it down the four threads to line up with the rest of the stitches. (This is F-G on the diagram).
It should all look neat and tidy.
Fasten it off behind, and carry on with the new thread.