diff --git a/src/syncterm/CHANGES b/src/syncterm/CHANGES index 24e81726d9d67d4128e9a60ee9f318505d436397..faf742d7a0251f8b069b2f0934195f52455142e2 100644 --- a/src/syncterm/CHANGES +++ b/src/syncterm/CHANGES @@ -1,3 +1,9 @@ +Version 1.2rc5 +-------------- +Fix RIP parsing when passed fragmented ANSI sequences +Fix cursor when RIP changes font height +Fix Alt-O in RIP mode + Version 1.2rc4 -------------- Fix pointy scaling to work even when interpolating both directions @@ -9,7 +15,6 @@ Fix telnets (broken when sftp support was added) Update ANSI and win32 console support Fix bug with window resizing calculations New icons thanks to zuMi! -Fix RIP parsing when passed fragmented ANSI sequences Version 1.2rc3 -------------- diff --git a/src/syncterm/relcheck.txt b/src/syncterm/relcheck.txt index aec6a05d578a5d1b627ea0185fe06eff2d3d9d1f..785869ef8e09996f7ab76855f62da576ff092fba 100644 --- a/src/syncterm/relcheck.txt +++ b/src/syncterm/relcheck.txt @@ -1,3 +1,4 @@ +Extract release archives and ensure the correct version is in all of them Upload files to SourceForge Set default OS versions on SourceForge Add new version to Found in Version file on SourceForge in bug and support trackers diff --git a/src/syncterm/ripper.c b/src/syncterm/ripper.c index 84ca3f258c8bf570ffbfa20a0686b94127fcb797..19a9ac0079ef201adba456134cd7e4d8c7b2e7dc 100644 --- a/src/syncterm/ripper.c +++ b/src/syncterm/ripper.c @@ -10080,6 +10080,7 @@ reinit_screen(uint8_t *font, int fx, int fy) int rows = 43; void *nvmem; uint32_t lcf; + bool fh_change; rip_did_reinit = true; hold_update = 0; @@ -10098,6 +10099,7 @@ reinit_screen(uint8_t *font, int fx, int fy) if (font == ripfnt16x14) cols = 40; pthread_mutex_lock(&vstatlock); + fh_change = fy != vstat.charheight; rows = vstat.scrnheight / fy; if ((font != vstat.forced_font) || (fx != vstat.charwidth) || (fy != vstat.charheight)) { vstat.forced_font = font; @@ -10105,6 +10107,15 @@ reinit_screen(uint8_t *font, int fx, int fy) vstat.charheight = fy; vstat.cols = cols; vstat.rows = rows; + if (fh_change) { + if (fy > 8) + vstat.default_curs_start = vstat.charheight - 2; + else + vstat.default_curs_start = vstat.charheight - 1; + vstat.default_curs_end = vstat.charheight - 1; + vstat.curs_start = vstat.default_curs_start; + vstat.curs_end = vstat.default_curs_end; + } // We need to update gettextinfo() results as well... cio_textinfo.screenwidth = cols; @@ -16230,6 +16241,7 @@ rip_getch(void) } return ch; } + struct mouse_state *ms = cterm->mouse_state_change_cbdata; gotoxy(wherex(), wherey()); ch = getch(); @@ -16240,7 +16252,7 @@ rip_getch(void) } shadow_palette(); - if (ch == CIO_KEY_MOUSE) { + if (ch == CIO_KEY_MOUSE && (!(ms->flags & MS_FLAGS_DISABLED))) { ch = -1; getmouse(&mevent); mevent.startx_res = unmap_rip_x(mevent.startx_res); diff --git a/src/syncterm/term.c b/src/syncterm/term.c index 67b39b995f91e2e940f6a7c90ce294097eb3f0f2..d5ab686ffff17a89d753e6fba6ebe7d00e867971 100644 --- a/src/syncterm/term.c +++ b/src/syncterm/term.c @@ -102,25 +102,6 @@ get_cterm_size(int *cols, int *rows, int ns) } } -enum mouse_modes { - MM_OFF, - MM_RIP = 1, - MM_X10 = 9, - MM_NORMAL_TRACKING = 1000, - MM_HIGHLIGHT_TRACKING = 1001, - MM_BUTTON_EVENT_TRACKING = 1002, - MM_ANY_EVENT_TRACKING = 1003 -}; - -struct mouse_state { - uint32_t flags; - -#define MS_FLAGS_SGR (1 << 0) -#define MS_FLAGS_DISABLED (1 << 1) -#define MS_SGR_SET (1006) - enum mouse_modes mode; -}; - void setup_mouse_events(struct mouse_state *ms) { diff --git a/src/syncterm/term.h b/src/syncterm/term.h index 3074867cc84779000eb01d203ee98711ef5cdd04..42736162bcb1953bb85c64f2f23e2a088c52ffa9 100644 --- a/src/syncterm/term.h +++ b/src/syncterm/term.h @@ -18,6 +18,25 @@ struct terminal { int nostatus; }; +enum mouse_modes { + MM_OFF, + MM_RIP = 1, + MM_X10 = 9, + MM_NORMAL_TRACKING = 1000, + MM_HIGHLIGHT_TRACKING = 1001, + MM_BUTTON_EVENT_TRACKING = 1002, + MM_ANY_EVENT_TRACKING = 1003 +}; + +struct mouse_state { + uint32_t flags; + +#define MS_FLAGS_SGR (1 << 0) +#define MS_FLAGS_DISABLED (1 << 1) +#define MS_SGR_SET (1006) + enum mouse_modes mode; +}; + #define XMODEM_128B (1 << 10) /* Use 128 byte block size (ick!) */ extern struct terminal term;