With "Auto-wrap to window size" enabled, if I call TextRectangle to change the size of the output region, new text still wraps at the old location. The wrap column doesn't change unless I resize the program window. Changing the size of the whole program by, let's say 1 pixel, will then cause new text to start wrapping at the edge of the textrectangle.
The wrap column should get updated by calls to TextRectangle if auto-wrap to window size is enabled.
// don't resize if not active, or minimized, or closed
if (wp.showCmd != SW_MINIMIZE &&
pDoc->m_iConnectPhase == eConnectConnectedToMud &&
(
pDoc->m_pActiveOutputView == this ||
pDoc->m_pActiveCommandView == m_bottomview
))
AutoWrapWindowWidth (pDoc);
Odd. If it stays that way, I'd update wrap columns on connect. Otherwise textrects that get sized before connection will mysteriously not adjust wrapping.
Though, actually, neither of those issues has to do with mud connection. Only being backgrounded, not disconnected. So maybe remove the check for m_iConnectPhase? Updating on connect might be safer, though, given that there might be a good reason for the check that just isn't immediately obvious.