home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / old / 5.5.039 < prev    next >
Encoding:
Internet Message Format  |  1999-11-30  |  4.2 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.5.039
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.039
  8. Problem:    When using a custom status line, "%a" (file # of #) reports the
  9.         index of the current window for all windows.
  10. Solution:   Pass a window pointer to append_arg_number(), and pass the window
  11.         being updated from build_stl_str_hl(). (Stephen P. Wall)
  12. Files:        src/buffer.c, src/screen.c, src/proto/buffer.pro
  13.  
  14.  
  15. *** ../vim-5.5.38/src/buffer.c    Wed Sep 22 10:06:20 1999
  16. --- src/buffer.c    Wed Dec  1 19:50:27 1999
  17. ***************
  18. *** 1835,1841 ****
  19.              (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
  20.       }
  21.   
  22. !     (void)append_arg_number(buffer, !shortmess(SHM_FILE), IOSIZE);
  23.   
  24.       if (dont_truncate)
  25.       {
  26. --- 1846,1852 ----
  27.              (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
  28.       }
  29.   
  30. !     (void)append_arg_number(curwin, buffer, !shortmess(SHM_FILE), IOSIZE);
  31.   
  32.       if (dont_truncate)
  33.       {
  34. ***************
  35. *** 1971,1977 ****
  36.           STRCPY(t_name, "VIM - ");
  37.           home_replace(curbuf, curbuf->b_ffname,
  38.                    t_name + 6, IOSIZE - 106, TRUE);
  39. !         append_arg_number(t_name, FALSE, IOSIZE - 100);
  40.           if (maxlen)
  41.           {
  42.               len = STRLEN(t_name);
  43. --- 1982,1988 ----
  44.           STRCPY(t_name, "VIM - ");
  45.           home_replace(curbuf, curbuf->b_ffname,
  46.                    t_name + 6, IOSIZE - 106, TRUE);
  47. !         append_arg_number(curwin, t_name, FALSE, IOSIZE - 100);
  48.           if (maxlen)
  49.           {
  50.               len = STRLEN(t_name);
  51. ***************
  52. *** 2058,2064 ****
  53.    * Return TRUE if it was appended.
  54.    */
  55.       int
  56. ! append_arg_number(buf, add_file, maxlen)
  57.       char_u  *buf;
  58.       int        add_file;        /* Add "file" before the arg number */
  59.       int        maxlen;        /* maximum nr of chars in buf or zero*/
  60. --- 2069,2076 ----
  61.    * Return TRUE if it was appended.
  62.    */
  63.       int
  64. ! append_arg_number(wp, buf, add_file, maxlen)
  65. !     WIN        *wp;
  66.       char_u  *buf;
  67.       int        add_file;        /* Add "file" before the arg number */
  68.       int        maxlen;        /* maximum nr of chars in buf or zero*/
  69. ***************
  70. *** 2078,2085 ****
  71.       STRCPY(p, "file ");
  72.       p += 5;
  73.       }
  74. !     sprintf((char *)p, curwin->w_arg_idx_invalid ? "(%d) of %d)" :
  75. !               "%d of %d)", curwin->w_arg_idx + 1, arg_file_count);
  76.       return TRUE;
  77.   }
  78.   
  79. --- 2090,2097 ----
  80.       STRCPY(p, "file ");
  81.       p += 5;
  82.       }
  83. !     sprintf((char *)p, wp->w_arg_idx_invalid ? "(%d) of %d)"
  84. !                 : "%d of %d)", wp->w_arg_idx + 1, arg_file_count);
  85.       return TRUE;
  86.   }
  87.   
  88. *** ../vim-5.5.38/src/screen.c    Wed Sep 22 10:06:18 1999
  89. --- src/screen.c    Wed Dec  1 19:50:58 1999
  90. ***************
  91. *** 2858,2864 ****
  92.   
  93.       case STL_ARGLISTSTAT:
  94.           tmp[0] = 0;
  95. !         if (append_arg_number(tmp, FALSE, (int)sizeof(tmp)))
  96.           str = tmp;
  97.           break;
  98.   
  99. --- 2858,2864 ----
  100.   
  101.       case STL_ARGLISTSTAT:
  102.           tmp[0] = 0;
  103. !         if (append_arg_number(wp, tmp, FALSE, (int)sizeof(tmp)))
  104.           str = tmp;
  105.           break;
  106.   
  107. *** ../vim-5.5.38/src/proto/buffer.pro    Wed Sep 22 10:06:13 1999
  108. --- src/proto/buffer.pro    Wed Dec  1 19:51:22 1999
  109. ***************
  110. *** 30,36 ****
  111.   void col_print __ARGS((char_u *buf, int col, int vcol));
  112.   void maketitle __ARGS((void));
  113.   void resettitle __ARGS((void));
  114. ! int append_arg_number __ARGS((char_u *buf, int add_file, int maxlen));
  115.   char_u *fix_fname __ARGS((char_u *fname));
  116.   void fname_expand __ARGS((char_u **ffname, char_u **sfname));
  117.   void do_arg_all __ARGS((int count, int forceit));
  118. --- 30,36 ----
  119.   void col_print __ARGS((char_u *buf, int col, int vcol));
  120.   void maketitle __ARGS((void));
  121.   void resettitle __ARGS((void));
  122. ! int append_arg_number __ARGS((WIN *wp, char_u *buf, int add_file, int maxlen));
  123.   char_u *fix_fname __ARGS((char_u *fname));
  124.   void fname_expand __ARGS((char_u **ffname, char_u **sfname));
  125.   void do_arg_all __ARGS((int count, int forceit));
  126. *** ../vim-5.5.38/src/version.c    Tue Nov  2 21:32:18 1999
  127. --- src/version.c    Wed Dec  1 20:15:31 1999
  128. ***************
  129. *** 420,420 ****
  130. --- 420,421 ----
  131.   {   /* Add new patch number below this line */
  132. +     39,
  133.  
  134. -- 
  135. hundred-and-one symptoms of being an internet addict:
  136. 140. You'd rather catch a score on the web than watch the game as
  137.      it is being played on tv.
  138.  
  139. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  140.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  141.