diff --git a/sources/appl/Buffer/BufferText.cpp b/sources/appl/Buffer/BufferText.cpp index bab64e6..bd64fd0 100644 --- a/sources/appl/Buffer/BufferText.cpp +++ b/sources/appl/Buffer/BufferText.cpp @@ -405,8 +405,8 @@ int32_t BufferText::Display(ewol::Text& OOText, if (currentChar!='\n') { selectColor = myColor; HLColor = m_EdnBuf.GetElementColorAtPosition(m_displayLocalSyntax, iii); - if (NULL != HLColor) { - if (NULL != HLColor->patern) { + if (HLColor != NULL) { + if (HLColor->patern != NULL) { selectColor = HLColor->patern->GetColor(); } } @@ -419,12 +419,12 @@ int32_t BufferText::Display(ewol::Text& OOText, OOText.SetColorBg(selectColor->GetBG() ); } else { if(false == selectColor->HaveBg()) { - if( (uniChar_t)' ' == currentChar - && true == globals::IsSetDisplaySpaceChar() ) + if( currentChar == ' ' + && globals::IsSetDisplaySpaceChar() == true ) { OOText.SetColorBg(myColorSpace); - } else if( '\t' == currentChar - && true == globals::IsSetDisplayTabChar() ) + } else if( currentChar == '\t' + && globals::IsSetDisplayTabChar() == true ) { OOText.SetColorBg(myColorTab); } @@ -484,6 +484,13 @@ int32_t BufferText::Display(ewol::Text& OOText, OOText.SetColorBg(ColorizeManager::Get(COLOR_CODE_CURSOR)); OOText.PrintCursor(ewol::GetCurrentSpecialKeyStatus().IsSetInsert()); } + // Display the 80 colomn limit line : + + OOText.SetClippingMode(false); + OOText.GetDrawing().SetThickness(2); + OOText.GetDrawing().SetColor(etk::Color<>(200,200,0,255)); + OOText.GetDrawing().SetPos(vec2((float)((nbColoneForLineNumber+80)*tmpLetterSize.x()), 0.0f)); + OOText.GetDrawing().LineRel(vec2(0.0f, 2500.0f)); // set the maximum size for the display ... SetMaximumSize(maxSize); int64_t stopTime2 = ewol::GetTime(); diff --git a/sources/appl/Buffer/EdnBuf/EdnBuf.cpp b/sources/appl/Buffer/EdnBuf/EdnBuf.cpp index 62bd29b..e932446 100644 --- a/sources/appl/Buffer/EdnBuf/EdnBuf.cpp +++ b/sources/appl/Buffer/EdnBuf/EdnBuf.cpp @@ -34,7 +34,8 @@ static const char *ControlCodeTable[32] = { */ EdnBuf::EdnBuf(void) { - m_tabDist = 4; + // TODO : Set it configurable !!! + m_tabDist = 8; m_useTabs = true; // Current selection @@ -501,7 +502,7 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_E } // Otherwise, just return the character - if (false ==m_isUtf8) { + if (m_isUtf8 == false) { convertIsoToUtf8(m_charsetType, c, outUTF8); pos++; } else { @@ -514,10 +515,10 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_E bool baseValid; unicode::Utf8_SizeElement(tmpString, 6 , size, baseValid); currentChar = 0; // TODO : Set UNICODE char ... - if (true == baseValid) { + if (baseValid == true) { char *tmp = outUTF8; - for (int32_t k=0; k