diff options
| -rw-r--r-- | st.c | 13 |
1 files changed, 7 insertions, 6 deletions
| @@ -382,7 +382,7 @@ static void tnewline(int); | |||
| 382 | static void tputtab(int); | 382 | static void tputtab(int); |
| 383 | static void tputc(char *, int); | 383 | static void tputc(char *, int); |
| 384 | static void treset(void); | 384 | static void treset(void); |
| 385 | static int tresize(int, int); | 385 | static void tresize(int, int); |
| 386 | static void tscrollup(int, int); | 386 | static void tscrollup(int, int); |
| 387 | static void tscrolldown(int, int); | 387 | static void tscrolldown(int, int); |
| 388 | static void tsetattr(int *, int); | 388 | static void tsetattr(int *, int); |
| @@ -2656,7 +2656,7 @@ tputc(char *c, int len) { | |||
| 2656 | } | 2656 | } |
| 2657 | } | 2657 | } |
| 2658 | 2658 | ||
| 2659 | int | 2659 | void |
| 2660 | tresize(int col, int row) { | 2660 | tresize(int col, int row) { |
| 2661 | int i; | 2661 | int i; |
| 2662 | int minrow = MIN(row, term.row); | 2662 | int minrow = MIN(row, term.row); |
| @@ -2666,8 +2666,11 @@ tresize(int col, int row) { | |||
| 2666 | Line *orig; | 2666 | Line *orig; |
| 2667 | TCursor c; | 2667 | TCursor c; |
| 2668 | 2668 | ||
| 2669 | if(col < 1 || row < 1) | 2669 | if(col < 1 || row < 1) { |
| 2670 | return 0; | 2670 | fprintf(stderr, |
| 2671 | "tresize: error resizing to %dx%d\n", col, row); | ||
| 2672 | return; | ||
| 2673 | } | ||
| 2671 | 2674 | ||
| 2672 | /* free unneeded rows */ | 2675 | /* free unneeded rows */ |
| 2673 | i = 0; | 2676 | i = 0; |
| @@ -2738,8 +2741,6 @@ tresize(int col, int row) { | |||
| 2738 | tcursor(CURSOR_LOAD); | 2741 | tcursor(CURSOR_LOAD); |
| 2739 | } while(orig != term.line); | 2742 | } while(orig != term.line); |
| 2740 | term.c = c; | 2743 | term.c = c; |
| 2741 | |||
| 2742 | return (slide > 0); | ||
| 2743 | } | 2744 | } |
| 2744 | 2745 | ||
| 2745 | void | 2746 | void |
