Skip to content

Commit f575af7

Browse files
committed
Added ability to test if we are doing a Simulate
1 parent d95bb11 commit f575af7

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

doc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,7 @@ class CMUSHclientDoc : public CDocument
13731373

13741374
list<CPaneStyle> m_OutstandingLines;
13751375
bool m_bNotesNotWantedNow;
1376+
bool m_bDoingSimulate;
13761377

13771378
BOOL m_bScrollBarWanted; // true if we want to see scroll bars
13781379

doc_construct.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ int i;
206206

207207
m_bVariablesChanged = false;
208208
m_bNotesNotWantedNow = false;
209-
209+
m_bDoingSimulate = false;
210+
210211
m_view_number = 0;
211212
m_LastFlushTime = CTime::GetCurrentTime();
212213

scripting/methods/methods_info.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ VARIANT CMUSHclientDoc::GetInfo(long InfoType)
579579
case 120: SetUpVariantBool (vaResult, m_bScrollBarWanted); break;
580580
case 121: SetUpVariantBool (vaResult, App.m_iCounterFrequency != 0); break;
581581
case 122: SetUpVariantBool (vaResult, sqlite3_threadsafe() != 0); break;
582+
case 123: SetUpVariantBool (vaResult, m_bDoingSimulate); break;
582583

583584
case 201: SetUpVariantLong (vaResult, m_total_lines); break;
584585
case 202: SetUpVariantLong (vaResult, m_new_lines); break;

scripting/methods/methods_utilities.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ SetModifiedFlag (ChangedFlag);
427427

428428
void CMUSHclientDoc::Simulate(LPCTSTR Text)
429429
{
430-
DisplayMsg(Text, strlen (Text), 0);
430+
m_bDoingSimulate = true;
431+
DisplayMsg(Text, strlen (Text), 0);
432+
m_bDoingSimulate = false;
431433
} // end of CMUSHclientDoc::Simulate
432434

433435

0 commit comments

Comments
 (0)