CEdit: minor fix

git-svn-id: svn://kolibrios.org@9906 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Anton Krotov 2023-03-05 21:40:21 +00:00
parent c682acbe2f
commit f8df2f2297
10 changed files with 367 additions and 367 deletions

Binary file not shown.

View File

@ -28,7 +28,7 @@ IMPORT
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar; RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar;
CONST CONST
HEADER = "CEdit (26-feb-2023)"; HEADER = "CEdit (06-mar-2023)";
ShellFilter = ""; ShellFilter = "";
EditFilter = "sh|inc|txt|asm|ob07|c|cpp|h|pas|pp|lua|ini|json"; EditFilter = "sh|inc|txt|asm|ob07|c|cpp|h|pas|pp|lua|ini|json";

View File

@ -1,5 +1,5 @@
(* (*
Copyright 2021, 2022 Anton Krotov Copyright 2021-2023 Anton Krotov
This file is part of CEdit. This file is part of CEdit.

View File

@ -28,6 +28,7 @@ CONST
TAB* = 9X; TAB* = 9X;
NUL* = 0FDD0X; NUL* = 0FDD0X;
TAB1* = 0FDD1X; TAB1* = 0FDD1X;
MAX_TAB_WIDTH* = 16;
TYPE TYPE
@ -540,8 +541,8 @@ BEGIN
END; END;
tabs := _tab > 0; tabs := _tab > 0;
tab := ABS(_tab); tab := ABS(_tab);
IF tab > 32 THEN IF tab > MAX_TAB_WIDTH THEN
tab := 32 tab := MAX_TAB_WIDTH
END END
END setTabs; END setTabs;

View File

@ -597,7 +597,7 @@ BEGIN
WHILE U.isDigit(Lines.getChar(line, i)) DO WHILE U.isDigit(Lines.getChar(line, i)) DO
INC(i) INC(i)
END; END;
IF Lines.getChar(line, i) = "E" THEN IF upper(Lines.getChar(line, i)) = "E" THEN
INC(i); INC(i);
IF (Lines.getChar(line, i) = "+") OR (Lines.getChar(line, i) = "-") THEN IF (Lines.getChar(line, i) = "+") OR (Lines.getChar(line, i) = "-") THEN
INC(i) INC(i)
@ -606,9 +606,9 @@ BEGIN
INC(i) INC(i)
END END
END END
ELSIF Lines.getChar(line, i) = "H" THEN ELSIF upper(Lines.getChar(line, i)) = "H" THEN
INC(i) INC(i)
ELSIF Lines.getChar(line, i) = "X" THEN ELSIF upper(Lines.getChar(line, i)) = "X" THEN
color := colors.string; color := colors.string;
INC(i) INC(i)
END END

View File

@ -1,5 +1,5 @@
(* (*
Copyright 2021, 2022 Anton Krotov Copyright 2021-2023 Anton Krotov
This file is part of CEdit. This file is part of CEdit.
@ -108,8 +108,8 @@ BEGIN
G.clear(canvas); G.clear(canvas);
G.SetColor(canvas, K.colors.line); G.SetColor(canvas, K.colors.line);
G.Rect(canvas, 0, 0, width - 1, height - 1); G.Rect(canvas, 0, 0, width - 1, height - 1);
IF scroll.vertical THEN
SetColor(canvas, scroll.btn # -1); SetColor(canvas, scroll.btn # -1);
IF scroll.vertical THEN
Rect(canvas, 0, 0, width - 1, btn - 1); Rect(canvas, 0, 0, width - 1, btn - 1);
SetColor(canvas, scroll.btn # 1); SetColor(canvas, scroll.btn # 1);
Rect(canvas, 0, height - btn, width - 1, height - 1); Rect(canvas, 0, height - btn, width - 1, height - 1);
@ -135,7 +135,6 @@ BEGIN
y := y + height - btn - d DIV 2 + 1; y := y + height - btn - d DIV 2 + 1;
G.Triangle(canvas, x1 - 1, y, x2, y, G.triDown); G.Triangle(canvas, x1 - 1, y, x2, y, G.triDown);
ELSE ELSE
SetColor(canvas, scroll.btn # -1);
Rect(canvas, 0, 0, btn - 1, height - 1); Rect(canvas, 0, 0, btn - 1, height - 1);
SetColor(canvas, scroll.btn # 1); SetColor(canvas, scroll.btn # 1);
Rect(canvas, width - btn, 0, width - 1, height - 1); Rect(canvas, width - btn, 0, width - 1, height - 1);