GtkTextView does not allow width shrink and textwrap if left or right margin is set
Submitted by Andrej Kacian
Link to original bug (#793407)
Description
Created attachment 368281 A minimal test case program
When a textview with hexpand enabled and left or right margin is resized, it will increase its size, but never decrease if it would mean breaking up a line of text to wrap it.
Attached test case creates two toplevel windows, each with the its own textview. Each textview has minimum size of 200px requested. The only difference is that window #1 (closed) textview has left&right margins set.
To see the issue, just pull right or left window edge to change the windows' width. Window #1 (closed) will not allow you to shrink, while window #2 (closed) will allow you to shrink the textview all the way back to 200px.
It is possible that top&bottom margin have the same effect on height. I haven't tested that.
Attachment 368281, "A minimal test case program":
testcase.c
Version: 3.22.x