4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: In gvim "!grep a *.c" spews out a lot of text that can't be
13 Solution: When looping to read and show text, do check for typed characters
18 *** ../vim-7.2.120/src/os_unix.c Wed Feb 4 14:18:44 2009
19 --- src/os_unix.c Sun Feb 22 00:54:05 2009
26 + # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
27 + struct timeval start_tv;
31 if (pty_master_fd >= 0)
34 ga_init2(&ga, 1, BUFLEN);
42 ga_init2(&ga, 1, BUFLEN);
45 ! # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
46 ! gettimeofday(&start_tv, NULL);
53 * that a typed password is echoed for ssh or gpg command.
54 * Don't get characters when the child has already
55 * finished (wait_pid == 0).
56 - * Don't get extra characters when we already have one.
57 * Don't read characters unless we didn't get output for a
58 ! * while, avoids that ":r !ls" eats typeahead.
61 if (!(options & SHELL_EXPAND)
63 (SHELL_READ|SHELL_WRITE|SHELL_COOKED))
64 != (SHELL_READ|SHELL_WRITE|SHELL_COOKED)
72 ! && (len = ui_inchar(ta_buf,
73 ! BUFLEN, 10L, 0)) > 0)))
77 * Check for CTRL-C: send interrupt signal to child.
79 * that a typed password is echoed for ssh or gpg command.
80 * Don't get characters when the child has already
81 * finished (wait_pid == 0).
82 * Don't read characters unless we didn't get output for a
83 ! * while (noread_cnt > 4), avoids that ":r !ls" eats
87 if (!(options & SHELL_EXPAND)
89 (SHELL_READ|SHELL_WRITE|SHELL_COOKED))
90 != (SHELL_READ|SHELL_WRITE|SHELL_COOKED)
96 ! && (ta_len > 0 || noread_cnt > 4))
100 + /* Get extra characters when we don't have any.
101 + * Reset the counter and timer. */
103 + # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
104 + gettimeofday(&start_tv, NULL);
106 + len = ui_inchar(ta_buf, BUFLEN, 10L, 0);
108 + if (ta_len > 0 || len > 0)
112 * Check for CTRL-C: send interrupt signal to child.
117 mch_memmove(ta_buf, ta_buf + len, ta_len);
127 mch_memmove(ta_buf, ta_buf + len, ta_len);
141 + # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
143 + struct timeval now_tv;
146 + /* Avoid that we keep looping here without
147 + * checking for a CTRL-C for a long time. Don't
148 + * break out too often to avoid losing typeahead. */
149 + gettimeofday(&now_tv, NULL);
150 + msec = (now_tv.tv_sec - start_tv.tv_sec) * 1000L
151 + + (now_tv.tv_usec - start_tv.tv_usec) / 1000L;
161 /* If we already detected the child has finished break the
162 *** ../vim-7.2.120/src/version.c Sun Feb 22 02:36:36 2009
163 --- src/version.c Sun Feb 22 02:48:03 2009
167 { /* Add new patch number below this line */
173 hundred-and-one symptoms of being an internet addict:
174 111. You and your friends get together regularly on IRC, even though
175 all of you live in the same city.
177 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
178 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
179 \\\ download, build and distribute -- http://www.A-A-P.org ///
180 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///