From: <ct...@us...> - 2011-09-12 15:32:11
|
Revision: 1795 http://colorer.svn.sourceforge.net/colorer/?rev=1795&view=rev Author: ctapmex Date: 2011-09-12 15:32:05 +0000 (Mon, 12 Sep 2011) Log Message: ----------- fore for whitespace Modified Paths: -------------- trunk/far3colorer/changelog trunk/far3colorer/history.ru.txt trunk/far3colorer/src/FarEditor.cpp trunk/far3colorer/src/FarEditor.h Modified: trunk/far3colorer/changelog =================================================================== --- trunk/far3colorer/changelog 2011-09-12 10:45:51 UTC (rev 1794) +++ trunk/far3colorer/changelog 2011-09-12 15:32:05 UTC (rev 1795) @@ -1,5 +1,10 @@ $Revision$ $Author$ $Date$ + 1. при отображении в редакторе символов пробела/табуляции им задавался + разный цвет. + +#Revision: 1794 + #Author: ctapmex Date: 2011-09-12 16:45:51 +0600 (Пн, 12 сен 2011) 1. откат 1792.1 - не нужны опции . всегда рисуем правильный крест 2. ошибка отображения креста в 1792 Modified: trunk/far3colorer/history.ru.txt =================================================================== --- trunk/far3colorer/history.ru.txt 2011-09-12 10:45:51 UTC (rev 1794) +++ trunk/far3colorer/history.ru.txt 2011-09-12 15:32:05 UTC (rev 1795) @@ -1,8 +1,8 @@ \xC8\xF1\xF2\xEE\xF0\xE8\xFF \xE8\xE7\xEC\xE5\xED\xE5\xED\xE8\xE9 FarColorer. \xC8\xED\xF4\xEE\xF0\xEC\xE0\xF6\xE8\xFE, \xEE\xE1 \xE8\xE7\xEC\xE5\xED\xE5\xED\xE8\xFF\xF5 \xE2 \xE1\xE8\xE1\xEB\xE8\xEE\xF2\xE5\xEA\xE5 \xF1\xF5\xE5\xEC (\xE1\xE0\xE7\xE0\xF5) \xF1\xEC\xEE\xF2\xF0\xE8\xF2\xE5 \xE2 \xF4\xE0\xE9\xEB\xE5 hrc\CHANGELOG -\xC2\xE5\xF0\xF1\xE8\xFF 1.0.3.5 beta . 05.09.2011 - 1. \xCF\xEB\xE0\xE3\xE8\xED \xE0\xE4\xE0\xEF\xF2\xE8\xF0\xE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\xFF\xF6\xE8\xE8. + 9. \xEF\xF0\xE8 \xEE\xF2\xEE\xE1\xF0\xE0\xE6\xE5\xED\xE8\xE8 \xE2 \xF0\xE5\xE4\xE0\xEA\xF2\xEE\xF0\xE5 \xF1\xE8\xEC\xE2\xEE\xEB\xEE\xE2 \xEF\xF0\xEE\xE1\xE5\xEB\xE0/\xF2\xE0\xE1\xF3\xEB\xFF\xF6\xE8\xE8 \xE8\xEC \xE7\xE0\xE4\xE0\xE2\xE0\xEB\xF1\xFF + \xF0\xE0\xE7\xED\xFB\xE9 \xF6\xE2\xE5\xF2 \xC2\xE5\xF0\xF1\xE8\xFF 1.0.3.4 . 04.07.2011 1. \xEE\xF2\xEA\xE0\xF2 "\xED\xE0 \xED\xE5\xEA\xEE\xF2\xEE\xF0\xFB\xF5 \xF1\xF5\xE5\xEC\xE0\xF5 \xE2 far \xEF\xE5\xF0\xE5\xE4\xE0\xE2\xE0\xEB\xE0\xF1\xFC \xEB\xE8\xF8\xED\xFF\xFF \xF6\xE2\xE5\xF2\xEE\xE2\xE0\xFF \xE7\xEE\xED\xE0" - \xE4\xEB\xFF \xF1\xF5\xE5\xEC \xF2\xE8\xEF\xE0 php Modified: trunk/far3colorer/src/FarEditor.cpp =================================================================== --- trunk/far3colorer/src/FarEditor.cpp 2011-09-12 10:45:51 UTC (rev 1794) +++ trunk/far3colorer/src/FarEditor.cpp 2011-09-12 15:32:05 UTC (rev 1795) @@ -526,6 +526,7 @@ egs.StringNumber = lno; info->EditorControl(CurrentEditor, ECTL_GETSTRING, NULL, &egs); int llen = egs.StringLength; + DString s = DString(egs.StringText); //position previously found a column in the current row ecp_cl.StringNumber = lno; ecp_cl.SrcPos = ecp.DestPos; @@ -541,37 +542,54 @@ if (l1->start > ei.LeftPos+ei.WindowSizeX) continue; if (l1->end != -1 && l1->end < ei.LeftPos-ei.WindowSizeX) continue; - FarColor col = convert(l1->styled()); - int lend = l1->end; if (lend == -1){ lend = fullBackground ? ei.LeftPos+ei.WindowSizeX : llen; } - - //horizontal cross - if (lno == ei.CurLine && showHorizontalCross){ - col.BackgroundColor=horzCrossColor.BackgroundColor; - if (crossZOrder!=0){ - col.ForegroundColor=horzCrossColor.ForegroundColor; - } - addFARColor(lno, l1->start, lend, col, 0); - }else - addFARColor(lno, l1->start, lend, col); - - // vertical cross - if (showVerticalCross && l1->start <= ecp_cl.DestPos && ecp_cl.DestPos < lend){ - col.BackgroundColor=vertCrossColor.BackgroundColor; - if (crossZOrder!=0){ - col.ForegroundColor=vertCrossColor.ForegroundColor; - } - addFARColor(lno, ecp_cl.DestPos, ecp_cl.DestPos+1, col); - }; - if (lno == ei.CurLine && (l1->start <= ei.CurPos) && (ei.CurPos <= lend)){ delete cursorRegion; cursorRegion = new LineRegion(*l1); }; + FarColor col = convert(l1->styled()); + // remove the front in color whitespaces to display correctly in the far hidden characters (tab, space) + int j=l1->start; + int start,end; + bool whitespace=false; + while (j<lend){ + FarColor col1=col; + start = j; + if (egs.StringText[j]==L' ' || egs.StringText[j]==L'\t'){ + while ((j<=llen)&&(j<lend)&&(egs.StringText[j]==L' ' || egs.StringText[j]==L'\t')) j++; + end = j>=llen ? lend : j; + whitespace=true; + }else{ + while ((j<=llen)&&(j<lend)&&(egs.StringText[j]!=L' ' && egs.StringText[j]!=L'\t')) j++; + end = j>=llen ? lend : j; + whitespace=false; + } + + if (whitespace) col1.ForegroundColor=rdBackground->fore; + //horizontal cross + if (lno == ei.CurLine && showHorizontalCross){ + col1.BackgroundColor=horzCrossColor.BackgroundColor; + if (crossZOrder!=0 && !whitespace){ + col1.ForegroundColor=horzCrossColor.ForegroundColor; + } + addFARColor(lno, start, end, col1); + }else + addFARColor(lno, start, end, col1); + + // vertical cross + if (showVerticalCross && start <= ecp_cl.DestPos && ecp_cl.DestPos < end){ + col1.BackgroundColor=vertCrossColor.BackgroundColor; + if (crossZOrder!=0 && !whitespace){ + col1.ForegroundColor=vertCrossColor.ForegroundColor; + } + addFARColor(lno, ecp_cl.DestPos, ecp_cl.DestPos+1, col1,ECF_TABMARKCURRENT); + }; + j = end; + } }; }else{ // cross at the show is off the drawSyntax Modified: trunk/far3colorer/src/FarEditor.h =================================================================== --- trunk/far3colorer/src/FarEditor.h 2011-09-12 10:45:51 UTC (rev 1794) +++ trunk/far3colorer/src/FarEditor.h 2011-09-12 15:32:05 UTC (rev 1795) @@ -157,7 +157,7 @@ bool foreDefault(FarColor col); bool backDefault(FarColor col); void showOutliner(Outliner *outliner); - void addFARColor(int lno, int s, int e, FarColor col, EDITORCOLORFLAGS TabMarkStyle=ECF_TABMARKCURRENT); + void addFARColor(int lno, int s, int e, FarColor col, EDITORCOLORFLAGS TabMarkStyle=0); void deleteFarColor(int lno, int s); const wchar_t *GetMsg(int msg); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |