https://gitlab.synchro.net/main/sbbs/-/merge_requests/751#note_11460
Compared with the feedback on !749: the retries are gone, so an unresponsive terminal costs 5 s instead of 20, and there is no new trailing whitespace. Most callers now handle `false`, but two of the new guards are broken and a few call sites still aren't covered.
**1. Uploading a message now always throws.** In `letUserUploadMessageFile()` (SlyEdit.js ~6759), the `originalCurpos = console.getxy();` line was removed rather than guarded. The else branch now tests `originalCurpos === false` on a variable that is still `undefined`. The only caller passes no argument (`if (letUserUploadMessageFile())`, line 2757). So the `console.gotoxy(originalCurpos)` at the end of the function gets `undefined` and throws the #1371 error ("invalid argument type") on every upload, whether or not the terminal answers.
**2. The cross-post "can't post" message never shows.** In `createCrossPostSubBoardMenu()` (~5731), this line is unfinished:
```js
if (origCurPos === false)
origCurPos =
writeCantPostErrMsg(..., origCurPos);
```
JavaScript parses that as `if (origCurPos === false) origCurPos = writeCantPostErrMsg(...)`. When `getxy()` succeeds, the error message isn't displayed at all. When `getxy()` fails, `writeCantPostErrMsg()` receives `false`, and its own `console.gotoxy(pCurpos)` throws.
**3. Still unhandled:**
- `getUserInputWithSetOfInputStrs()` (slyedit_misc.js:3533) reads `curPos.x` right away. The caller at SlyEdit.js:5115 passes no position, so a failed `getxy()` throws a TypeError there.
- `doUserSettings()` (6089) uses `originalCurpos.x` and `.y` without checking them. Today's callers pass a position, but the function's own `getxy()` fallback has the same gap.
**4. Fallback position.** `{x: gEditLeft, y: gEditTop}` puts the cursor at the top-left of the edit area, while SlyEdit's line and column state still point somewhere else. The next keypress then appears in the wrong place on screen. Most of these functions are called from the edit loop, which already tracks `curpos` (it passes `curpos` to `doUserSettings` at line 1849). Passing that position in, or computing it from `gEditLinesIndex`, works better than calling `getxy()` at all.
**5. Weak fallbacks in the DCT and ICE code:**
- DCT `promptYesNo`: when `getxy()` fails, the yes/no box is no longer erased and the cursor stays inside it. A full redraw (`fpRedrawScreen`) would be a safer fallback.
- ICE `redrawScreen_IceStyle`: the new early `return`s happen after `console.clear()`, so a failure leaves a half-drawn header and no message text. The padding only needs a space count computed from `console.strlen()` of the text already printed, which would remove all three `getxy()` calls.
**6. Minor:**
- slyedit_misc.js:1473: the new line is indented with tabs inside a block indented with 3 spaces.
- SlyEdit.js:5328: `origStartingCurpos ={x:` is missing a space after the `=`. - `consoleGoLocation1ElseLocation2()` would read better as something like `gotoxyOrFallback(pos, fallback)`.
— *Authored by Claude (Claude Code), on behalf of @rswindell*
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net