home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: patch 5.5.039
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- ------------
-
- Patch 5.5.039
- Problem: When using a custom status line, "%a" (file # of #) reports the
- index of the current window for all windows.
- Solution: Pass a window pointer to append_arg_number(), and pass the window
- being updated from build_stl_str_hl(). (Stephen P. Wall)
- Files: src/buffer.c, src/screen.c, src/proto/buffer.pro
-
-
- *** ../vim-5.5.38/src/buffer.c Wed Sep 22 10:06:20 1999
- --- src/buffer.c Wed Dec 1 19:50:27 1999
- ***************
- *** 1835,1841 ****
- (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
- }
-
- ! (void)append_arg_number(buffer, !shortmess(SHM_FILE), IOSIZE);
-
- if (dont_truncate)
- {
- --- 1846,1852 ----
- (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
- }
-
- ! (void)append_arg_number(curwin, buffer, !shortmess(SHM_FILE), IOSIZE);
-
- if (dont_truncate)
- {
- ***************
- *** 1971,1977 ****
- STRCPY(t_name, "VIM - ");
- home_replace(curbuf, curbuf->b_ffname,
- t_name + 6, IOSIZE - 106, TRUE);
- ! append_arg_number(t_name, FALSE, IOSIZE - 100);
- if (maxlen)
- {
- len = STRLEN(t_name);
- --- 1982,1988 ----
- STRCPY(t_name, "VIM - ");
- home_replace(curbuf, curbuf->b_ffname,
- t_name + 6, IOSIZE - 106, TRUE);
- ! append_arg_number(curwin, t_name, FALSE, IOSIZE - 100);
- if (maxlen)
- {
- len = STRLEN(t_name);
- ***************
- *** 2058,2064 ****
- * Return TRUE if it was appended.
- */
- int
- ! append_arg_number(buf, add_file, maxlen)
- char_u *buf;
- int add_file; /* Add "file" before the arg number */
- int maxlen; /* maximum nr of chars in buf or zero*/
- --- 2069,2076 ----
- * Return TRUE if it was appended.
- */
- int
- ! append_arg_number(wp, buf, add_file, maxlen)
- ! WIN *wp;
- char_u *buf;
- int add_file; /* Add "file" before the arg number */
- int maxlen; /* maximum nr of chars in buf or zero*/
- ***************
- *** 2078,2085 ****
- STRCPY(p, "file ");
- p += 5;
- }
- ! sprintf((char *)p, curwin->w_arg_idx_invalid ? "(%d) of %d)" :
- ! "%d of %d)", curwin->w_arg_idx + 1, arg_file_count);
- return TRUE;
- }
-
- --- 2090,2097 ----
- STRCPY(p, "file ");
- p += 5;
- }
- ! sprintf((char *)p, wp->w_arg_idx_invalid ? "(%d) of %d)"
- ! : "%d of %d)", wp->w_arg_idx + 1, arg_file_count);
- return TRUE;
- }
-
- *** ../vim-5.5.38/src/screen.c Wed Sep 22 10:06:18 1999
- --- src/screen.c Wed Dec 1 19:50:58 1999
- ***************
- *** 2858,2864 ****
-
- case STL_ARGLISTSTAT:
- tmp[0] = 0;
- ! if (append_arg_number(tmp, FALSE, (int)sizeof(tmp)))
- str = tmp;
- break;
-
- --- 2858,2864 ----
-
- case STL_ARGLISTSTAT:
- tmp[0] = 0;
- ! if (append_arg_number(wp, tmp, FALSE, (int)sizeof(tmp)))
- str = tmp;
- break;
-
- *** ../vim-5.5.38/src/proto/buffer.pro Wed Sep 22 10:06:13 1999
- --- src/proto/buffer.pro Wed Dec 1 19:51:22 1999
- ***************
- *** 30,36 ****
- void col_print __ARGS((char_u *buf, int col, int vcol));
- void maketitle __ARGS((void));
- void resettitle __ARGS((void));
- ! int append_arg_number __ARGS((char_u *buf, int add_file, int maxlen));
- char_u *fix_fname __ARGS((char_u *fname));
- void fname_expand __ARGS((char_u **ffname, char_u **sfname));
- void do_arg_all __ARGS((int count, int forceit));
- --- 30,36 ----
- void col_print __ARGS((char_u *buf, int col, int vcol));
- void maketitle __ARGS((void));
- void resettitle __ARGS((void));
- ! int append_arg_number __ARGS((WIN *wp, char_u *buf, int add_file, int maxlen));
- char_u *fix_fname __ARGS((char_u *fname));
- void fname_expand __ARGS((char_u **ffname, char_u **sfname));
- void do_arg_all __ARGS((int count, int forceit));
- *** ../vim-5.5.38/src/version.c Tue Nov 2 21:32:18 1999
- --- src/version.c Wed Dec 1 20:15:31 1999
- ***************
- *** 420,420 ****
- --- 420,421 ----
- { /* Add new patch number below this line */
- + 39,
-
- --
- hundred-and-one symptoms of being an internet addict:
- 140. You'd rather catch a score on the web than watch the game as
- it is being played on tv.
-
- --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /
-