• src/sbbs3/ansi_terminal.cpp js_console.cpp terminal.h

    From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, March 30, 2025 18:49:34
    https://gitlab.synchro.net/main/sbbs/-/commit/2e7fbd3dd38342432f47a1b5
    Modified Files:
    src/sbbs3/ansi_terminal.cpp js_console.cpp terminal.h
    Log Message:
    Move cursor when console.current_row/current_column is set

    Closes issue #896

    These are zero-based like the properties, not 1-based like gotoxy()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, January 26, 2026 19:07:06
    https://gitlab.synchro.net/main/sbbs/-/commit/c5d806d626b4aaa5afee53b1
    Modified Files:
    src/sbbs3/ansi_terminal.cpp js_console.cpp terminal.h
    Log Message:
    Add a cursor position optimizer to the ANSI_Terminal class

    (disabled by default, Deuce is pretty sure it'll break somethings)

    The performance of some scripts (e.g. utopia.js) benefit from the filtering of redundant cursor position changes and though we can (with v3.21) check the console current_row/column properties in the script to avoid sending redundant changes to cursor position, that is not backwards compatible with Synchronet v3.20 since its console.gotoxy() method did *not* update the internal concept of where the cursor position is currently. So any optimization in the script itself would have to either:

    a) be Synchronet-version specific or risk incorrectly filtering out cursor position changes that were not actually redundant, or

    b) track the cursor position itself after every call to console.putmsg, write, print, etc.

    I figured this simple optimization could be available to any script, if it wanted it, but the script should be sure to set the setting back (e.g. by using js.on_exit) to the value it had when the script was started.

    The new JS 'console' property (and Terminal class member) is: optimize_gotoxy (defaults to false/off).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net