MCPcopy Create free account
hub / github.com/WheretIB/nullc / FindLongestLine

Method FindLongestLine

GUI/RichTextarea.cpp:1126–1139  ·  view source on GitHub ↗

Function puts longest line size to a global variable Size is in characters, but the Tab can be represented with more that one

Source from the content-addressed store, hash-verified

1124// Function puts longest line size to a global variable
1125// Size is in characters, but the Tab can be represented with more that one
1126void TextareaData::FindLongestLine()
1127{
1128 AreaLine *curr = firstLine;
1129 longestLine = 0;
1130 while(curr)
1131 {
1132 int length = 0;
1133 for(unsigned int i = 0; i < curr->length; i++, length++)
1134 if(curr->data[i].ch == '\t')
1135 length += 3;
1136 longestLine = longestLine < length ? length : longestLine;
1137 curr = curr->next;
1138 }
1139}
1140
1141void TextareaData::OnPaint()
1142{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected