From e3a96501893ff305273508cbdc5c81c083399fc6 Mon Sep 17 00:00:00 2001 From: Nick Gammon Date: Sun, 29 Nov 2015 08:24:58 +1100 Subject: [PATCH] If current line is being omitted, GetInfo (124) will return true --- ProcessPreviousLine.cpp | 16 ++++++++-------- doc.h | 1 + doc_construct.cpp | 1 + scripting/methods/methods_info.cpp | 1 + 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ProcessPreviousLine.cpp b/ProcessPreviousLine.cpp index 775e58dd..693928d7 100644 --- a/ProcessPreviousLine.cpp +++ b/ProcessPreviousLine.cpp @@ -452,13 +452,13 @@ assemble the full text of the original line. // triggers might set these bool bNoLog = !m_bLogOutput; - bool bNoOutput = false; + bool m_bLineOmittedFromOutput = false; bool bChangedColour = false; m_iCurrentActionSource = eInputFromServer; if (!SendToAllPluginCallbacks (ON_PLUGIN_LINE_RECEIVED, strCurrentLine)) - bNoOutput = true; + m_bLineOmittedFromOutput = true; m_iCurrentActionSource = eUnknownActionSource; @@ -607,7 +607,7 @@ assemble the full text of the original line. strResponse, prevpos, bNoLog, - bNoOutput, + m_bLineOmittedFromOutput, bChangedColour, triggerList, strExtraOutput, @@ -626,7 +626,7 @@ assemble the full text of the original line. strResponse, prevpos, bNoLog, - bNoOutput, + m_bLineOmittedFromOutput, bChangedColour, triggerList, strExtraOutput, @@ -652,7 +652,7 @@ assemble the full text of the original line. strResponse, prevpos, bNoLog, - bNoOutput, + m_bLineOmittedFromOutput, bChangedColour, triggerList, strExtraOutput, @@ -665,7 +665,7 @@ assemble the full text of the original line. // if we have changed the colour of this trigger, or omitted it from output, // we must force an update or they won't see it - if (bNoOutput || bChangedColour) + if (m_bLineOmittedFromOutput || bChangedColour) { // notify view to update their selection ranges @@ -735,7 +735,7 @@ assemble the full text of the original line. // if omitting from output do that now - if (bNoOutput) + if (m_bLineOmittedFromOutput) { // delete all lines in this set @@ -984,7 +984,7 @@ assemble the full text of the original line. // check memory still OK // _ASSERTE( _CrtCheckMemory( ) ); - return bNoOutput; + return m_bLineOmittedFromOutput; } // end of CMUSHclientDoc::ProcessPreviousLine diff --git a/doc.h b/doc.h index 8664550f..4afc3f9e 100644 --- a/doc.h +++ b/doc.h @@ -1374,6 +1374,7 @@ class CMUSHclientDoc : public CDocument list m_OutstandingLines; bool m_bNotesNotWantedNow; bool m_bDoingSimulate; + bool m_bLineOmittedFromOutput; BOOL m_bScrollBarWanted; // true if we want to see scroll bars diff --git a/doc_construct.cpp b/doc_construct.cpp index 9477c2ed..ef861ebb 100644 --- a/doc_construct.cpp +++ b/doc_construct.cpp @@ -207,6 +207,7 @@ int i; m_bVariablesChanged = false; m_bNotesNotWantedNow = false; m_bDoingSimulate = false; + m_bLineOmittedFromOutput = false; m_view_number = 0; m_LastFlushTime = CTime::GetCurrentTime(); diff --git a/scripting/methods/methods_info.cpp b/scripting/methods/methods_info.cpp index 7b42f533..58f46e65 100644 --- a/scripting/methods/methods_info.cpp +++ b/scripting/methods/methods_info.cpp @@ -580,6 +580,7 @@ VARIANT CMUSHclientDoc::GetInfo(long InfoType) case 121: SetUpVariantBool (vaResult, App.m_iCounterFrequency != 0); break; case 122: SetUpVariantBool (vaResult, sqlite3_threadsafe() != 0); break; case 123: SetUpVariantBool (vaResult, m_bDoingSimulate); break; + case 124: SetUpVariantBool (vaResult, m_bLineOmittedFromOutput); break; case 201: SetUpVariantLong (vaResult, m_total_lines); break; case 202: SetUpVariantLong (vaResult, m_new_lines); break;