fix appending new text to proper position after grid has been resized

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-01-27 15:47:22 -05:00
parent d07544a8ff
commit 1c030bb1aa
1 changed files with 6 additions and 4 deletions

View File

@ -858,7 +858,7 @@ _cursor_handle(Grid *sd, const Eina_Unicode *cc)
if (sd->state.crlf) sd->state.cx = 0;
sd->state.cy++;
_text_scroll_test(sd, EINA_TRUE);
return;
break;
case 0x0d: // CR '\r' (carriage return)
if (sd->state.cx != 0)
{
@ -868,7 +868,7 @@ _cursor_handle(Grid *sd, const Eina_Unicode *cc)
}
sd->state.cx = 0;
sd->state.had_cr = 1;
return;
break;
case 0x09: // HT '\t' (horizontal tab)
sd->state.had_cr = 0;
GRID_CELLS(sd, sd->state.cx, sd->state.cy).att.tab = 1;
@ -877,7 +877,7 @@ _cursor_handle(Grid *sd, const Eina_Unicode *cc)
sd->state.cx = (sd->state.cx / 8) * 8;
if (sd->state.cx >= sd->w)
sd->state.cx = (sd->w - 1);
return;
break;
default:
break;
}
@ -1353,7 +1353,9 @@ _grid_resize(Evas_Object *obj, int nw, int nh)
sd->backpos = 0;
sd->backscroll_num = MAX(-new_y_start, 0);
sd->state.had_cr = 0;
sd->state.cy = (new_cy + nh - sd->circular_offset) % nh;
sd->state.cy = nh;
/* sd->state.cy = (new_cy + nh - sd->circular_offset) % nh; */
if (altbuf) _cells_swap(sd);