mirror of
https://github.com/tmux/tmux.git
synced 2024-11-18 02:18:53 +00:00
Move from the right place.
This commit is contained in:
parent
2cdc75fa4e
commit
ef18b7d637
7
screen.c
7
screen.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: screen.c,v 1.29 2007-11-21 14:30:15 nicm Exp $ */
|
/* $Id: screen.c,v 1.30 2007-11-21 14:55:31 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -154,14 +154,15 @@ screen_resize(struct screen *s, u_int sx, u_int sy)
|
|||||||
if (s->cy != 0) {
|
if (s->cy != 0) {
|
||||||
/*
|
/*
|
||||||
* The cursor is not at the start. Try to remove as
|
* The cursor is not at the start. Try to remove as
|
||||||
* many lines as possible from the top.
|
* many lines as possible from the top. (Up to the
|
||||||
|
* cursor line.)
|
||||||
*/
|
*/
|
||||||
my = s->cy;
|
my = s->cy;
|
||||||
if (my > ny)
|
if (my > ny)
|
||||||
my = ny;
|
my = ny;
|
||||||
|
|
||||||
screen_free_lines(s, s->hsize, my);
|
screen_free_lines(s, s->hsize, my);
|
||||||
screen_move_lines(s, s->hsize, my, oy - my);
|
screen_move_lines(s, s->hsize, s->hsize + my, oy - my);
|
||||||
|
|
||||||
s->cy -= my;
|
s->cy -= my;
|
||||||
oy -= my;
|
oy -= my;
|
||||||
|
Loading…
Reference in New Issue
Block a user