Hi, i tested this on windows and the line breaking works for me:
Set line length to 80, mark all text and left click->Format use astyle
i have found out, that you have to
select all text to work, it does not work if you select only a part of the text...
You have to consider a view things:
1) AStyle can only break a line if there is a possibility to break (a empty space, or a apostrophe) : it can't break long names for example
2) It does not break comments
3) If you have deep contexts (like multiple if) it also can't break, because the indentation is stronger, so at the end there is no space left to break
I also tried using the other checkbos "break logical condionals..." with not other result.
This works also as expected:
From this code:
if(hellsadfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfo && teasdfasdfasdfasdfasdfasdfasdfasdfasdfst && blaasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfbla)
{
asdlalsdk;
}
if disabled:
if(hellsadfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfo
&& teasdfasdfasdfasdfasdfasdfasdfasdfasdfst
&& blaasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfbla)
{
asdlalsdk;
}
if enabled:
if(hellsadfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfo &&
teasdfasdfasdfasdfasdfasdfasdfasdfasdfst &&
blaasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfbla)
{
asdlalsdk;
}
(after reopening the settings, this second checkbox always is greyed out until I uncheck and recheck the first checkbos ("Enable line breaking"))
i can confirm this and this is a bug...
std::pair <std::multimap<int, std::tuple<int, double>>::iterator, std::multimap<int, std::tuple<int, double>>::iterator>
revXTRangeBoundsIter;
i can confirm that this line is not wrapped correctly. The AStyle plugin uses the possibilities of AStyle (
https://sourceforge.net/projects/astyle/) so it could be possible that template wrapping is not implemented in the core lib, because it was designed for C ?