I remember reading a long time ago about a marginalized group on the southern coast of France who was persecuted by the French government. This group for quite understandable reasons wanted to leave France but the French king at the time passed a law forbidding members of this group from leaving France because he didn't want them to be able to escape persecution. This always struck me as rather a rather chilling display of how petty humans could be, but when I tried looking further into this I have had trouble figuring out exactly which group this happened to.
I could have sworn this group was the Huguenots, but the Huguenots are a religious sect and I could have sworn the group was mentioned as a distinct socio-ethnic group with their own distinct traditions. I remember it was a mentioned that they weren't originally native to the area but settled the French shore from boats that landed on the southern shore of France, but I'm not sure if I'm misremembering things and the original source was talking about something else (this was several years ago).
The Wikipedia pages on the Huguenots are also not super clear. There is a mention of emigration being banned for Huguenots on the Wikipedia page for Huguenots, but it is not mentioned in much detail. The Wikipedia page for the Edict of Fontainebleau doesn't mention Huguenots being forbidden from leaving France at all. Looking up Huguenots more generally finds a lot of articles about successful Huguenot emigration to England, the Netherlands, and North America, but little to nothing about the Huguenots being forbidden to emigrate. For example, the Huguenot Society of America makes no mention of the Huguenots having been forbidden to leave France. As a result, I suspect the original anecdote was referring to the Huguenots but I am not sure.
Given this, what was the persecuted group that the King formally forbade from leaving France? Was it the Huguenots or was it a different group?