, m_bAutoMerged(false)
, m_nGroups(0)
, m_pView{nullptr}
+, m_bAutomaticRescan(false)
{
DIFFOPTIONS options = {0};
}
m_bEnableRescan = true;
+ m_bAutomaticRescan = GetOptionsMgr()->GetBool(OPT_AUTOMATIC_RESCAN);
+
// COleDateTime m_LastRescan
curUndo = undoTgt.begin();
m_nDiffContext = GetOptionsMgr()->GetInt(OPT_DIFF_CONTEXT);
{
DIFFOPTIONS options = {0};
+ m_bAutomaticRescan = GetOptionsMgr()->GetBool(OPT_AUTOMATIC_RESCAN);
+
m_diffWrapper.SetDetectMovedBlocks(GetOptionsMgr()->GetBool(OPT_CMP_MOVED_BLOCKS));
Options::DiffOptions::Load(GetOptionsMgr(), options);
}
std::optional<bool> GetEnableTableEditing() const { return m_bEnableTableEditing; }
void SetEnableTableEditing(std::optional<bool> bEnableTableEditing) { m_bEnableTableEditing = bEnableTableEditing; }
+ bool GetAutomaticRescan() const { return m_bAutomaticRescan; }
// implementation methods
private:
bool m_bHasSyncPoints;
bool m_bAutoMerged;
std::optional<bool> m_bEnableTableEditing;
+ /**
+ * Are automatic rescans enabled?
+ * If automatic rescans are enabled then we rescan files after edit
+ * events, unless timer suppresses rescan. We suppress rescans within
+ * certain time from previous rescan.
+ */
+ bool m_bAutomaticRescan;
// friend access
friend class RescanSuppress;
, m_nThisGroup(0)
, m_bDetailView(false)
, m_piMergeEditStatus(nullptr)
-, m_bAutomaticRescan(false)
, fTimerWaitingForIdle(0)
, m_lineBegin(0)
, m_lineEnd(-1)
pDoc->UpdateHeaderPath(m_nThisPane);
// If automatic rescan enabled, rescan after edit events
- if (m_bAutomaticRescan)
+ if (pDoc->GetAutomaticRescan())
{
// keep document up to date
// (Re)start timer to rescan only when user edits text
RENDERING_MODE nRenderingMode = static_cast<RENDERING_MODE>(GetOptionsMgr()->GetInt(OPT_RENDERING_MODE));
SetRenderingMode(nRenderingMode);
- m_bAutomaticRescan = GetOptionsMgr()->GetBool(OPT_AUTOMATIC_RESCAN);
-
if (GetOptionsMgr()->GetInt(OPT_TAB_TYPE) == 0)
SetInsertTabs(true);
else
SetTopMargin(false);
}
- // Enable/disable automatic rescan (rescanning after edit)
- EnableRescan(GetOptionsMgr()->GetBool(OPT_AUTOMATIC_RESCAN));
-
// SetTextType will revert to language dependent defaults for tab
SetTabSize(GetOptionsMgr()->GetInt(OPT_TAB_SIZE));
SetViewTabs(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE));
IMergeEditStatus * m_piMergeEditStatus; /**< interface to status bar */
protected:
- /**
- * Are automatic rescans enabled?
- * If automatic rescans are enabled then we rescan files after edit
- * events, unless timer suppresses rescan. We suppress rescans within
- * certain time from previous rescan.
- */
- bool m_bAutomaticRescan;
/// first line of diff (first displayable line)
int m_lineBegin;
/// last line of diff (last displayable line)
// Operations
public:
void RefreshOptions();
- bool EnableRescan(bool bEnable);
bool IsReadOnly(int pane) const;
void ShowDiff(bool bScroll, bool bSelectText);
virtual void OnEditOperation(int nAction, LPCTSTR pszText, size_t cchText) override;
#endif
/**
- * @brief Enable/Disable automatic rescanning
- */
-inline bool CMergeEditView::EnableRescan(bool bEnable)
-{
- bool bOldValue = m_bAutomaticRescan;
- m_bAutomaticRescan = bEnable;
- return bOldValue;
-}
-
-/**
* @brief Check if cursor is inside difference.
* @return true if cursor is inside difference.
*/