improve hover behaviour in editor (for reference and definition strings)