apps/ircc: fix text formatting issues (#376) #392
Open
SumitKumar-17
wants to merge 2 commits from
SumitKumar-17/kolibrios:fix/376-irc-text-formatting into main
pull from: SumitKumar-17/kolibrios:fix/376-irc-text-formatting
merge into: KolibriOS:main
KolibriOS:main
KolibriOS:wolf3d-launcher
KolibriOS:icons-update
KolibriOS:kterm-upload
KolibriOS:app/socketdbg_fix1
KolibriOS:hdaudio-add-ring-buffer-for-unsolicied-events
KolibriOS:workflow-fuse
KolibriOS:add-license-file-header-to-guide
KolibriOS:blocks-add-models
KolibriOS:shell-improve-cpuid
KolibriOS:rewrite_ide_drv
KolibriOS:qrcodegen
KolibriOS:ci/update
KolibriOS:laser-tank-fix-win-height
KolibriOS:improvement/commit-and-branch-styles
KolibriOS:docs/libs
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
C
Category/Applications
Category/Drivers
Category/General
Category/Kernel
Category/Libraries
Eolite
FASM
FS
GSoC
HardwareTested
HLL
Influence/Settings
Influence/Text/TYPO
IRCC
Kernel
Pay for the code
This issue in GSoC program
Kind
Breaking
Breaking change that won't be backward compatible
Kind
Bug
Something is not working
Kind
Build
Kind
Documentation
Documentation changes
Kind
Enhancement
Improve existing functionality
Kind
Feature
New functionality
Kind
Security
This is security issue
Kind
Testing
Issue or pull request related to testing
Paid task
PR
Conflicts
PR conflicts with main
PR
Dependent
This PR is dependent on another PR
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
PR
Ready to merge
Pull request is ready for merge
PR
Request changes
Changes requested in pull request
PR
Review required
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: KolibriOS/kolibrios#392
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "SumitKumar-17/kolibrios:fix/376-irc-text-formatting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR Fixes
skip_parameterandwindow_openboth ate spaces after the trailing-param:. Now preserved per RFC 1459/2812.\x0F(format reset) ignoredPreviously a no-op, so the last
\x03color bled to end-of-line. Now resets to default in render and is zero-width in line-wrap.\x02bold,\x1Ditalic,\x1Funderline,\x16reverse, and mIRC\x03[fg[,bg]]args were each counted as a visible column, causing premature wrapping. All now zero-width, matching the renderer.\x03N,Nwas silently eaten by a.no_colorsfallthrough — nowjmp .line.\x03now resets to theme default instead of pickingirc_colors[0]by accident.text_nextlineis also called backwards during scroll-up — a DF check in.skip_coloravoidsesicorruption.skip_mirc_color_argsconsumes the exact same byte span as the renderer'sdec_to_esi, replacing two duplicated blocks.Remaining (out of scope)
Width accounting is fixed so wrapping is correct, but
draw_channel_textstill skips those bytes without changing font attributes — needs an attribute-aware draw path, a separate larger change.85b0585685toc449fb9d71Issues I see here:
Digit-parser mismatch between width calc and renderer.
The new
.skip_colorparser intext_insert_newlines/text_nextlineconsumes at most 2 fg + 2 bg digits, but the renderer'sdec_to_esiconsumes all consecutive digits. For non-standard color codes with 3+ digits (e.g.\x03123), line-wrap width and rendered output desync.Make the width parser consume the same byte span as
dec_to_esi.Undocumented behavior change in
draw_channel_text.The full
\x03fg,bgpath now doesjmp .lineinstead of falling through to.no_colors, removing an implicitinc edxthat previously ate the first character after a background-color code. This looks like a genuine bug fix, but it is outside the PR's stated scope and not mentioned in the description.Please confirm if it is intentional or not.
New code duplication introduced by this PR.
The ~30-line
.skip_color/.skip_color_comma/.skip_color_doneblock is added verbatim to bothtext_insert_newlinesandtext_nextline.Both copies are correct, but since the duplication is created here, factor it into a shared helper while it's fresh.
See comment above.
The color code counting logic seems overly complicated at first sight.
Did I really wrote a routine that counts characters backwards?
From what I remember, we just might need to scan backwards to find newlines.
How did you validate its correct behavior?
ircc: fix text formatting issues (#376)to apps/ircc: fix text formatting issues (#376)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.