-
Notifications
You must be signed in to change notification settings - Fork 230
fix : added ASCII fallback for Code widget gutter pipe character #3435
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,7 @@ export class Code extends Widget { | |
| screen.writeString(x, y, lineNum, { dim: true }); | ||
| x += lineNumWidth; | ||
|
|
||
| screen.setCell(x, y, { char: '│', dim: true }); | ||
| screen.setCell(x, y, { char: caps.unicode ? '│' : '|', dim: true }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Make the existing gutter test capability-independent. This branch correctly renders Update that assertion to accept the selected separator, or force Unicode explicitly for that test. Suggested test adjustment- expect(screen.back[1][2].char).toBe('\u2502');
+ expect(screen.back[1][2].char).toBe(caps.unicode ? '\u2502' : '|');🤖 Prompt for AI Agents |
||
| x++; | ||
|
|
||
| screen.setCell(x, y, { char: ' ' }); | ||
|
|
||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Karanjot786/TermUI
Length of output: 982
🏁 Script executed:
Repository: Karanjot786/TermUI
Length of output: 247
🏁 Script executed:
Repository: Karanjot786/TermUI
Length of output: 7173
Fix the
caps.unicodemock used for the ASCII-gutter test.caps.unicodeis a writable data property, not a static getter, so thevi.spyOn(caps, 'unicode', 'get')overload does not correctly replace the value Vitest expects for this accessor signature. Use a scopedObject.definePropertyoverride instead and restore the original value infinally.🤖 Prompt for AI Agents
Source: Learnings