summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2013-09-19 14:12:31 +0200
committerSven Eden <yamakuzure@gmx.net>2013-09-19 14:12:31 +0200
commitb711b2f7379554621ad78990bc4f74ac8e034d5a (patch)
tree110dd68ae98b8d0d9434eb46948c090f94c5caae
parentNew descriptions now start unindented when description wrapping is turned on. (diff)
downloadufed-b711b2f7379554621ad78990bc4f74ac8e034d5a.tar.gz
ufed-b711b2f7379554621ad78990bc4f74ac8e034d5a.tar.bz2
ufed-b711b2f7379554621ad78990bc4f74ac8e034d5a.zip
The length of the first part must always be added to the position in the second wrapped part.
-rw-r--r--ufed-curses-checklist.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ufed-curses-checklist.c b/ufed-curses-checklist.c
index 48e6606..6a48ba7 100644
--- a/ufed-curses-checklist.c
+++ b/ufed-curses-checklist.c
@@ -781,16 +781,14 @@ static void setFlagWrapDraw(sFlag* flag, int index, sWrap** wrap, size_t* pos, s
&& !wrapPart->pos)
*isFirstWrap = false;
- // Position and length can be written back already
+ // The length and position can be written back already
*pos = wrapPart->pos;
*len = wrapPart->len;
- // If this was switched, add the first length
- if ((false == *isFirstWrap) && (0 == *pos)) {
- // Add the length of either the package list or the
- // description (stripped or normal) or drawFlag will
- // end up reprinting from the beginning due to the
- // unified description string.
+ // If this is the second part, the length of the first
+ // must be added to the position, or drawflag() will
+ // start all over again.
+ if (false == *isFirstWrap) {
if (eOrder_left == e_order)
*pos += sizeof(flag->desc[index].pkg);
else