View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003523 | JEDI VCL | 00 JVCL Components | public | 2006-02-20 00:35 | 2006-03-10 04:43 |
Reporter | Raid | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.10 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003523: TJvHLEditor: Templates don't position Caret right if on another line using '~' as the CRLF. | ||||
Description | Well I traced it down to JvEditor.pas, in TJvCompletion.ReplaceWord: You weren't expecting a 'one' char CRLF (or more than 2), because the reason it works with default "/n" is because it's 2 chars (0000013#10 = 2 chars), short story short, here's the fix: cmTemplates: begin S := ReplaceString(NewString, FCRLF, sLineBreak + SpacesW(CaretX - Length(W))); S := ReplaceString(S, FCaretChar, ''); W := ReplaceString(NewString, FCRLF, sLineBreak); NewCaret := Pos(FCaretChar, W) - 1; end; Sorry I used W string variable which wasn't used anymore in that function. Anyway, I didn't know if I should post the whole new JvEditor.pas in a zip file, or just this? I'm not sure, what do I do for next time? | ||||
Tags | No tags attached. | ||||
|
Fixed in CVS. If you attach the complete JvEditor.pas, I would have to do a diff to find your changes, because the CVS version meight have changed. So for small changes it is better to post them directly. |
|
Sorry it appears 'W' WAS in use, so I just changed it so it doesn't use any Temp strings at all. cmTemplates: begin S := ReplaceString(NewString, FCRLF, sLineBreak + SpacesW(CaretX - Length(W))); S := ReplaceString(S, FCaretChar, ''); NewCaret := Pos(FCaretChar, ReplaceString(NewString, FCRLF, sLineBreak) ) - 1; end; Sorry about that, it shouldn't cause problems now. I'll keep using other components and if I have bugs in them I'll fix em myself and submit em (Didn't know you guys liked that lol) |
|
Fixed in CVS. |
|
Hehe, sorry to bother you again about this, but it doesn't seem it was updated with my last fix, if you could please update it it'd be great! =) Thank you! =) |
|
That's the code in JvEditor.pas: begin S := ReplaceString(NewString, FCRLF, sLineBreak + Spaces(CaretX - Length(W))); S := ReplaceString(S, FCaretChar, ''); NewCaret := Pos(FCaretChar, ReplaceString(NewString, FCRLF, sLineBreak)) - 1; end; And that's the code in JvUnicodeEditor.pas: begin S := ReplaceString(NewString, FCRLF, sLineBreak + SpacesW(CaretX - Length(W))); S := ReplaceString(S, FCaretChar, ''); NewCaret := Pos(FCaretChar, ReplaceString(NewString, FCRLF, sLineBreak)) - 1; end; Where is the difference to your code? |
|
Everytime I do CVS update I get: cmTemplates: begin S := ReplaceString(NewString, FCRLF, sLineBreak + SpacesW(CaretX - Length(W))); S := ReplaceString(S, FCaretChar, ''); W := ReplaceString(NewString, FCRLF, sLineBreak); NewCaret := Pos(FCaretChar, W) - 1; end; And I know it's from CVS 'cause I deleted JvEditor.pas, and did a CVS update (using tortoise CVS), and that's the file that comes up. That is the file from dev\JVCL3\run, right? Am I doing something wrong? I could be, when I don't have Coffee in a day I'm like this =/ lol |
|
Are using HEAD or a special CVS tag? The file is in the HEAD tag. Maybe you have a CVS sticky JvEditor.pas. http://cvs.sourceforge.net/viewcvs.py/jvcl/dev/JVCL3/run/JvEditor.pas?rev=1.79&view=markup |
|
Sorry it might be possible I didn't think about that, I'll update all from HEAD sorry about the newbishness of CVS.. Kinda still new with it. :) |
|
Yep, I wasn't updating from HEAD, terribly sorry, thanks AHUser for your patience. =) |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-02-20 00:35 | Raid | New Issue | |
2006-02-20 06:14 | AHUser | Status | new => resolved |
2006-02-20 06:14 | AHUser | Resolution | open => fixed |
2006-02-20 06:14 | AHUser | Assigned To | => AHUser |
2006-02-20 06:14 | AHUser | Note Added: 0008575 | |
2006-02-20 19:16 | Raid | Status | resolved => feedback |
2006-02-20 19:16 | Raid | Resolution | fixed => reopened |
2006-02-20 19:16 | Raid | Note Added: 0008578 | |
2006-02-21 04:19 | AHUser | Status | feedback => resolved |
2006-02-21 04:19 | AHUser | Resolution | reopened => fixed |
2006-02-21 04:19 | AHUser | Note Added: 0008579 | |
2006-03-04 19:36 | Raid | Status | resolved => feedback |
2006-03-04 19:36 | Raid | Resolution | fixed => reopened |
2006-03-04 19:36 | Raid | Note Added: 0008627 | |
2006-03-09 17:01 | AHUser | Note Added: 0008636 | |
2006-03-09 19:03 | Raid | Note Added: 0008638 | |
2006-03-10 02:13 | AHUser | Note Added: 0008639 | |
2006-03-10 02:51 | Raid | Note Added: 0008644 | |
2006-03-10 03:37 | Raid | Note Added: 0008649 | |
2006-03-10 04:43 | AHUser | Status | feedback => resolved |
2006-03-10 04:43 | AHUser | Resolution | reopened => fixed |