mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23:38:48 +00:00
Reset scrolling region on exit.
This commit is contained in:
parent
38589dd2c7
commit
4fbbc3dfd3
11
local.c
11
local.c
@ -1,4 +1,4 @@
|
||||
/* $Id: local.c,v 1.12 2007-10-01 14:18:42 nicm Exp $ */
|
||||
/* $Id: local.c,v 1.13 2007-10-02 15:13:59 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <curses.h>
|
||||
#include <fcntl.h>
|
||||
@ -288,12 +289,20 @@ local_cmp(const void *ptr1, const void *ptr2)
|
||||
void
|
||||
local_done(void)
|
||||
{
|
||||
struct winsize ws;
|
||||
|
||||
xfree(local_in);
|
||||
xfree(local_out);
|
||||
|
||||
if (tcsetattr(local_fd, TCSANOW, &local_tio) != 0)
|
||||
fatal("tcsetattr failed");
|
||||
close(local_fd);
|
||||
|
||||
if (change_scroll_region != NULL) {
|
||||
if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1)
|
||||
fatal("ioctl(TIOCGWINSZ)");
|
||||
putp(tparm(change_scroll_region, 0, ws.ws_row - 1));
|
||||
}
|
||||
|
||||
if (keypad_local != NULL)
|
||||
putp(keypad_local); /* not local_putp */
|
||||
|
Loading…
Reference in New Issue
Block a user