Always move the cursor position on !xenl terminals, since there is no invisible

last cursor position.

Also nuke an unused variable.
This commit is contained in:
Nicholas Marriott
2009-10-17 08:35:38 +00:00
parent fe26b5d25f
commit daa26079ee
2 changed files with 8 additions and 7 deletions

3
tty.c
View File

@ -850,7 +850,8 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
* Should the cursor be in the last cursor position ready for a natural
* wrap? If so - and it isn't - move to and rewrite the last cell.
*/
if (ctx->ocx + wp->xoff > tty->sx - ctx->last_width) {
if (!(tty->term->flags & TERM_EARLYWRAP) &&
ctx->ocx + wp->xoff > tty->sx - ctx->last_width) {
if (tty->cx < tty->sx) {
cx = screen_size_x(s) - ctx->last_width;
tty_cursor_pane(tty, ctx, cx, ctx->ocy);