bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616)

1 file changed