According to Morten: O tries to find the hydrogen position of the N-H bond. It then checks the angle between that direction, and the direction from the 'would-be' hydrogen to the H-bond acceptor, like this:
N-----H - - - - -
\ ) angle
\
O
If this angle is > 90 degrees, the Hbond is not drawn. But then,
there could be bugs ... (undesired features I prefer to call it
) ...