The attached patch fixes item 1630271:
The patch is against the latest core-8-5-branch (from today).
Fixes segfaults / infinite loops when mark out of -startline/-endline range
What the patch does is the following:
- Trying to access any mark (but current and insert marks) when they are not inside the -startline/-endline range of the widget errors out "bad text index".
- The insert and current marks are special. They are not shared between peers, therefore they must always refer to a valid index in the widget. They are now clamped to the -startline/-endline range whenever these limits are changed in a configure command.
- Several tests have been added.
Test suite passes entirely.
Committed in branch bug-1630271, noting that
- additionally - test text-31.11 (which failed
before) now passes as well!
I guess that makes patch 3476698 unnecessary,
is that correct?
The C code part of patch 3476698 is needed for the present patch 3477449 to work, so I have included it in both since I could not know whether 3476698 would in fine be included or not.
Please note that patch 3476698 also included comments, so it would be better to add it properly and then add 3477449, perhaps at the cost of a merge conflict (easy to solve!) in tkText.c:ConfigureText
Merged to core-8-5-branch and trunk. Closing