mirror of https://gitlab.com/basile.b/dexed.git
fix #5 - terminal, the current directory is not constrained on startup
This commit is contained in:
parent
a142f2f881
commit
293e89f4e5
|
@ -3,6 +3,7 @@
|
||||||
## Bugs fixed
|
## Bugs fixed
|
||||||
|
|
||||||
- Messages: force auto scrolling to bottom once and if the messages context is modified.
|
- Messages: force auto scrolling to bottom once and if the messages context is modified.
|
||||||
|
- Terminal: after launcging dexed, the current directory was not constrained even when the settings to follow the current project or document path were activated. (#5)
|
||||||
|
|
||||||
# v3.9.3
|
# v3.9.3
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ type
|
||||||
fLastCheckedDirectory: string;
|
fLastCheckedDirectory: string;
|
||||||
fDisableScrollBarSync: boolean;
|
fDisableScrollBarSync: boolean;
|
||||||
fNeedApplyChanges: boolean;
|
fNeedApplyChanges: boolean;
|
||||||
|
fPaintOnce: boolean;
|
||||||
procedure checkDirectory(const dir: string);
|
procedure checkDirectory(const dir: string);
|
||||||
procedure updateScrollBar();
|
procedure updateScrollBar();
|
||||||
procedure terminalTextScrolled(sender: TObject; delta: integer);
|
procedure terminalTextScrolled(sender: TObject; delta: integer);
|
||||||
|
@ -311,11 +312,22 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTermWidget.ContentPaint(Sender: TObject);
|
procedure TTermWidget.ContentPaint(Sender: TObject);
|
||||||
|
var
|
||||||
|
s: string;
|
||||||
begin
|
begin
|
||||||
if not fNeedApplyChanges then
|
if not fNeedApplyChanges then
|
||||||
exit;
|
exit;
|
||||||
fNeedApplyChanges:=false;
|
fNeedApplyChanges:=false;
|
||||||
fOpts.applyChanges;
|
fOpts.applyChanges;
|
||||||
|
// ugly fix for https://gitlab.com/basile.b/dexed/-/issues/5
|
||||||
|
if not fPaintOnce then
|
||||||
|
begin
|
||||||
|
s := fLastCheckedDirectory;
|
||||||
|
fLastCheckedDirectory := '';
|
||||||
|
if s.isNotEmpty then
|
||||||
|
checkDirectory(s);
|
||||||
|
end;
|
||||||
|
fPaintOnce := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTermWidget.terminalTextScrolled(sender: TObject; delta: integer);
|
procedure TTermWidget.terminalTextScrolled(sender: TObject; delta: integer);
|
||||||
|
|
Loading…
Reference in New Issue