Lawmakers move to limit jail detentions during civil commitm