]> git.pld-linux.org Git - packages/mksh.git/blob - mksh-columns.patch
06c24dcd7891a45ed52ae919b643267a5d4b6338
[packages/mksh.git] / mksh-columns.patch
1 diff -u -p -u -p -r1.522 sh.h
2 --- sh.h        3 Mar 2012 21:31:21 -0000       1.522
3 +++ sh.h        9 Mar 2012 15:14:49 -0000
4 @@ -855,7 +855,7 @@ EXTERN char *current_wd;
5   */
6  #define MIN_COLS       (2 + MIN_EDIT_SPACE + 3)
7  #define MIN_LINS       3
8 -EXTERN mksh_ari_t x_cols E_INIT(80);   /* tty columns */
9 +EXTERN mksh_ari_t x_cols E_INIT(-1);   /* tty columns */
10  EXTERN mksh_ari_t x_lins E_INIT(-1);   /* tty lines */
11  
12  /* These to avoid bracket matching problems */
13 diff -u -p -u -p -r1.141 var.c
14 --- var.c       3 Mar 2012 21:31:23 -0000       1.141
15 +++ var.c       9 Mar 2012 15:14:49 -0000
16 @@ -1458,14 +1458,13 @@ set_array(const char *var, bool reset, c
17  void
18  change_winsz(void)
19  {
20 -       if (x_lins < 0) {
21 +       if (x_cols < 0 && x_lins < 0) {
22                 /* first time initialisation */
23  #ifdef TIOCGWINSZ
24                 if (tty_fd < 0)
25                         /* non-FTALKING, try to get an fd anyway */
26                         tty_init(true, false);
27  #endif
28 -               x_cols = -1;
29         }
30  
31  #ifdef TIOCGWINSZ
This page took 0.066024 seconds and 2 git commands to generate.