Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9598 → Rev 9599

/programs/develop/cedit/CEDIT
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/develop/cedit/SRC/CEdit.ob07
28,7 → 28,7
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar;
 
CONST
HEADER = "CEdit (05-jan-2022)";
HEADER = "CEdit (08-jan-2022)";
 
ShellFilter = "";
EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON";
404,6 → 404,8
CheckBox.paint(WH);
END;
 
G.SetColor(canvas, K.borderColor);
G.VLine(canvas, 0, 0, canvas.height - 1);
G.DrawCanvas(canvas, LEFT, TOP);
NotFound;
Replaced;
1952,7 → 1954,7
fileName, filePath: RW.tFileName;
width, height, cliWidth, cliHeight: INTEGER;
resized: BOOLEAN;
firstClickX, firstClickY, time: INTEGER;
firstClickX, firstClickY, time, blink: INTEGER;
BEGIN
header := "";
K.GetSystemColors;
2066,11 → 2068,17
K.SetEventsMask({0, 1, 2, 5, 6, 31});
Menu.init(resetTimer);
draw_window;
blink := Ini.blink;
IF blink <= 0 THEN
blink := 0
ELSIF blink < 30 THEN
blink := 30
END;
timerEnabled := TRUE;
CursorTime := K.GetTickCount();
WHILE TRUE DO
CurrentTime := K.GetTickCount();
IF (CurrentTime - CursorTime > Ini.blink) & timerEnabled THEN
IF (CurrentTime - CursorTime > blink) & (blink > 0) & timerEnabled THEN
CursorTime := CurrentTime;
T.toggleCursor;
repaint
/programs/develop/cedit/SRC/Clipboard.ob07
49,7 → 49,7
ptr, pchar: INTEGER;
wch: WCHAR;
BEGIN
cnt := bufSize(buffer) DIV 2;
cnt := bufSize(buffer) DIV SYSTEM.SIZE(WCHAR);
size := cnt + 12;
a := KOSAPI.malloc(size);
ASSERT(a # 0);
/programs/develop/cedit/SRC/Ini.ob07
151,11 → 151,6
BEGIN
Lines.setTabs(get_int(IniFileName, "settings", "tab", 4));
blink := get_int(IniFileName, "settings", "blink", 70);
IF blink = 0 THEN
blink := -1
ELSE
blink := MIN(MAX(blink, 1), 1000)
END;
getStr("settings", "build", build);
getStr("settings", "run", run);
getStr("settings", "debug", debug)
/programs/develop/cedit/SRC/Lines.ob07
497,7 → 497,10
_tab := 4
END;
tabs := _tab > 0;
tab := ABS(_tab)
tab := ABS(_tab);
IF tab > 32 THEN
tab := 32
END
END setTabs;
 
 
/programs/develop/cedit/SRC/Text.ob07
26,7 → 26,6
RW, Search,
E := Encodings,
CB := Clipboard,
K := KolibriOS,
ChangeLog, File,
Lang := Languages;
 
75,7 → 74,6
enc, eol: INTEGER;
table: Search.IdxTable;
foundList: List.tList;
idxData: Search.tBuffer;
foundSel: INTEGER;
searchText: tString;
chLog*: ChangeLog.tLog;
818,7 → 816,7
END leadingSpaces;
 
 
PROCEDURE plain (text: tText; eot: BOOLEAN): CB.tBuffer;
PROCEDURE plain (text: tText): CB.tBuffer;
VAR
buf: CB.tBuffer;
size: INTEGER;
834,10 → 832,7
INC(size, CB.lenEOL)
END
END;
IF eot THEN
INC(size, 2)
END;
buf := CB.create(size);
buf := CB.create(size + 2);
line := text.first(tLine);
WHILE line # NIL DO
CB.append(buf, line, 0, line.length - 1);
846,9 → 841,8
CB.eol(buf)
END
END;
IF eot THEN
CB.appends(buf, 0X + 0X, 0, 1)
END
CB.appends(buf, 0X, 0, 0);
CB.appends(buf, 0X, 0, 0)
RETURN buf
END plain;
 
857,9 → 851,11
VAR
pos: List.tItem;
res: BOOLEAN;
plainText: Search.tBuffer;
plainText, idxData: Search.tBuffer;
BEGIN
res := TRUE;
plainText := NIL;
idxData := NIL;
WHILE text.foundList.count # 0 DO
pos := List.pop(text.foundList);
DISPOSE(pos)
871,15 → 867,13
U.upcase16(text.searchText)
END;
IF text.searchText # "" THEN
plainText := plain(text, TRUE);
text.idxData := Search.index(plainText, text.table, cs);
plainText := plain(text);
idxData := Search.index(plainText, text.table, cs);
Search.find(plainText, text.table, text.searchText, whole, text.foundList);
res := text.foundList.count > 0
ELSE
res := TRUE
END;
CB.destroy(plainText);
CB.destroy(text.idxData);
CB.destroy(idxData);
text.search := FALSE;
text.foundSel := 0
RETURN res
1537,7 → 1531,7
DEC(n)
END;
 
buffer := CB.create(cnt);
buffer := CB.create(cnt + 2); (* +2 wchars EOT *)
 
n := selEnd.Y - selBeg.Y;
line := first;
2343,9 → 2337,7
 
IF drawCursor THEN
cursor(text)
END;
G.SetColor(canvas, K.borderColor);
G.VLine(canvas, 0, 0, size.Y - 1);
END
END draw;
 
 
2380,7 → 2372,6
text.whole := FALSE;
text.numbers := TRUE;
text.guard := TRUE;
text.idxData := NIL;
text.edition := NIL;
text.foundList := List.create(NIL);
text.searchText := "";