1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-17 23:06:25 -05:00

Allocate video buffers based on MAXROW/MAXCOL even if os window is smaller at initialization.

This commit is contained in:
Renaud 2015-01-02 20:26:34 +08:00
parent 923d7bdc8e
commit 48ea9279a6
5 changed files with 16 additions and 10 deletions

View File

@ -135,7 +135,7 @@ bind.o: bind.c bind.h estruct.h bindable.h buffer.h crypt.h line.h utf8.h \
buffer.o: buffer.c buffer.h crypt.h line.h utf8.h defines.h display.h \
estruct.h file.h retcode.h input.h bind.h window.h
crypt.o: crypt.c crypt.h
display.o: display.c display.h buffer.h crypt.h line.h utf8.h estruct.h \
display.o: display.c display.h estruct.h buffer.h crypt.h line.h utf8.h \
input.h bind.h termio.h terminal.h defines.h retcode.h version.h \
wrapper.h window.h
ebind.o: ebind.c ebind.h basic.h bind.h estruct.h bindable.h buffer.h \
@ -168,8 +168,8 @@ main.o: main.c estruct.h basic.h bind.h bindable.h buffer.h crypt.h \
log.h random.h search.h terminal.h defines.h termio.h version.h window.h
mingw32.o: mingw32.c
names.o: names.c names.h basic.h bind.h bindable.h buffer.h crypt.h \
line.h utf8.h display.h eval.h exec.h retcode.h file.h isearch.h \
region.h random.h search.h spawn.h window.h defines.h word.h
line.h utf8.h display.h estruct.h eval.h exec.h retcode.h file.h \
isearch.h region.h random.h search.h spawn.h window.h defines.h word.h
pklock.o: pklock.c estruct.h pklock.h
posix.o: posix.c
random.o: random.c random.h basic.h buffer.h crypt.h line.h utf8.h \

View File

@ -1550,9 +1550,9 @@ void sizesignal(int signr)
getscreensize(&w, &h);
if( h && w) {
term.t_mrow = h ;
term.t_mcol = w ;
if( h > 0 && w > 0) {
term.t_mrow = h = h < MAXROW ? h : MAXROW ;
term.t_mcol = w = w < MAXCOL ? w : MAXCOL ;
if( h - 1 != term.t_nrow || w != term.t_ncol)
newscreensize( h, w) ;
}

View File

@ -1,6 +1,8 @@
#ifndef _DISPLAY_H_
#define _DISPLAY_H_
#include "estruct.h"
extern int mpresf ; /* Stuff in message line */
extern int scrollcount ; /* number of lines to scroll */
extern int discmd ; /* display command flag */
@ -25,8 +27,13 @@ void mlforce( char *s) ;
void mlputs( char *s) ;
void getscreensize( int *widthp, int *heightp) ;
#if UNIX
#include <signal.h>
#ifdef SIGWINCH
extern int chg_width, chg_height ;
void sizesignal( int signr) ;
#endif
#endif
#endif

View File

@ -42,8 +42,6 @@ extern short iochan; /* In "termio.c" */
#if V7 | USG | BSD
#include <signal.h>
#ifdef SIGWINCH
extern int chg_width, chg_height;
extern void sizesignal(int);
#endif
#endif

5
tcap.c
View File

@ -161,8 +161,9 @@ static void tcapopen(void)
exit(1);
}
#ifdef SIGWINCH
term.t_mrow = int_row > MAXROW ? MAXROW : int_row ;
term.t_mcol = int_col > MAXCOL ? MAXCOL : int_col ;
/* At initialization we use maximum size even if current OS window is smaller */
term.t_mrow = MAXROW ;
term.t_mcol = MAXCOL ;
#else
term.t_mrow = term.t_nrow > MAXROW ? MAXROW : term.t_nrow;
term.t_mcol = term.t_ncol > MAXCOL ? MAXCOL : term.t_ncol;