Fixed problem with clearing is_new_document flag in edit buffer when reusing existing new-doc buffer

This commit is contained in:
cmanske%netscape.com 1998-07-21 23:36:03 +00:00
Родитель fe8dc78f66
Коммит 753cb8807b
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -10082,6 +10082,17 @@ void CEditBuffer::FinishedLoad2()
XP_Bool bShouldSendOpenEvent = !GetCommandLog()->InReload();
// Be sure a doc that thinks its "new" has the correct URL
// If user loads a URL into a "new doc" buffer that is unedited,
// we reuse that buffer and context, so we must clear the new-doc flag here
// (this used to be done in NET_GetURL, mkgeturl.c, but that had bad side effects)
char *pBaseURL = LO_GetBaseURL(m_pContext);
if( pBaseURL && EDT_IS_NEW_DOCUMENT(m_pContext) &&
0 != XP_STRCMP(pBaseURL, XP_GetString(XP_EDIT_NEW_DOC_NAME)) )
{
m_pContext->is_new_document = FALSE;
}
// Set page properties (color, background, etc.)
// for a new document:
XP_Bool bIsNewDocument = EDT_IS_NEW_DOCUMENT(m_pContext)