Custody is the state of the same lawsuit that has been filed before and continues, and this situation is now stated as a condition of lawsuit in the HMK. The same case is used to express the parties, the cases with the same cause and subject.
On the other hand, pending lawsuit is defined as the fact that a lawsuit is pending, in other words, the lawsuit is continuing. Until a pending case is closed or a final judgment is rendered, that case remains pending. In other words, the fact that a case is pending means that a decision has not yet been made about that case and it has not been finalized.