Skip to content

Commit

Permalink
Merge 4a9212e into 08298ea
Browse files Browse the repository at this point in the history
  • Loading branch information
beru authored Sep 22, 2019
2 parents 08298ea + 4a9212e commit bdc6cec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sakura_core/doc/CLineComment.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CLineComment
void CopyTo( const int n, const wchar_t* buffer, int nCommentPos ); // 行コメントデリミタをコピーする
bool Match( int nPos, const CStringRef& cStr ) const; // 行コメントに値するか確認する

const wchar_t* getLineComment( const int n ){
const wchar_t* getLineComment( const int n ) const{
return m_pszLineComment[n];
}
int getLineCommentPos( const int n ) const {
Expand Down
21 changes: 19 additions & 2 deletions sakura_core/view/colors/CColor_Comment.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,18 @@ class CColor_LineComment : public CColorStrategy{
virtual void InitStrategyStatus(){}
virtual bool BeginColor(const CStringRef& cStr, int nPos);
virtual bool EndColor(const CStringRef& cStr, int nPos);
virtual bool Disp() const { return m_pTypeData->m_ColorInfoArr[COLORIDX_COMMENT].m_bDisp; }
virtual bool Disp() const {
// タイプ別設定 『カラー』プロパティのコメントのリストアイテムのチェックが付いているか
if (!m_pTypeData->m_ColorInfoArr[COLORIDX_COMMENT].m_bDisp)
return false;
// 行型コメントの始点記号が入力されているか
auto& lineComment = m_pTypeData->m_cLineComment;
for (int i = 0; i < COMMENT_DELIMITER_NUM; ++i) {
if (lineComment.getLineComment(i)[0])
return true;
}
return false;
}
};

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
Expand All @@ -57,7 +68,13 @@ class CColor_BlockComment : public CColorStrategy{
virtual void InitStrategyStatus(){ m_nCOMMENTEND = 0; }
virtual bool BeginColor(const CStringRef& cStr, int nPos);
virtual bool EndColor(const CStringRef& cStr, int nPos);
virtual bool Disp() const { return m_pTypeData->m_ColorInfoArr[COLORIDX_COMMENT].m_bDisp; }
virtual bool Disp() const {
// タイプ別設定 『カラー』プロパティのコメントのリストアイテムのチェックが付いているか
if (!m_pTypeData->m_ColorInfoArr[COLORIDX_COMMENT].m_bDisp)
return false;
// ブロック型の始点・終端記号が入力されているか
return m_pcBlockComment->getBlockFromLen() > 0 && m_pcBlockComment->getBlockToLen() > 0;
}
private:
EColorIndexType m_nType;
const CBlockComment* m_pcBlockComment;
Expand Down

0 comments on commit bdc6cec

Please sign in to comment.