Skip to content

Commit e399bd8

Browse files
committed
Fix stderr reporting when special cursor line isn't found
An easy way to reproduce this issue is to run the plugin with an old version of pasfmt from before the `--cursor` option was added. In this case it will tell you an error occurred but won't be able to tell you anything about it.
1 parent ccd755c commit e399bd8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
* Ignore formatting requests for files without matching file extensions (pas, dpr, dpk, inc).
13+
* Fix error logging when cursor metadata is not parsed correctly.
1314

1415
### Changed
1516

Pasfmt.FormatCore.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function ExtractCursorTag(Data: string; out TagValue: string): string;
3939
StartPos: Integer;
4040
EndPos: Integer;
4141
begin
42+
Result := Data;
4243
TagPos := System.Pos(CTag, Data);
4344
if TagPos > 0 then begin
4445
StartPos := TagPos + Length(CTag);

0 commit comments

Comments
 (0)