View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023957 | FPC | Textmode IDE | public | 2013-02-26 07:05 | 2014-03-04 17:02 |
Reporter | AlexL | Assigned To | Pierre Muller | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 only | OS | linux | ||
Product Version | 2.6.2 | ||||
Target Version | 2.7.1 | Fixed in Version | 2.6.4 | ||
Summary | 0023957: Incorrect procedure TIndicator.Draw for x86_64 | ||||
Description | procedure TIndicator.Draw for x86_64 shows incorrect counter for position of cursor. Patch is in attachment. | ||||
Tags | patch | ||||
Fixed in Revision | 25016 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
has duplicate | 0023956 | closed | Marco van de Voort | Incorrect display of the cursor in the window edit code. |
|
|
|
indicator_draw_x86_64.patch (687 bytes)
--- ./ide/wcedit.pas.orig 2008-07-21 01:37:48.000000000 +0400 +++ ./ide/wcedit.pas 2013-02-26 09:47:48.426075567 +0400 @@ -777,6 +777,7 @@ L: array[0..1] of Longint; S: String[15]; B: TDrawBuffer; + K: String; begin if assigned(CodeOwner) and (CodeOwner^.ELockFlag>0) then @@ -812,7 +813,13 @@ {$endif debug} L[0] := Location.Y + 1; L[1] := Location.X + 1; - FormatStr(S, ' %d:%d ', L); +// FormatStr(S, ' %d:%d ', L); + Str(L[0],S); + if Length(S)<6 then S:=' '+S; + S:=S+':'; + Str(L[1],K); + if Length(K)<3 then K:=K+' '; + S:=S+K; MoveStr(B[8 - Pos(':', S)], S, Color); end; WriteBuf(0, 0, Size.X, 1, B); |
|
tindicator_draw-x86_64.patch (597 bytes)
--- a/ide/wcedit.pas 2013-02-26 11:34:42.000196261 +0400 +++ b/ide/wcedit.pas 2013-02-26 11:35:26.355006175 +0400 @@ -774,7 +774,7 @@ var Color: Byte; Frame: Char; - L: array[0..1] of Longint; + L: array[0..1] of Pointer; S: String[15]; B: TDrawBuffer; begin @@ -810,8 +810,8 @@ if UseTabs then WordRec(B[3]).lo := ord('T'); {$endif debug} - L[0] := Location.Y + 1; - L[1] := Location.X + 1; + L[0] := Pointer(Location.Y + 1); + L[1] := Pointer(Location.X + 1); FormatStr(S, ' %d:%d ', L); MoveStr(B[8 - Pos(':', S)], S, Color); end; |
|
IMHO, using Ponter type with Pointer(...) typecast is more simple in this case. See tindicator_draw-x86_64.patch. |
|
Hm, as I can see PtrInt type is more accurate replacement for LongInt as procedure FormatStr (Var Result: String; CONST Format: String; Var Params); from packages/fv/src/drivers.pas accesses Params parameter with typecast to array of PtrInt_s via TLongArray(Params)[I] where TLongArray = Array[0..0] Of PtrInt; So, I upload tindicator_draw-x86_64-2.patch. |
|
tindicator_draw-x86_64-2.patch (594 bytes)
--- a/ide/wcedit.pas 2013-02-26 11:34:42.000196261 +0400 +++ b/ide/wcedit.pas 2013-02-26 12:59:01.948875133 +0400 @@ -774,7 +774,7 @@ var Color: Byte; Frame: Char; - L: array[0..1] of Longint; + L: array[0..1] of PtrInt; S: String[15]; B: TDrawBuffer; begin @@ -810,8 +810,8 @@ if UseTabs then WordRec(B[3]).lo := ord('T'); {$endif debug} - L[0] := Location.Y + 1; - L[1] := Location.X + 1; + L[0] := PtrInt(Location.Y + 1); + L[1] := PtrInt(Location.X + 1); FormatStr(S, ' %d:%d ', L); MoveStr(B[8 - Pos(':', S)], S, Color); end; |
|
0023956 http://mantis.freepascal.org/view.php?id=23956 is the same as indicator_draw_x86_64.patch |
|
Could you confirm that commit rev 23704 fixes the problem? If so, you may close the bug report. Thanks in advance. Pierre Muller |
|
Tested with my freebsd/x86_64, seems resolved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-26 07:05 | AlexL | New Issue | |
2013-02-26 07:05 | AlexL | File Added: b369bfd0d2ac.png | |
2013-02-26 07:05 | AlexL | File Added: indicator_draw_x86_64.patch | |
2013-02-26 08:39 | Serg Bormant | File Added: tindicator_draw-x86_64.patch | |
2013-02-26 08:41 | Serg Bormant | Note Added: 0065890 | |
2013-02-26 08:42 | Serg Bormant | Note Edited: 0065890 | View Revisions |
2013-02-26 08:42 | Serg Bormant | Note Edited: 0065890 | View Revisions |
2013-02-26 10:07 | Serg Bormant | Note Added: 0065892 | |
2013-02-26 10:08 | Serg Bormant | File Added: tindicator_draw-x86_64-2.patch | |
2013-02-26 10:12 | Serg Bormant | Note Edited: 0065892 | View Revisions |
2013-02-26 10:13 | Serg Bormant | Note Edited: 0065892 | View Revisions |
2013-02-27 10:44 | Serg Bormant | Note Added: 0065920 | |
2013-02-27 11:41 |
|
Relationship added | has duplicate 0023956 |
2013-03-01 12:03 | Serg Bormant | Tag Attached: patch | |
2013-03-07 14:57 | Pierre Muller | Note Added: 0066091 | |
2013-03-07 14:57 | Pierre Muller | Assigned To | => Pierre Muller |
2013-03-07 14:57 | Pierre Muller | Status | new => feedback |
2013-03-07 14:57 | Pierre Muller | Target Version | => 2.7.1 |
2013-03-07 21:52 | Marco van de Voort | Fixed in Revision | => 23704 |
2013-03-07 21:52 | Marco van de Voort | Note Added: 0066103 | |
2013-03-07 21:52 | Marco van de Voort | Status | feedback => resolved |
2013-03-07 21:52 | Marco van de Voort | Resolution | open => fixed |
2014-03-04 17:02 | Jonas Maebe | Fixed in Revision | 23704 => 25016 |
2014-03-04 17:02 | Jonas Maebe | Fixed in Version | => 2.6.4 |