As a drop-in solution replace line 364 with the following four lines (after removing bullets and fixing indent of course, this is just a hack to preserve newlines):
if chain:
cmd.select(rSelName, rSelName + " or (__h and i. " + str(IDs[start]) + "-" + str(IDs[stop - 1]) + " and c. " + chain + " )")
else:
cmd.select(rSelName, rSelName + " or (__h and i. " + str(IDs[start]) + "-" + str(IDs[stop - 1]) + ")")
As a drop-in solution replace line 364 with the following four lines (after removing bullets and fixing indent of course, this is just a hack to preserve newlines):