WIP: apps/ircc: fix text formatting issues (#376) #392
Draft
SumitKumar-17
wants to merge 3 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:animage-menu-fix
KolibriOS:kfm-update
KolibriOS:chore/update-cmm_apps
KolibriOS:asm-xml-lib
KolibriOS:cpu-task-manager
KolibriOS:opendial-update
KolibriOS:kernel-socket-ring-sparse
KolibriOS:kernel-net-tsc-seed
KolibriOS:kernel-tcp-sender-fixes
KolibriOS:nvme
KolibriOS:docpack-rework
KolibriOS:kernel-unload-driver
KolibriOS:net-arp-nowait
KolibriOS:tcp-close-rst
KolibriOS:kernel-tcp-send-after-close
KolibriOS:kernel-tcp-rexmt-timer
KolibriOS:drivers-usbrndis-throughput
KolibriOS:kernel-arp-remove-index
KolibriOS:usbstor-media-poll
KolibriOS:setup-rework
KolibriOS:sweetbread-meos-copyrights
KolibriOS:kernel-tcp-reassembly-queue
KolibriOS:iconv-cp866-dash
KolibriOS:vesa20-putimage-runs
KolibriOS:bcm57xx
KolibriOS:open-fix-587
KolibriOS:drivers-include-linux49-backports
KolibriOS:MarvellYukon-II
KolibriOS:MarvellYukon-I
KolibriOS:egor00f-patch-1
KolibriOS:rdsave-rewrite
KolibriOS:fix_602
KolibriOS:kernel-tcp-socket-list-locking
KolibriOS:network/getsockname
KolibriOS:rewrite_ide_drv
KolibriOS:apps/table-msvc-to-tcc
KolibriOS:netsurf-4
KolibriOS:vidmode-s3ide-clgd54xx-kms-etc
KolibriOS:updf-1.5
KolibriOS:pr-fs-unhardcode
KolibriOS:kbd-busoff
KolibriOS:webview-4
KolibriOS:workflow-fuse
KolibriOS:add-license-file-header-to-guide
KolibriOS:shell-improve-cpuid
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
Influence/Text/TYPO
AI
Eolite
FS
GSoC
Good First PR
HLL
HardwareTested
IRCC
Influence/Settings
Lang/C
Lang/FASM
Pay for the code
Subsystem/API
Subsystem/Audio
Subsystem/Graphics
Subsystem/IPC and events
Subsystem/Memory
Subsystem/Network
Subsystem/Services(daemon)
Subsystem/Taskmanager
Subsystem/VFS
Subsystem/Window
This issue or PR in the Google Source of Code program
The issue is suitable to beginners
Paid task
infinity service, audio drivers, midi, speacker, audio programs
vesa, vga, framebuffer, cursors, blitter, and video drivers
pipes, signals, events, shared memory
virt and phys memory allocators, malloc and other
userspace and kernel(for example: serial) services
process, threads, run apps, scheduler
drivers from filesystem, fs api, blkdev, programs that work with the file system
windows, skins, buttons, mouse and keyboard code for windows (not the base code)
Category
Applications
Category
Drivers
Category
General
Category
Kernel
Category
Libraries
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
PR
Ready to merge
Pull request is ready for merge
PR
Conflicts
PR conflicts with main
PR
Dependent
This PR is dependent on another PR
PR
Request changes
Changes requested in pull request
PR
Review required
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
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 labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
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.
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)eae9ab3518to9ebd6fa97d@hidnplayr
Hi! Finally reached this PR again.
I simplified code according to your comment, so check the current version, please.
This code is looking a lot better!
Now to clean up the obviously LLM generated flood of comments, bump the version number of IRCC and preferably add some screenshot of before and after so we can see what it does :)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.