diff --git a/src/conio/bitmap_con.c b/src/conio/bitmap_con.c index 45e235e1b00ac48a62da18611199bab28be1421d..aca70a59dbdb81cf7549906150a1eca6e00f5bc3 100644 --- a/src/conio/bitmap_con.c +++ b/src/conio/bitmap_con.c @@ -441,7 +441,6 @@ int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy) ssourcepos=((y-1)*vstat.charheight+screeny)*cio_textinfo.screenwidth*vstat.charwidth+(x-1)*vstat.charwidth; memmove(&(screen[ssourcepos+sdestoffset]), &(screen[ssourcepos]), sizeof(screen[0])*width*vstat.charwidth); } - bitmap_draw_cursor(&vstat); unlock_vmem(vmem_ptr); pthread_mutex_unlock(&screenlock); diff --git a/src/conio/cterm.c b/src/conio/cterm.c index f6abeffb7a29315ac20faad0f65077ac8c1a70cd..d478d9eca8393eeea43422c0551f0cfbab94e1b9 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -1278,8 +1278,8 @@ void draw_sixel(struct cterminal *cterm, char *str) struct text_info ti; int i; char *p; + int max_row; - SETCURSORTYPE(_NOCURSOR); GETTEXTINFO(&ti); vmode = find_vmode(ti.currmode); attr2palette(ti.attribute, &fg, &bg); @@ -1378,9 +1378,16 @@ void draw_sixel(struct cterminal *cterm, char *str) p++; break; case '-': // Graphics New Line + max_row = cterm->height; + if(cterm->origin_mode) + max_row = cterm->bottom_margin - cterm->top_margin + 1; + x = left; y += 6; - /* Check y */ + if (y + 5 >= (cterm->y + max_row - 1) * vparams[vmode].charheight) { + scrollup(cterm); + y -= vparams[vmode].charheight; + } p++; break; default: @@ -1388,15 +1395,16 @@ void draw_sixel(struct cterminal *cterm, char *str) } } } + x = x / vparams[vmode].charwidth + 1; - x -= cterm->x; + x -= (cterm->x - 1); x++; y = y / vparams[vmode].charheight + 1; - y -= cterm->y; + y -= (cterm->y - 1); y++; + GOTOXY(x,y); - SETCURSORTYPE(cterm->cursor); } static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *speed)