X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=documentor%2Fsrc%2FDocumentor.ec;fp=documentor%2Fsrc%2FDocumentor.ec;h=80a995b42ef7d0e63acdeb1c475d30bf48ce84cb;hb=015a9e7983015e131e7cae2b946563c3234c0e7b;hp=ecc44e4a38650f940e7ef6699ad33249101b67a5;hpb=9c7b06d2fc4fff3f98d96dc4dd3c9496e24713c6;p=sdk diff --git a/documentor/src/Documentor.ec b/documentor/src/Documentor.ec index ecc44e4..80a995b 100644 --- a/documentor/src/Documentor.ec +++ b/documentor/src/Documentor.ec @@ -4157,6 +4157,7 @@ class HelpView : HTMLView char * text = textBlock.text; int maxW; Block block = textBlock; + int xOffset = 0; while(block && block.type != TD) block = block.parent; if(block) { @@ -4172,11 +4173,19 @@ class HelpView : HTMLView display.FontExtent(textBlock.font.font, " ", 1, null, &th); + // Work around to re-align with first line having different indentation because of    before of current block + { + Block parent = textBlock.parent; + while(parent && parent.type == ANCHOR) parent = parent.parent; + if(parent && parent.subBlocks.first && ((Block)parent.subBlocks.first).type == TEXT) + xOffset = sx - ((Block)parent.subBlocks.first).startX; + } + while(textPos < textBlock.textLen) { int startPos = textPos; int width = 0; - int x = 0; + int x = xOffset; bool lineComplete = false; for(; textPos of current block + { + Block parent = textBlock.parent; + while(parent && parent.type == ANCHOR) parent = parent.parent; + if(parent && parent.subBlocks.first && ((Block)parent.subBlocks.first).type == TEXT) + xOffset = sx - ((Block)parent.subBlocks.first).startX; + } + display.FontExtent(textBlock.font.font, " ", 1, &space, &th); //space = space/2+2; space = 2; @@ -4295,7 +4313,7 @@ class HelpView : HTMLView while(textPos < textBlock.textLen) { int width = 0; - int x = 0; + int x = xOffset; bool lineComplete = false; for(; textPos= sy && */py < sy + th && /*px >= sx-space && */px < sx + w-space) { int c, numBytes;