MCPcopy Create free account
hub / github.com/agraef/pure-lang / limit_buffer

Function limit_buffer

purepad/evalview.cpp:185–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185static void limit_buffer(CEdit& edit, int nlines)
186{
187 int n = edit.GetLineCount() - nlines;
188 if (n <= 0) return;
189 int len = edit.GetWindowTextLength()+1;
190 LPTSTR buf = new TCHAR[len+1];
191 edit.GetWindowText(buf, len);
192 LPTSTR s;
193 for (s = buf; *s && n; s++)
194 if (*s == 10) n--;
195 edit.SetWindowText(s);
196 delete[] buf;
197}
198
199void CEvalView::Append(LPCTSTR lpszText, BOOL mark)
200{

Callers 1

AppendMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected