git-watchtower 2.3.8 → 2.3.9
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/ui/renderer.js +8 -3
package/package.json
CHANGED
package/src/ui/renderer.js
CHANGED
|
@@ -1505,13 +1505,19 @@ function renderUpdateModal(state, write) {
|
|
|
1505
1505
|
lines.push(updateCmd);
|
|
1506
1506
|
lines.push('');
|
|
1507
1507
|
|
|
1508
|
+
// Tracks where the selectable option block starts so the highlight
|
|
1509
|
+
// logic below can reverse-map line index → option index. -1 when
|
|
1510
|
+
// there are no options (the updateInProgress path). Computed from
|
|
1511
|
+
// `lines.length` so adding any line above never silently desyncs the
|
|
1512
|
+
// highlight — previously this was a hardcoded `7` that happened to
|
|
1513
|
+
// match the line count above by coincidence.
|
|
1514
|
+
let optionStartIdx = -1;
|
|
1508
1515
|
if (state.updateInProgress) {
|
|
1509
1516
|
lines.push('Updating...');
|
|
1510
1517
|
lines.push('');
|
|
1511
1518
|
lines.push('Please wait...');
|
|
1512
1519
|
} else {
|
|
1513
|
-
|
|
1514
|
-
const optionStartIdx = lines.length;
|
|
1520
|
+
optionStartIdx = lines.length;
|
|
1515
1521
|
for (const opt of options) {
|
|
1516
1522
|
lines.push(opt);
|
|
1517
1523
|
}
|
|
@@ -1519,7 +1525,6 @@ function renderUpdateModal(state, write) {
|
|
|
1519
1525
|
lines.push('[Enter] Select [Esc] Dismiss');
|
|
1520
1526
|
}
|
|
1521
1527
|
|
|
1522
|
-
const optionStartIdx = state.updateInProgress ? -1 : 7;
|
|
1523
1528
|
const height = lines.length + 2;
|
|
1524
1529
|
|
|
1525
1530
|
// Draw magenta double-border box
|