25 Feb
2022
25 Feb
'22
1:10 p.m.
Hi Eric, The series looks mostly good for me. On 2/23/22 18:05, Eric Pouech wrote:
+ if (initial_len && edit_line_grow( console, initial_len + 1 )) + { + unsigned offset = edit_line_string_width( initial, initial_len ); + if (offset > ctx->home_x) + { + int deltay; + offset -= ctx->home_x; + deltay = offset / console->active->width; + ctx->home_y = (deltay >= ctx->home_y) ? ctx->home_y - deltay : 0;
Isn't the logic reverted here?
+ ctx->home_x = console->active->width - 1 - (offset % console->active->width);
I wonder if we should use use 0 for home_x in case of deltay >= home_y. Thanks, Jacek