… | |
… | |
329 | int prow = lofs / prev_ncol; |
329 | int prow = lofs / prev_ncol; |
330 | int pcol = lofs % prev_ncol; |
330 | int pcol = lofs % prev_ncol; |
331 | |
331 | |
332 | prow = MOD (p + prow, prev_total_rows); |
332 | prow = MOD (p + prow, prev_total_rows); |
333 | |
333 | |
334 | // we only adjust the cursor _row_, as this seems to upset |
334 | // we only adjust the cursor _row_ and put it into |
|
|
335 | // the topmost line of "long line" it was in, as |
335 | // applications/shells/readline least. |
336 | // this seems to upset applications/shells/readline |
|
|
337 | // least. |
336 | if (prow == ocur.row) |
338 | if (prow == ocur.row) |
337 | screen.cur.row = qrow - (total_rows - nrow); |
339 | screen.cur.row = q - (total_rows - nrow); |
338 | |
340 | |
339 | line_t &pline = old_buf [prow]; |
341 | line_t &pline = old_buf [prow]; |
340 | |
342 | |
341 | int len = min (min (prev_ncol - pcol, ncol - qcol), llen - lofs); |
343 | int len = min (min (prev_ncol - pcol, ncol - qcol), llen - lofs); |
342 | |
344 | |