mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-473 Pass breakOnWhiteSpace param thru to wrap function. Don't let decompiler layout add extra line breaks based on white space. Adjust prettyprint overflow in the middle of comments
This commit is contained in:
parent
b5c7e7104c
commit
7c5e0e868b
4 changed files with 91 additions and 35 deletions
|
@ -595,11 +595,21 @@ void EmitPrettyPrint::overflow(void)
|
|||
else
|
||||
break;
|
||||
}
|
||||
int4 newspaceremain;
|
||||
if (!indentstack.empty())
|
||||
spaceremain = indentstack.back();
|
||||
newspaceremain = indentstack.back();
|
||||
else
|
||||
spaceremain = maxlinesize;
|
||||
newspaceremain = maxlinesize;
|
||||
if (newspaceremain == spaceremain)
|
||||
return; // Line breaking doesn't give us any additional space
|
||||
if (commentmode && (newspaceremain == spaceremain + commentfill.size()))
|
||||
return; // Line breaking doesn't give us any additional space
|
||||
spaceremain = newspaceremain;
|
||||
lowlevel->tagLine(maxlinesize-spaceremain);
|
||||
if (commentmode &&(commentfill.size() != 0)) {
|
||||
lowlevel->print(commentfill.c_str(),EmitXml::comment_color);
|
||||
spaceremain -= commentfill.size();
|
||||
}
|
||||
}
|
||||
|
||||
/// Content and markup is sent to the low-level emitter if appropriate. The
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue