@oh-my-pi/pi-tui 16.1.17 → 16.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +3 -3
- package/src/components/editor.ts +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [16.1.19] - 2026-06-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed bordered `Editor` rendering 1–2 cells past the terminal width when the end-of-line cursor glyph landed past a wide trailing grapheme (CJK comma `,`, emoji, etc.), wrapping the bottom-right corner (`╯`) to its own row. The right chrome (padding + `─` + corner) now shrinks by the exact cursor overflow cell count instead of a 1-cell boolean, so the box stays inside `width` for any `paddingX` ([#3431](https://github.com/can1357/oh-my-pi/issues/3431)).
|
|
10
|
+
|
|
5
11
|
## [16.1.17] - 2026-06-24
|
|
6
12
|
|
|
7
13
|
### Added
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "16.1.
|
|
4
|
+
"version": "16.1.19",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oh-my-pi/pi-natives": "16.1.
|
|
41
|
-
"@oh-my-pi/pi-utils": "16.1.
|
|
40
|
+
"@oh-my-pi/pi-natives": "16.1.19",
|
|
41
|
+
"@oh-my-pi/pi-utils": "16.1.19",
|
|
42
42
|
"lru-cache": "11.5.1",
|
|
43
43
|
"marked": "^18.0.5"
|
|
44
44
|
},
|
package/src/components/editor.ts
CHANGED
|
@@ -837,7 +837,7 @@ export class Editor implements Component, Focusable {
|
|
|
837
837
|
const layoutLine = visibleLayoutLines[visibleIndex]!;
|
|
838
838
|
let displayText = layoutLine.text;
|
|
839
839
|
let displayWidth = visibleWidth(layoutLine.text);
|
|
840
|
-
let
|
|
840
|
+
let cursorPaddingOverflow = 0;
|
|
841
841
|
let decorated = false;
|
|
842
842
|
const showPromptGutter = promptGutter !== undefined && visibleIndex === 0;
|
|
843
843
|
const gutterText =
|
|
@@ -963,7 +963,7 @@ export class Editor implements Component, Focusable {
|
|
|
963
963
|
displayWidth += cursorWidth;
|
|
964
964
|
}
|
|
965
965
|
if (displayWidth > lineContentWidth && paddingX > 0) {
|
|
966
|
-
|
|
966
|
+
cursorPaddingOverflow = displayWidth - lineContentWidth;
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
}
|
|
@@ -982,18 +982,22 @@ export class Editor implements Component, Focusable {
|
|
|
982
982
|
continue;
|
|
983
983
|
}
|
|
984
984
|
|
|
985
|
-
// All lines have consistent borders based on padding
|
|
985
|
+
// All lines have consistent borders based on padding. When the end-of-line cursor
|
|
986
|
+
// glyph (or a wide trailing grapheme) extends past `lineContentWidth`, shrink the
|
|
987
|
+
// right chrome by the exact overflow count: drop padding spaces first, then the
|
|
988
|
+
// trailing `─`, but never the corner/vertical bar itself.
|
|
986
989
|
const isLastLine = visibleIndex === visibleLayoutLines.length - 1;
|
|
987
|
-
const
|
|
990
|
+
const rightChromeCells = Math.max(1, paddingX + 1 - cursorPaddingOverflow);
|
|
988
991
|
if (isLastLine) {
|
|
989
|
-
const
|
|
992
|
+
const rightPad = Math.max(0, rightChromeCells - 2);
|
|
993
|
+
const includeHorizontal = rightChromeCells >= 2;
|
|
990
994
|
const bottomRightAdjusted = this.borderColor(
|
|
991
|
-
`${padding(
|
|
995
|
+
`${padding(rightPad)}${includeHorizontal ? box.horizontal : ""}${box.bottomRight}`,
|
|
992
996
|
);
|
|
993
997
|
result.push(`${bottomLeft}${displayText}${linePad}${bottomRightAdjusted}`);
|
|
994
998
|
} else {
|
|
995
999
|
const leftBorder = this.borderColor(`${box.vertical}${padding(paddingX)}`);
|
|
996
|
-
const rightBorder = this.borderColor(`${padding(
|
|
1000
|
+
const rightBorder = this.borderColor(`${padding(Math.max(0, rightChromeCells - 1))}${box.vertical}`);
|
|
997
1001
|
result.push(leftBorder + displayText + linePad + rightBorder);
|
|
998
1002
|
}
|
|
999
1003
|
}
|