From 9e1d2839c64536528c10d2ffc0e744b1e3a4bdcb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar <Bram@vim.org> Date: Sun, 6 May 2007 12:51:41 +0000 Subject: [PATCH] updated for version 7.1a --- runtime/doc/usr_41.txt | 18 +++++++++++++++--- src/feature.h | 1 - src/os_unix.c | 8 +++++--- src/tag.c | 2 ++ 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 652378d70d..c9dc0efc3e 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.0. Last change: 2007 Apr 26 +*usr_41.txt* For Vim version 7.1a. Last change: 2007 Apr 26 VIM USER MANUAL - by Bram Moolenaar @@ -1482,7 +1482,9 @@ commands (there are a few more commands with this restriction). For the :execute cmd |" do it With the '|' character the command is separated from the next one. And that -next command is only a comment. +next command is only a comment. For the last command you need to do two +things: |:execute| and use '|': > + :exe '!ls *.c' |" list C files Notice that there is no white space before the '|' in the abbreviation and mapping. For these commands, any character until the end-of-line or '|' is @@ -1491,9 +1493,19 @@ trailing whitespace is included: > :map <F4> o#include -To avoid these problems, you can set the 'list' option when editing vimrc +To spot these problems, you can set the 'list' option when editing vimrc files. +For Unix there is one special way to comment a line, that allows making a Vim +script executable: > + #!/usr/bin/env vim -S + echo "this is a Vim script" + quit + +The "#" command by itself lists a line with the line number. Adding an +exclamation mark changes it into doing nothing, so that you can add the shell +command to execute the rest of the file. |:#!| |-S| + PITFALLS diff --git a/src/feature.h b/src/feature.h index 9e99b91a4d..00dd014b8c 100644 --- a/src/feature.h +++ b/src/feature.h @@ -1257,4 +1257,3 @@ || defined(FEAT_BIG) # define FEAT_AUTOCHDIR #endif - diff --git a/src/os_unix.c b/src/os_unix.c index a188452917..beeea3f9ce 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1256,9 +1256,11 @@ catch_signals(func_deadly, func_other) /* * Handling of SIGHUP, SIGQUIT and SIGTERM: - * "when" == a signal: when busy, postpone, otherwise return TRUE - * "when" == SIGNAL_BLOCK: Going to be busy, block signals - * "when" == SIGNAL_UNBLOCK: Going wait, unblock signals + * "when" == a signal: when busy, postpone and return FALSE, otherwise + * return TRUE + * "when" == SIGNAL_BLOCK: Going to be busy, block signals + * "when" == SIGNAL_UNBLOCK: Going to wait, unblock signals, use postponed + * signal * Returns TRUE when Vim should exit. */ int diff --git a/src/tag.c b/src/tag.c index 66bcfcd0cf..aa1ab755ea 100644 --- a/src/tag.c +++ b/src/tag.c @@ -1625,6 +1625,8 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname) eof = tag_fgets(lbuf, LSIZE, fp); if (!eof && search_info.curr_offset != 0) { + /* The explicit cast is to work around a bug in gcc 3.4.2 + * (repeated below). */ search_info.curr_offset = ftell(fp); if (search_info.curr_offset == search_info.high_offset) { -- GitLab