@zgeoff/atc 2.2.0 → 2.2.1
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/package.json +1 -1
- package/src/client/ui.ts +7 -1
package/package.json
CHANGED
package/src/client/ui.ts
CHANGED
|
@@ -392,7 +392,13 @@ export function drawPicker(view: PickerView) {
|
|
|
392
392
|
rowsList.push(boxRow(width, styled, plainLen));
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
|
|
395
|
+
// The cursor always sits at the end of the input, so show the tail and
|
|
396
|
+
// drop the head once the text outgrows the row.
|
|
397
|
+
const inputMax = width - 8;
|
|
398
|
+
|
|
399
|
+
const inputShown =
|
|
400
|
+
view.input.length <= inputMax ? view.input : `…${view.input.slice(-(inputMax - 1))}`;
|
|
401
|
+
|
|
396
402
|
let inputStyled: string;
|
|
397
403
|
let inputLen: number;
|
|
398
404
|
|