@@ -1280,14 +1280,20 @@ bool CSendView::CheckTyping (CMUSHclientDoc* pDoc, CString strReplacement)
1280
1280
{
1281
1281
const int iLimit = 200 ;
1282
1282
1283
- if (!pDoc->m_bConfirmBeforeReplacingTyping )
1283
+ // they didn't personally type anything, so accept it
1284
+ if (!m_bChanged)
1284
1285
return false ;
1285
1286
1286
1287
CString strCurrent;
1287
1288
1288
1289
GetEditCtrl ().GetWindowText (strCurrent);
1289
1290
1290
- if (strCurrent.GetLength () != 0 && m_bChanged)
1291
+ // nothing there? who cares?
1292
+ if (strCurrent.GetLength () == 0 )
1293
+ return false ;
1294
+
1295
+ // if they want confirmation, do it
1296
+ if (pDoc->m_bConfirmBeforeReplacingTyping )
1291
1297
{
1292
1298
1293
1299
// don't echo ridiculous amounts of text
@@ -1317,31 +1323,33 @@ CString strCurrent;
1317
1323
return true ;
1318
1324
}
1319
1325
1320
- // preserve what we are about to delete, if requested to do so
1321
1326
1322
- if (pDoc->m_bSaveDeletedCommand )
1323
- {
1324
- CString str = GetText (GetEditCtrl ());
1327
+ } // end if confirmation wanted
1325
1328
1326
- // do not record null commands, or ones identical to the previous one
1327
1329
1328
- if (!str.IsEmpty () && str != m_last_command)
1330
+ // preserve what we are about to delete, if requested to do so
1331
+
1332
+ if (pDoc->m_bSaveDeletedCommand )
1333
+ {
1334
+ CString str = GetText (GetEditCtrl ());
1335
+
1336
+ // do not record null commands, or ones identical to the previous one
1337
+
1338
+ if (!str.IsEmpty () && str != m_last_command)
1339
+ {
1340
+ if (m_inputcount >= pDoc->m_nHistoryLines )
1329
1341
{
1330
- if (m_inputcount >= pDoc->m_nHistoryLines )
1331
- {
1332
- m_msgList.RemoveHead (); // keep max of "m_nHistoryLines" previous commands
1333
- m_HistoryFindInfo.m_nCurrentLine --; // adjust for a "find again"
1334
- if (m_HistoryFindInfo.m_nCurrentLine < 0 )
1335
- m_HistoryFindInfo.m_nCurrentLine = 0 ;
1336
- }
1337
- else
1338
- m_inputcount++;
1339
- m_msgList.AddTail (str);
1340
- m_last_command = str;
1342
+ m_msgList.RemoveHead (); // keep max of "m_nHistoryLines" previous commands
1343
+ m_HistoryFindInfo.m_nCurrentLine --; // adjust for a "find again"
1344
+ if (m_HistoryFindInfo.m_nCurrentLine < 0 )
1345
+ m_HistoryFindInfo.m_nCurrentLine = 0 ;
1341
1346
}
1342
- }
1343
-
1344
- }
1347
+ else
1348
+ m_inputcount++;
1349
+ m_msgList.AddTail (str);
1350
+ m_last_command = str;
1351
+ } // end command different
1352
+ } // end if save deleted command
1345
1353
1346
1354
return false ;
1347
1355
}
0 commit comments