• Issue with UIFC list

    From Michael Long@1:103/705 to GitLab issue in main/sbbs on Tue Feb 9 20:26:06 2021
    open https://gitlab.synchro.net/main/sbbs/-/issues/218

    The up/down arrow keys are behaving incorrectly in UIFC. The list is not redrawing properly.Example script:```javascript"use strict"load("sbbsdefs.js");load("uifcdefs.js");uifc.init();var ctx = new uifc.list.CTX();var menuTitles = [];menuTitles.push("test1");menuTitles.push("test2");menuTitles.push("test3");menuTitles.push("test4");menuTitles.push("-----");var selection = uifc.list(WIN_SAV, "Testing", menuTitles, ctx);uifc.bail();writeln("selected " + selection);```Possibly caused by the commits on January 29https://gitlab.synchro.net/main/sbbs/-/commit/e5cdc9a55602778b821dfc101407367fa3df1ef3https://gitlab.synchro.net/main/sbbs/-/commit/4f087081761db61dc49813d4ad90aba9c1402c5c
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Wed Feb 10 18:58:37 2021
    https://gitlab.synchro.net/main/sbbs/-/issues/218#note_1570

    So I think there's at least 2 issues here. First, this line in `js_uifc.c` seems suspect:``` p->bar = INT_MAX;```We want the bar to default to 0 (the top of the list), not the bottom of the list.But still, leaving this value at INT_MAX is a good test of the cur/bar value checking logic in uifc32.c:ulist().Given the test script, `i` on line 930 becomes `-4` and the following `if()` condition is not executed, so from that point on, `bar` and `cur` are out of sync and strange stuff happens.Initializing `p->bar` to 0 in `js_uifc.c` makes this test script look/work fine, but the out-of-range `bar` value correction in uifc32.c's `ulist()` is clearly still broken.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Michael Long@1:103/705 to GitLab note in main/sbbs on Wed Feb 10 19:02:56 2021
    https://gitlab.synchro.net/main/sbbs/-/issues/218#note_1571

    We want the bar to default to 0 (the top of the list), not the bottom of the list.Actually, based on this commit, I think deuce wanted to move it to default to the bottom:https://gitlab.synchro.net/main/sbbs/-/commit/2da95710623d330a22af766de18696763cba5f50
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Wed Feb 10 19:04:09 2021
    https://gitlab.synchro.net/main/sbbs/-/issues/218#note_1573

    I don't think that was the intention.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab issue in main/sbbs on Thu Feb 11 18:53:06 2021
    close https://gitlab.synchro.net/main/sbbs/-/issues/218
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)