If the player's reasonable, you could just confront them more directly when it happens. When the scene begins to grow long, break character for a moment and say something like:
"Ok, is there anything in particular you want to get from this scene? We're both enjoying it, but I'm sure the others are getting a little bored, so we need to move on to something that involves the whole group."
If the player really wants to accomplish something that will take more time, but it's not something the group is interested in, then maybe you can offer to let the player interact with the NPC again at the end of the session after everyone else has left (assuming you're not bored with it).
Another way I've handled situations in the past where one player wanted a lot of interaction with certain NPCs that didn't involve the group was to make myself available to them outside of the normal gaming time. I had a particular player who did this a lot. We were also friends and hung out a lot, so we would often roleplay then. It can also be done over the phone or email between sessions if the player's down for that.
Yet another tact you could take is to try to involve the other characters in the conversation if you can. If it's happening at the inn while the others are asleep, maybe one of them (the one who looks the most bored) wakes up to take a piss, and sees the PC and NPC talking and decides to see what they're talking about.