-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(developer): handle line breaks in debugger correctly #13334
base: chore/add-build-edit-action-for-delphi-projects
Are you sure you want to change the base?
fix(developer): handle line breaks in debugger correctly #13334
Conversation
The debugger memo takes input with \n but internally represents this as \r\n, so we need to strip out \r in order to track caret position correctly. Fixes: #13292
User Test ResultsTest specification and instructions Test Artifacts
|
case BackspaceType of | ||
KM_CORE_BT_MARKER: | ||
begin | ||
Assert(m >= 1, AssertionMessage); | ||
Assert(memo.Text[m] = #$FFFC, AssertionMessage); | ||
Assert(m <= t.Length, AssertionMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional safety check
begin | ||
n := 0; | ||
SetLength(Result, Length(Memo.Text)+1); | ||
t := Memo.GetTextCR; | ||
SetLength(Result, t.Length+1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failed with
debug\Keyman.System.Debug.DebugUtils.pas(26): error E2018: Record, object or class type required
debug\Keyman.System.Debug.DebugUtils.pas(31): error E2018: Record, object or class type required
child\UfrmDebug.pas(37): error F2063: Could not compile used unit 'Keyman.System.Debug.DebugUtils.pas'
Is this?
SetLength(Result, t.Length+1); | |
SetLength(Result, Length(t) + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed this by using System.SysUtils (missed from the selective commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Test ResultsI tested this issue with the attached KeymanDeveloper"18.0.198-beta-test-13334" build(24/02/2025) on Windows 10. Here I am sharing my observation.
|
The debugger memo takes input with \n but internally represents this as \r\n, so we need to strip out \r in order to track caret position correctly.
Fixes: #13292
User Testing