CEdit: bugfix
git-svn-id: svn://kolibrios.org@9834 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
98c8bda617
commit
cc0d0d49e0
Binary file not shown.
@ -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 (17-may-2022)";
|
HEADER = "CEdit (09-jun-2022)";
|
||||||
|
|
||||||
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";
|
||||||
@ -186,7 +186,7 @@ VAR
|
|||||||
OD: OpenDlg.Dialog;
|
OD: OpenDlg.Dialog;
|
||||||
confirm, notFound, menuFindClicked, search, searchOpened: BOOLEAN;
|
confirm, notFound, menuFindClicked, search, searchOpened: BOOLEAN;
|
||||||
|
|
||||||
switch, closing: BOOLEAN;
|
switch, closing, newtab: BOOLEAN;
|
||||||
leftButton: BOOLEAN;
|
leftButton: BOOLEAN;
|
||||||
LEFT, RIGHT, BOTTOM: INTEGER;
|
LEFT, RIGHT, BOTTOM: INTEGER;
|
||||||
|
|
||||||
@ -761,26 +761,29 @@ END getFileNum;
|
|||||||
|
|
||||||
PROCEDURE SwitchTab (n: INTEGER);
|
PROCEDURE SwitchTab (n: INTEGER);
|
||||||
BEGIN
|
BEGIN
|
||||||
curText := n;
|
curText := n;
|
||||||
Tabs.switch(tabs, n);
|
Tabs.switch(tabs, n);
|
||||||
Switch(texts[n]);
|
Switch(texts[n]);
|
||||||
resetTimer;
|
resetTimer;
|
||||||
draw_window
|
IF ~newtab THEN
|
||||||
|
draw_window
|
||||||
|
END
|
||||||
END SwitchTab;
|
END SwitchTab;
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE NewFile;
|
PROCEDURE NewFile;
|
||||||
VAR
|
VAR
|
||||||
nov: T.tText;
|
nov: T.tText;
|
||||||
BEGIN
|
BEGIN
|
||||||
IF textsCount < maxTexts THEN
|
IF textsCount < maxTexts THEN
|
||||||
nov := T.New();
|
nov := T.New();
|
||||||
T.SetPos(nov, 0, 0);
|
T.SetPos(nov, 0, 0);
|
||||||
insert(textsCount, nov);
|
insert(textsCount, nov);
|
||||||
SwitchTab(curText)
|
newtab := TRUE;
|
||||||
ELSE
|
SwitchTab(curText)
|
||||||
error("too many files")
|
ELSE
|
||||||
END
|
error("too many files")
|
||||||
|
END
|
||||||
END NewFile;
|
END NewFile;
|
||||||
|
|
||||||
|
|
||||||
@ -2082,6 +2085,7 @@ BEGIN
|
|||||||
debugScript := Ini.debugScript;
|
debugScript := Ini.debugScript;
|
||||||
leftButton := FALSE;
|
leftButton := FALSE;
|
||||||
resized := FALSE;
|
resized := FALSE;
|
||||||
|
newtab := FALSE;
|
||||||
K.ScreenSize(winWidth, winHeight);
|
K.ScreenSize(winWidth, winHeight);
|
||||||
scrollWidth := winHeight DIV 35;
|
scrollWidth := winHeight DIV 35;
|
||||||
winWidth := (winWidth*80) DIV 100 - (128 + 30);
|
winWidth := (winWidth*80) DIV 100 - (128 + 30);
|
||||||
@ -2240,6 +2244,10 @@ BEGIN
|
|||||||
scr := K.Scroll()
|
scr := K.Scroll()
|
||||||
END
|
END
|
||||||
|7: receiveIPC
|
|7: receiveIPC
|
||||||
|
END;
|
||||||
|
IF newtab THEN
|
||||||
|
Redraw(resized, width, height, cliWidth, cliHeight);
|
||||||
|
newtab := FALSE
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
END main;
|
END main;
|
||||||
|
Loading…
Reference in New Issue
Block a user