]> git.pld-linux.org Git - packages/vim.git/blame - 6.2.114
- use new bonobo patch (20040115)
[packages/vim.git] / 6.2.114
CommitLineData
5f6937f1
AM
1To: vim-dev@vim.org
2Subject: Patch 6.2.114
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.2.114
11Problem: When stdout is piped through "tee", the size of the screen may not
12 be correct.
13Solution: Use stdin instead of stdout for ioctl() when stdin is a tty and
14 stdout isn't.
15Files: src/os_unix.c
16
17
18*** ../vim-6.2.113/src/os_unix.c Sat Sep 27 19:36:47 2003
19--- src/os_unix.c Wed Oct 1 15:33:39 2003
20***************
21*** 3042,3055 ****
22 /*
23 * 1. try using an ioctl. It is the most accurate method.
24 *
25! * Try using TIOCGWINSZ first, some systems that have it also define TIOCGSIZE
26! * but don't have a struct ttysize.
27 */
28 # ifdef TIOCGWINSZ
29 {
30 struct winsize ws;
31
32! if (ioctl(1, TIOCGWINSZ, &ws) == 0)
33 {
34 columns = ws.ws_col;
35 rows = ws.ws_row;
36--- 3042,3059 ----
37 /*
38 * 1. try using an ioctl. It is the most accurate method.
39 *
40! * Try using TIOCGWINSZ first, some systems that have it also define
41! * TIOCGSIZE but don't have a struct ttysize.
42 */
43 # ifdef TIOCGWINSZ
44 {
45 struct winsize ws;
46+ int fd = 1;
47
48! /* When stdout is not a tty, use stdin for the ioctl(). */
49! if (!isatty(fd) && isatty(read_cmd_fd))
50! fd = read_cmd_fd;
51! if (ioctl(fd, TIOCGWINSZ, &ws) == 0)
52 {
53 columns = ws.ws_col;
54 rows = ws.ws_row;
55***************
56*** 3059,3066 ****
57 # ifdef TIOCGSIZE
58 {
59 struct ttysize ts;
60
61! if (ioctl(1, TIOCGSIZE, &ts) == 0)
62 {
63 columns = ts.ts_cols;
64 rows = ts.ts_lines;
65--- 3063,3074 ----
66 # ifdef TIOCGSIZE
67 {
68 struct ttysize ts;
69+ int fd = 1;
70
71! /* When stdout is not a tty, use stdin for the ioctl(). */
72! if (!isatty(fd) && isatty(read_cmd_fd))
73! fd = read_cmd_fd;
74! if (ioctl(fd, TIOCGSIZE, &ts) == 0)
75 {
76 columns = ts.ts_cols;
77 rows = ts.ts_lines;
78*** ../vim-6.2.113/src/version.c Sun Oct 12 17:10:47 2003
79--- src/version.c Sun Oct 12 17:12:48 2003
80***************
81*** 639,640 ****
82--- 639,642 ----
83 { /* Add new patch number below this line */
84+ /**/
85+ 114,
86 /**/
87
88--
89hundred-and-one symptoms of being an internet addict:
90178. You look for an icon to double-click to open your bedroom window.
91
92 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
93/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
94\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
95 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
This page took 0.043832 seconds and 4 git commands to generate.