Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vimdev · Vim (Vi IMproved) text editor developers list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 13712 - 13741 of 69880   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#13712 From: Allan Kelly <allan.kelly@...>
Date: Tue Apr 11, 2000 3:10 pm
Subject: Re: v-insert & count [patch]
allan.kelly@...
Send Email Send Email
 
Johannes Zellner wrote:
>
> Hello,
>
> having
>     fred
>     fred
>     fred
> highlighting the column of f's with <c-v> followed by 10Ia<esc> gives
>     afred
>     afred
>     afred
> I would have expected
>     aaaaaaaaaafred
>     aaaaaaaaaafred
>     aaaaaaaaaafred
>
> because visual.txt says:
> If you want to give a count to the command, do this just before typing the
> operator character: "v{move-around}3>" (move lines 3 indents to the right).
>
> --
>    Johannes

Oh, I wrote that block insert stuff.
Patch against vanilla 5.6 attached. Hope it's OK, I don't make many patches.

al.

--

  # Allan Kelly                                http://www.plotsearch.co.uk
  # (+44) (0)131 524 8500
  # allan.kelly@....     ..
  # /Software Engineer/i            . .    .    . .
  # ------------------------------   *      . .     .    . .
  # "If you are a Visual Basic programmer,   *       . .     .
  #  these details are none of your business."        *       .  . .
  # Mr Bunny's Guide to Active X, by Carlton Egremont III      *     . .
  # ------------------------------      vi: set noet tw=80 sts=4 ts=8  : .
diff --exclude *o --exclude *~ --exclude config* -cr vim-5.6/src/normal.c
vim-5.6_dev/src/normal.c
*** vim-5.6/src/normal.c Mon Dec 20 08:45:46 1999
--- vim-5.6_dev/src/normal.c Tue Apr 11 15:39:06 2000
***************
*** 1871,1877 ****
  		 /* This is a new edit command, not a restart.  We don't edit
  		  * recursively. */
  		 restart_edit = 0;
! 	 op_insert(oap); /* handles insert & append; will call edit() */
  	     }
   #endif
  	     break;
--- 1871,1878 ----
  		 /* This is a new edit command, not a restart.  We don't edit
  		  * recursively. */
  		 restart_edit = 0;
! 	 op_insert(oap, cap->count1);/* handles insert & append
! 					     * will call edit() */
  	     }
   #endif
  	     break;
diff --exclude *o --exclude *~ --exclude config* -cr vim-5.6/src/ops.c
vim-5.6_dev/src/ops.c
*** vim-5.6/src/ops.c Mon Dec 13 15:07:36 1999
--- vim-5.6_dev/src/ops.c Tue Apr 11 15:46:10 2000
***************
*** 480,499 ****
       int  count = 0; /* extra spaces to replace a cut TAB */
       int  spaces = 0; /* non-zero if cutting a TAB */
       colnr_t offset;  /* pointer along new line */
!     int  s_len;  /* STRLEN(s) */
       char_u *newp, *oldp; /* new, old lines */
       linenr_t lnum;  /* loop var */
       int  oldstate = State;

       State = INSERT;  /* don't want REPLACE for State */
       for (lnum = oap->start.lnum + 1; lnum <= oap->end.lnum; lnum++)
       {
  	 block_prep(oap, bdp, lnum, TRUE);
  	 if (bdp->is_short && b_insert)
  	     continue; /* OP_INSERT, line ends before block start */

-  s_len = STRLEN(s);
-
  	 oldp = ml_get(lnum);

  	 if (b_insert)
--- 480,499 ----
       int  count = 0; /* extra spaces to replace a cut TAB */
       int  spaces = 0; /* non-zero if cutting a TAB */
       colnr_t offset;  /* pointer along new line */
!     unsigned s_len;  /* STRLEN(s) */
       char_u *newp, *oldp; /* new, old lines */
       linenr_t lnum;  /* loop var */
       int  oldstate = State;

       State = INSERT;  /* don't want REPLACE for State */
+     s_len = STRLEN(s);
+
       for (lnum = oap->start.lnum + 1; lnum <= oap->end.lnum; lnum++)
       {
  	 block_prep(oap, bdp, lnum, TRUE);
  	 if (bdp->is_short && b_insert)
  	     continue; /* OP_INSERT, line ends before block start */

  	 oldp = ml_get(lnum);

  	 if (b_insert)
***************
*** 1788,1795 ****
    * op_insert - Insert and append operators for Visual mode.
    */
       void
! op_insert(oap)
       OPARG *oap;
   {
       long  ins_len, pre_textlen = 0;
       char_u  *firstline, *ins_text;
--- 1788,1796 ----
    * op_insert - Insert and append operators for Visual mode.
    */
       void
! op_insert(oap, count1)
       OPARG *oap;
+     long count1;
   {
       long  ins_len, pre_textlen = 0;
       char_u  *firstline, *ins_text;
***************
*** 1835,1841 ****
  	     inc_cursor();
       }

!     edit(NUL, FALSE, (linenr_t)1);

       /* if user has moved off this line, we don't know what to do, so do
        * nothing */
--- 1836,1842 ----
  	     inc_cursor();
       }

!     edit(NUL, FALSE, (linenr_t)count1);

       /* if user has moved off this line, we don't know what to do, so do
        * nothing */

#13713 From: Wichert Akkerman <wichert@...>
Date: Tue Apr 11, 2000 5:11 am
Subject: Re: xxd - stdout bug
wichert@...
Send Email Send Email
 
Previously Juergen Weigert wrote:
> Valid point. I would now rather check ferror() just before exit, and
> leave fclose()'s away from the code, until we understand what is going
> on there.

Fair enough, although it really shouldn't matter. It sounds like a
bug somewhere is triggered by this and we're just trying to work
around it..

Wichert.

--
   _________________________________________________________________
  / Generally uninteresting signature - ignore at your convenience  \
| wichert@...                    http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |

#13714 From: Wichert Akkerman <wichert@...>
Date: Tue Apr 11, 2000 4:37 am
Subject: Re: CVS?
wichert@...
Send Email Send Email
 
Previously Johannes Zellner wrote:
> It *was* up and is up to date (5.6.1-61).
> I don't know why it's currently unreachable.

traceroute won't work anyway since icmp is blocked. I'll check what is up.

Wichert.

--
   _________________________________________________________________
  / Generally uninteresting signature - ignore at your convenience  \
| wichert@...                    http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |

#13715 From: Johannes Zellner <johannes@...>
Date: Tue Apr 11, 2000 8:41 pm
Subject: Re: CVS?
johannes@...
Send Email Send Email
 
On Tue, 11 Apr 2000, Wichert Akkerman wrote:

> Previously Johannes Zellner wrote:
> > It *was* up and is up to date (5.6.1-61).
> > I don't know why it's currently unreachable.
>
> traceroute won't work anyway since icmp is blocked. I'll check what is up.
I can log in again. uptime shows 56 days.
What's going on there?

--
    Johannes

#13716 From: Johannes Zellner <johannes@...>
Date: Tue Apr 11, 2000 9:09 pm
Subject: Re: v-insert & count [patch]
johannes@...
Send Email Send Email
 
On Tue, 11 Apr 2000, Allan Kelly wrote:

> Johannes Zellner wrote:
> >
> > Hello,
> >
> > having
> >     fred
> >     fred
> >     fred
> > highlighting the column of f's with <c-v> followed by 10Ia<esc> gives
> >     afred
> >     afred
> >     afred
> > I would have expected
> >     aaaaaaaaaafred
> >     aaaaaaaaaafred
> >     aaaaaaaaaafred
> >
> > because visual.txt says:
> > If you want to give a count to the command, do this just before typing the
> > operator character: "v{move-around}3>" (move lines 3 indents to the right).
> >
> > --
> >    Johannes
>
> Oh, I wrote that block insert stuff.
> Patch against vanilla 5.6 attached. Hope it's OK, I don't make many patches.

applies against 5.6.1-61 with a few offsets.
compiles after `make proto'.
works great. thanks.

--
    Johannes

#13717 From: Ronald Hoogenboom <rhoogenboom@...>
Date: Mon Apr 3, 2000 11:47 am
Subject: xxd - stdout bug
rhoogenboom@...
Send Email Send Email
 
Hi all,

The utility xxd that comes with vim5.4..5.6 (and probably before that) has a
problem when the standard output is piped to another process and also when
used in vim with :r !xxd <some_file>. It alway returns with error code 139
and no output is produced. This is because the output stream is always
fclose()'d on exit of the program and that shouldn't be done if the output
stream is stdout. This is also done with the input stream, but that is
harmless with stdin for all I know.

FIX:
vim <path-to-vim-source>/src/xxd/xxd.c

:%s/fclose(\(fpi\=\))/if (\1!=stdin) &/
:%s/fclose(\(fpo\))/if (\1!=stdout) &/
:wq

and remake xxd

Best Regards,
Ronald Hoogenboom

#13718 From: Devin Weaver <devin@...>
Date: Mon Apr 3, 2000 3:06 pm
Subject: aspvbs.vim latest patch
devin@...
Send Email Send Email
 
I would like to submit this as the latest aspvbs syntax. I've tested it and
feel it's ready for release.

BTW for those who like patches heres a patch:

*** ../vim-5.6.x/runtime/syntax/aspvbs.vim Mon Apr  3 11:02:03 2000
--- runtime/syntax/aspvbs.vim Sun Jan 16 10:08:32 2000
***************
*** 2,8 ****
   " Language: Microsoft VBScript Web Content (ASP)
   " Maintainer: Devin Weaver <ktohg@...>
   " URL:  http://www.tritarget.com/vim/syntax
! " Last Change: 2000 Mar 09

   " Remove any old syntax stuff hanging around
   syn clear
--- 2,8 ----
   " Language: Microsoft VBScript Web Content (ASP)
   " Maintainer: Devin Weaver <ktohg@...>
   " URL:  http://www.tritarget.com/vim/syntax
! " Last Change: 1999 Sep 18

   " Remove any old syntax stuff hanging around
   syn clear
***************
*** 113,120 ****
   syn cluster AspVBScriptTop
contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,\
AspVBSComment,AspVBSError

   " Define AspVBScript delimeters
! " <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax.
! syn region  AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter
start=+<%=\=+ end=+%>+ contains=@AspVBScriptTop
   syn region  AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter
start=+<script\s\+language="\=vbscript"\=[^>]*\s\+runatserver[^>]*>+
end=+</script>+ contains=@AspVBScriptTop

   " Synchronization
--- 113,119 ----
   syn cluster AspVBScriptTop
contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,\
AspVBSComment,AspVBSError

   " Define AspVBScript delimeters
! syn region  AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter
start=+<%+ skip=+".*%>.*"+ end=+%>+ contains=@AspVBScriptTop
   syn region  AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter
start=+<script\s\+language="\=vbscript"\=[^>]*\s\+runatserver[^>]*>+
end=+</script>+ contains=@AspVBScriptTop

   " Synchronization

--
Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)
	 -- Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi
" Vim syntax file
" Language: Microsoft VBScript Web Content (ASP)
" Maintainer: Devin Weaver <ktohg@...>
" URL:  http://www.tritarget.com/vim/syntax
" Last Change: 2000 Mar 09

" Remove any old syntax stuff hanging around
syn clear

if !exists("main_syntax")
   let main_syntax = 'aspvbs'
endif

so <sfile>:p:h/html.vim

syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags

" Functions and methods that are in VB but will cause errors in an ASP page
" This is helpfull if your porting VB code to ASP
" I removed (Count, Item) because these are common variable names in AspVBScript
syn keyword AspVBSError contained Val Str CVar CVDate DoEvents GoSub Return GoTo
syn keyword AspVBSError contained Date Time Timer Stop LinkExecute
syn keyword AspVBSError contained Add With Type LinkPoke
syn keyword AspVBSError contained LinkRequest LinkSend Declare New Optional
Sleep
syn keyword AspVBSError contained ParamArray Static Erl TypeOf Like LSet RSet
Mid StrConv
" It may seem that most of these can fit into a keyword clause but keyword takes
" priority over all so I can't get the multi-word matches
syn match AspVBSError contained "\<Def[a-zA-Z0-9_]\+\>"
syn match AspVBSError contained "^\s*Open"
syn match AspVBSError contained "Debug\.[a-zA-Z0-9_]*"
syn match AspVBSError contained "^\s*[a-zA-Z0-9_]\+:"
syn match AspVBSError contained "[a-zA-Z0-9_]\+![a-zA-Z0-9_]\+"
syn match AspVBSError contained "^\s*#.*$"
syn match AspVBSError contained "\<As\s\+[a-zA-Z0-9_]*"
syn match AspVBSError contained "\<End\>\|\<Exit\>"
syn match AspVBSError contained
"\<On\s\+Error\>\|\<On\>\|\<Error\>\|\<Resume\s\+Next\>\|\<Resume\>"
syn match AspVBSError contained
"\<Option\s\+\(Base\|Compare\|Private\s\+Module\)\>"
syn match AspVBSError contained "\<Property\s\+\(Get\|Let\|Set\)\>"

" AspVBScript Reserved Words.
syn match AspVBSStatement contained
"\<On\s\+Error\s\+Resume\s\+Next\>\|\<Next\>"
syn match AspVBSStatement contained
"\<End\s\+\(If\|For\|Select\|Function\|Sub\)\>"
syn match AspVBSStatement contained "\<Exit\s\+\(Do\|For\|Sub\|Function\)\>"
syn match AspVBSStatement contained "\<Option\s\+Explicit\>"
syn match AspVBSStatement contained "\<For\s\+Each\>\|\<For\>"
syn match AspVBSStatement contained "\<Set\>"
syn keyword AspVBSStatement contained Call Const Dim Do Loop Erase And
syn keyword AspVBSStatement contained Function If Then Else ElseIf Or
syn keyword AspVBSStatement contained Private Public Randomize ReDim
syn keyword AspVBSStatement contained Select Case Sub While Wend Not

" AspVBScript Functions
syn keyword AspVBSFunction contained Abs Array Asc Atn CBool CByte CCur CDate
CDbl
syn keyword AspVBSFunction contained Chr CInt CLng Cos CreateObject CSng CStr
Date
syn keyword AspVBSFunction contained DateAdd DateDiff DatePart DateSerial
DateValue
syn keyword AspVBSFunction contained Day Exp Filter Fix FormatCurrency
syn keyword AspVBSFunction contained FormatDateTime FormatNumber FormatPercent
syn keyword AspVBSFunction contained GetObject Hex Hour InputBox InStr InStrRev
Int
syn keyword AspVBSFunction contained IsArray IsDate IsEmpty IsNull IsNumeric
syn keyword AspVBSFunction contained IsObject Join LBound LCase Left Len
LoadPicture
syn keyword AspVBSFunction contained Log LTrim Mid Minute Month MonthName MsgBox
Now
syn keyword AspVBSFunction contained Oct Replace RGB Right Rnd Round RTrim
syn keyword AspVBSFunction contained ScriptEngine ScriptEngineBuildVersion
syn keyword AspVBSFunction contained ScriptEngineMajorVersion
syn keyword AspVBSFunction contained ScriptEngineMinorVersion Second Sgn Sin
Space
syn keyword AspVBSFunction contained Split Sqr StrComp StrReverse String Tan
Time
syn keyword AspVBSFunction contained TimeSerial TimeValue Trim TypeName UBound
UCase
syn keyword AspVBSFunction contained VarType Weekday WeekdayName Year

" AspVBScript Methods
syn keyword AspVBSMethods contained Add AddFolders BuildPath Clear Close Copy
syn keyword AspVBSMethods contained CopyFile CopyFolder CreateFolder
CreateTextFile
syn keyword AspVBSMethods contained Delete DeleteFile DeleteFolder DriveExists
syn keyword AspVBSMethods contained Exists FileExists FolderExists
syn keyword AspVBSMethods contained GetAbsolutePathName GetBaseName GetDrive
syn keyword AspVBSMethods contained GetDriveName GetExtensionName GetFile
syn keyword AspVBSMethods contained GetFileName GetFolder GetParentFolderName
syn keyword AspVBSMethods contained GetSpecialFolder GetTempName Items Keys Move
syn keyword AspVBSMethods contained MoveFile MoveFolder OpenAsTextStream
syn keyword AspVBSMethods contained OpenTextFile Raise Read ReadAll ReadLine
Remove
syn keyword AspVBSMethods contained RemoveAll Skip SkipLine Write
WriteBlankLines
syn keyword AspVBSMethods contained WriteLine

" AspVBScript Number Contstants
" Integer number, or floating point number without a dot.
syn match  AspVBSNumber contained "\<\d\+\>"
" Floating point number, with dot
syn match  AspVBSNumber contained "\<\d\+\.\d*\>"
" Floating point number, starting with a dot
syn match  AspVBSNumber contained "\.\d\+\>"

" String and Character Contstants
" removed (skip=+\\\\\|\\"+) because VB doesn't have backslash escaping in
" strings (or does it?)
syn region  AspVBSString contained   start=+"+  end=+"+ keepend

" AspVBScript Comments
syn region  AspVBSComment contained start="^REM\s\|\sREM\s" end="$"
contains=AspVBSTodo keepend
syn region  AspVBSComment   contained start="^'\|\s'"   end="$"
contains=AspVBSTodo keepend
" misc. Commenting Stuff
syn keyword AspVBSTodo contained TODO FIXME

" Cosmetic syntax errors commanly found in VB but not in AspVBScript
" AspVBScript doesn't use line numbers
syn region  AspVBSError contained start="^\d" end="\s" keepend
" AspVBScript also doesn't have type defining variables
syn match   AspVBSError  contained "[a-zA-Z0-9_][\$&!#]"ms=s+1
" Since 'a%' is a VB variable with a type and in AspVBScript you can have 'a%>'
" I have to make a special case so 'a%>' won't show as an error.
syn match   AspVBSError  contained "[a-zA-Z0-9_]%\($\|[^>]\)"ms=s+1

" Top Cluster
syn cluster AspVBScriptTop
contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,\
AspVBSComment,AspVBSError

" Define AspVBScript delimeters
" <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax.
syn region  AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+
end=+%>+ contains=@AspVBScriptTop
syn region  AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter
start=+<script\s\+language="\=vbscript"\=[^>]*\s\+runatserver[^>]*>+
end=+</script>+ contains=@AspVBScriptTop

" Synchronization
syn sync match AspVBSSyncGroup grouphere AspVBScriptInsideHtmlTags "<%"
" This is a kludge so the HTML will sync properly
syn sync match htmlHighlight groupthere htmlTag "%>"

if !exists("did_asp_syntax_inits")
   let did_asp_syntax_inits = 1
   " The default methods for highlighting.  Can be overridden later
   "hi link AspVBScript  Special
   hi link AspVBSLineNumber Comment
   hi link AspVBSNumber  Number
   hi link AspVBSError  Error
   hi link AspVBSStatement Statement
   hi link AspVBSString  String
   hi link AspVBSComment  Comment
   hi link AspVBSTodo  Todo
   hi link AspVBSFunction Identifier
   hi link AspVBSMethods  PreProc
   hi link AspVBSEvents  Special
   hi link AspVBSTypeSpecifier Type
endif

let b:current_syntax = "aspvbs"

if main_syntax == 'aspvbs'
   unlet main_syntax
endif

" vim: ts=8:sw=2:sts=0:noet

#13719 From: Bram Moolenaar <Bram@...>
Date: Mon Apr 3, 2000 1:38 pm
Subject: Patch 5.6.052
Bram@...
Send Email Send Email
 
Patch 5.6.052
Problem:    Multi-byte: When an Ex command has a '|' or '"' as a second byte,
	     it terminates the command.
Solution:   Skip second byte of multi-byte char when checking for '|' and '"'.
	     (Asai Kenichi)
Files:     src/ex_docmd.c


*** ../vim-5.6.51/src/ex_docmd.c Mon Mar 27 21:52:25 2000
--- src/ex_docmd.c Mon Apr  3 09:28:24 2000
***************
*** 3622,3627 ****
--- 3622,3631 ----
  		 break;
  	     }
  	 }
+ #ifdef MULTI_BYTE
+  else if (is_dbcs && p[1] && IsLeadByte(*p))
+ 	    ++p; /* skip second byte of double-byte char */
+ #endif
       }
       if (!(eap->argt & NOTRLCOM)) /* remove trailing spaces */
  	 del_trailing_spaces(eap->arg);
*** ../vim-5.6.51/src/version.c Mon Apr  3 09:35:21 2000
--- src/version.c Mon Apr  3 09:35:02 2000
***************
*** 420,421 ****
--- 420,423 ----
   {   /* Add new patch number below this line */
+ /**/
+     52,
   /**/

--
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
		 [real standing law in Massachusetts, United States of America]

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

#13720 From: Bram Moolenaar <Bram@...>
Date: Mon Apr 3, 2000 8:09 pm
Subject: Patch 5.6.053
Bram@...
Send Email Send Email
 
Patch 5.6.053
Problem:    CTRL-] doesn't work on a tag that contains a '|'. (Cesar Crusius)
Solution:   Escape '|', '"' and '\' in tag names when using CTRL-] and also
             for command-line completion.
Files:      src/ex_getln.c, src/normal.c


*** ../vim-5.6.52/src/ex_getln.c Sun Apr  2 11:57:11 2000
--- src/ex_getln.c Mon Apr  3 21:09:20 2000
***************
*** 2137,2151 ****
  	     if (options & WILD_HOME_REPLACE)
  		 tilde_replace(str, cmd_numfiles, cmd_files);

! 	    /*
! 	     * Insert backslashes into a file name before a space, \, %, # and
! 	     * wildmatch characters, except '~'.
! 	     */
! 	    if ((options & WILD_ESCAPE)
! 		    && (expand_context == EXPAND_FILES
! 		 || expand_context == EXPAND_BUFFERS
! 		 || expand_context == EXPAND_DIRECTORIES))
  	     {
  		 for (i = 0; i < cmd_numfiles; ++i)
  		 {
  		     /* for ":set path=" we need to escape spaces twice */
--- 2137,2152 ----
  	     if (options & WILD_HOME_REPLACE)
  		 tilde_replace(str, cmd_numfiles, cmd_files);

! 	    if (options & WILD_ESCAPE)
  	     {
+ 	      if (expand_context == EXPAND_FILES
+ 		 || expand_context == EXPAND_BUFFERS
+ 		 || expand_context == EXPAND_DIRECTORIES)
+ 	      {
+ 	 /*
+ 		 * Insert a backslash into a file name before a space, \, %, #
+ 		 * and wildmatch characters, except '~'.
+ 		 */
  		 for (i = 0; i < cmd_numfiles; ++i)
  		 {
  		     /* for ":set path=" we need to escape spaces twice */
***************
*** 2200,2205 ****
--- 2201,2223 ----
  		     }
  		 }
  		 expand_set_path = FALSE;
+ 	      }
+ 	      else if (expand_context == EXPAND_TAGS)
+ 	      {
+ 	 /*
+ 		 * Insert a backslash before characters in a tag name that
+ 		 * would terminate the ":tag" command.
+ 		 */
+ 	 for (i = 0; i < cmd_numfiles; ++i)
+ 	 {
+ 		    p = vim_strsave_escaped(cmd_files[i], (char_u *)"\\|\"");
+ 		    if (p != NULL)
+ 		    {
+ 		 vim_free(cmd_files[i]);
+ 		 cmd_files[i] = p;
+ 		    }
+ 	 }
+ 	      }
  	     }

  	     /*
*** ../vim-5.6.52/src/normal.c Sun Apr  2 13:04:17 2000
--- src/normal.c Mon Apr  3 20:38:52 2000
***************
*** 3756,3763 ****
       else if (cmdchar == 'K' && *p_kp != NUL)
  	 aux_ptr = escape_chars;
       else
!  /* Don't escape chars in tag with a backslash */
!  aux_ptr = (char_u *)"";
       while (n--)
       {
  	 /* put a backslash before \ and some others */
--- 3757,3764 ----
       else if (cmdchar == 'K' && *p_kp != NUL)
  	 aux_ptr = escape_chars;
       else
!  /* Don't escape spaces and Tabs in a tag with a backslash */
!  aux_ptr = (char_u *)"\\|\"";
       while (n--)
       {
  	 /* put a backslash before \ and some others */
*** ../vim-5.6.52/src/version.c Mon Apr  3 09:38:10 2000
--- src/version.c Mon Apr  3 21:05:42 2000
***************
*** 420,421 ****
--- 420,423 ----
   {   /* Add new patch number below this line */
+ /**/
+     53,
   /**/

--
No man may purchase alcohol without written consent from his wife.
		 [real standing law in Pennsylvania, United States of America]

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

#13721 From: Flemming Madsen <fma@...>
Date: Tue Apr 4, 2000 12:07 pm
Subject: 'comments' option in tcl.vim
fma@...
Send Email Send Email
 
Hi

I think it is a bit unexpected that tcl.vim sets the 'comments'
option.

> fma@freja> grep 'set.*comments' $VIM/vim56/syntax/*
> /usr/vim/vim56/syntax/tcl.vim:set comments=:#

I suggest that this is removed from the syntax file.

Especially after spending half a day, figuring out why I
could not set 'comments' from an autofunction ;-)

Best Regards

/Flemming

#13722 From: "Robert Webb" <RobertW@...>
Date: Wed Apr 12, 2000 4:34 am
Subject: Yet another patch to stop pixel snow.
RobertW@...
Send Email Send Email
 
Hi,

Attached is another patch to fix "pixel snow" caused by bold fonts whose
characters spill over the left edge.

I know I already fixed this, but there was a case I didn't handle, and I
kept noticing left over pixels around the screen.  The case is at the end of
screen_line(), where the rest of the line is cleared.  First, existing
blanks are skipped.  Then if the rest of the line started with a bold
character, its spillage may be left behind.

Anyway, the attached patch fixes it.  This time I've just ignored the
mutli-byte case, ie if multi-byte is active my fix isn't done.  This means
the problem may still be there in multi-byte, but until someone notices the
problem there's no point fixing it anyway, and I don't know whether the
problem would exist for multi-byte or not (does anyone using multi-byte have
the "pixel snow" problem in the GUI?).

Thanks,
Rob.

--

Robert Webb <RobertW@...>, R&D
FAMOUS Technologies <http://www.famoustech.com>
   of Blaze International <http://www.blazelimited.com>
Phone: +61 (3) 9826 9433 ext 202 Fax: +61 (3) 9826 9115

See FAMOUS at NAB2000 April 8-13 <http://www.nab.org>
--- screen.c.orig Wed Apr 12 11:31:10 2000
+++ screen.c Wed Apr 12 14:15:58 2000
@@ -2154,7 +2154,27 @@
 	     ++col;
 	 }
 	 if (col < Columns)
+ {
+#ifdef USE_GUI
+     /*
+      * In the GUI, clearing the rest of the line may leave pixels
+      * behind if the first character cleared was bold.  Some bold fonts
+      * spill over the left.  In this case we redraw the previous
+      * character too.
+      */
+     if (gui.in_use && col > 0
+#ifdef MULTI_BYTE
+  && !is_dbcs
+#endif
+  )
+     {
+  hl = *(screenp_to + Columns);
+  if (hl > HL_ALL || (hl & HL_BOLD))
+ 	    screen_char(screenp_to - 1, row, col - 1);
+     }
+#endif
 	     screen_fill(row, row + 1, col, (int)Columns, ' ', ' ', 0);
+ }
      }
  }

#13723 From: "Ron Aaron" <ron@...>
Date: Tue Apr 4, 2000 7:32 am
Subject: statusline crash
ron@...
Send Email Send Email
 
Hi all -

Setting a statusline wider than the window width makes vim crash.  Here is a
script which will crash vim (5.5.53, Linux GTK)


set nocp
set ruler
au VimEnter * :call Start()

func Start()
	 set columns=40
	 let s='This is longer than forty characters, so it will make vim crash'

	 let &stl=s
	 new
endfunc

#13724 From: "Potts, Douglas" <Douglas.Potts@...>
Date: Tue Apr 4, 2000 2:32 pm
Subject: myfiletypefile correction/improvement(?)
Douglas.Potts@...
Send Email Send Email
 
I've noticed that for my own syntax files, if I re-set the syntax by doing
:syntax off
:syntax on

That they aren't sourcing in the corresponding syntax file for non-standard
vim syntaxes.  It seems to come from the fact that anything setup in
myfiletypefile doesn't get included in the filetype augroup (example below
from
Vim-5.6)

" Z80 assembler asz80
au BufNewFile,BufRead *.z8a 	 set ft=z8a

augroup END


" Source the user-specified filetype file
if exists("myfiletypefile") && file_readable(expand(myfiletypefile))
   execute "source " . myfiletypefile
endif

And so the line in syntax.vim that says:
" Execute the syntax autocommands for the each buffer.
doautoall filetype BufRead

Doesn't catch for these, and the highlighting only comes on when my own
BufEnter autocommand triggers when I re-enter those buffers.

My suggestion would be to include the myfiletypefile sourcing inside of the
filetype augroup definition (I've tried this and it works).

My apologies if I missed an earlier correction to this.

Thanks,
-Doug

--
  Appl. Product Development S/W Engineer, Dispensing Group FANUC Robotics,
NA.
  Douglas L. Potts   Phone: 248-377-7990    E-mail: pottsdl@...
*Top 20 Replies by Programmers when their programs do not work*
  14. There is something funky in your data.
PGP Public key: http://homestead.deja.com/user.pottsdl/files/pgp_pub.html

#13725 From: Zdenek Sekera <zs@...>
Date: Tue Apr 4, 2000 2:54 pm
Subject: Re: statusline crash
zs@...
Send Email Send Email
 
Ron Aaron wrote:
>
> Hi all -
>
> Setting a statusline wider than the window width makes vim crash.  Here is a
> script which will crash vim (5.5.53, Linux GTK)
>
> set nocp
> set ruler
> au VimEnter * :call Start()
>
> func Start()
>         set columns=40
>         let s='This is longer than forty characters, so it will make vim
crash'
>
>         let &stl=s
>         new
> endfunc

Right on! It does crash on my setup (IRIX).

---Zdenek

#13726 From: Sven Guckes <guckes@...>
Date: Tue Apr 4, 2000 2:57 pm
Subject: Re: statusline crash
guckes@...
Send Email Send Email
 
* Ron Aaron <ron@...> [000404 14:33]:
> Setting a statusline wider than the window width makes vim crash.
> Here is a script which will crash vim (5.5.53, Linux GTK) [...]

No problem here with vim-5.6 on Solaris.  Maybe upgrading helps?
Or maybe it's a problem with GTK?

Sven

#13727 From: Mike Steed <MSteed@...>
Date: Tue Apr 4, 2000 3:01 pm
Subject: RE: statusline crash
MSteed@...
Send Email Send Email
 
> From: Ron Aaron [mailto:ron@...]
> Sent: Tuesday, April 04, 2000 8:33 AM
> To: VIM Developers
> Subject: statusline crash
>
>
> Hi all -
>
> Setting a statusline wider than the window width makes vim
> crash.  Here is a
> script which will crash vim (5.5.53, Linux GTK)
>
>
> set nocp
> set ruler
> au VimEnter * :call Start()
>
> func Start()
>  set columns=40
>  let s='This is longer than forty characters, so it will
> make vim crash'
>
>  let &stl=s
>  new
> endfunc

Me too! -- crashes gvim-5.6 on Win32 (built with gcc/mingw32).  I haven't
applied any of the post-5.6 patches.

Mike

#13728 From: Zdenek Sekera <zs@...>
Date: Tue Apr 4, 2000 3:22 pm
Subject: Re: statusline crash
zs@...
Send Email Send Email
 
Zdenek Sekera wrote:
>
> Ron Aaron wrote:
> >
> > Hi all -
> >
> > Setting a statusline wider than the window width makes vim crash.  Here is a
> > script which will crash vim (5.5.53, Linux GTK)
> >
> > set nocp
> > set ruler
> > au VimEnter * :call Start()
> >
> > func Start()
> >         set columns=40
> >         let s='This is longer than forty characters, so it will make vim
crash'
> >
> >         let &stl=s
> >         new
> > endfunc
>
> Right on! It does crash on my setup (IRIX).
>

I should have added this is vim 5.6.52 (I am late :-) xterm vim.
I think the crash is related to the fact that Ron's statusline is
composed
just of one element (string) and vim doesn't know how to shorten
it. I have no problem at all with my real status line that can sometimes
grow longer then the window, but it's automatically shortened by vim,
presumably because it consists of number of elements..

---Zdenek

#13729 From: "Ron Aaron" <ron@...>
Date: Tue Apr 4, 2000 8:32 am
Subject: Re: statusline crash
ron@...
Send Email Send Email
 
Sven Guckes <guckes@...> writes:
>* Ron Aaron <ron@...> [000404 14:33]:
>> Setting a statusline wider than the window width makes vim crash.
>> Here is a script which will crash vim (5.5.53, Linux GTK) [...]
>
>No problem here with vim-5.6 on Solaris.  Maybe upgrading helps?
>Or maybe it's a problem with GTK?

Er, I meant 5.6.53 :-)

>
>Sven

#13730 From: Zdenek Sekera <zs@...>
Date: Tue Apr 4, 2000 4:39 pm
Subject: How to avoid...
zs@...
Send Email Send Email
 
When reading (:r) or writing (:w) a file in/from vim, vim writes
at the bottom the line containing the file name and it's length (number
of lines read/written). When I use this in scripts I find it
annoying because it is often a cause for 'type RETURN' message
and, in fact, in these cases I really don't want to know these
details about that file at all.

I'd like to suppress these messages somehow, so far without a success.
Any idea?

I tried different combos (such as :r followed by :echo "" etc)
but even if it may work sometimes, it doesn't other times depending
on cmdheight setting).

Ran out of ideas....

Too bad we don't have a control over the vim messages via setting
of some variable.

---Zdenek

#13731 From: "J.D. Laub" <laubster@...>
Date: Tue Apr 4, 2000 5:34 pm
Subject: proposed vim patch: job control
laubster@...
Send Email Send Email
 
I've run across some frustrating behavior during my normal workday.  The
(rather boring) description is at the bottom of this message, but
essentially, it would be desirable if vim did not try to suspend when it
gets a SIGTSTP if the parent has job control disabled.

Some of the changes (to config.h.in & configure) tweak files which are
generated; however, I don't have all the generating tools available, so
I tweaked the generated files directly for testing purposes.  You may
want to pull the patch to those files.

The change has been tested on linux/bash, freebsd/bash, hpux/zsh,
hpux/ksh, & solaris/ksh, under the normal (non-gui) mode.  I used the
shell command "set +m" to disable job control for the tests.

Please look over the patch carefully; this is my first shot at patching
vim, and I may be breaking some conventions.  I'm using #error; maybe
that should be changed to a call to assert(3x).  I didn't spy any
similar logic, so I didn't have a pattern to copy.

Problem:    vim should not suspend on SIGTSTP if parent suspended job
control
Solution:   if job control state can be detected, and if job control is
disabled,
             print msg stating :shell should be used instead
Files:      src/configure.in, src/ex_docmd.c, src/os_unix.c,
src/os_unix.h,
             src/config.h.in, src/configure

*** configure.in Sat Jan 15 05:15:24 2000
--- ../../configure.in Wed Mar 22 22:06:47 2000
***************
*** 1100,1106 ****
  	 AC_MSG_ERROR(failed to compile test program))

   dnl Check for functions in one big call, to reduce the size of
configure
! AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpwnam
getpwuid \
  	 gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort
\
  	 select setenv setpgid setsid sigset strcasecmp strerror strftime \
  	 stricmp strncasecmp strnicmp strpbrk strtol tgetent usleep utime
utimes)
--- 1100,1107 ----
  	 AC_MSG_ERROR(failed to compile test program))

   dnl Check for functions in one big call, to reduce the size of
configure
! AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpgid \
!  getpwnam getpwuid \
  	 gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort
\
  	 select setenv setpgid setsid sigset strcasecmp strerror strftime \
  	 stricmp strncasecmp strnicmp strpbrk strtol tgetent usleep utime
utimes)
*** ex_docmd.c Sat Jan  8 05:45:47 2000
--- ../../ex_docmd.c Thu Mar 23 08:02:52 2000
***************
*** 5749,5754 ****
--- 5749,5765 ----
   do_suspend(forceit)
       int  forceit;
   {
+ #ifdef CAN_CHECK_JOB_CONTROL
+     /*
+      * Disallow suspending if parent explicitly disabled job control.
+      */
+     if (mch_job_control_disabled())
+     {
+  vim_beep();
+  (void)EMSG("Job control disabled; use :shell instead");
+  return;
+     }
+ #endif
       /*
        * Disallow suspending for "rvim".
        */
*** os_unix.c Fri Jan 14 14:27:22 2000
--- ../../os_unix.c Thu Mar 23 16:24:35 2000
***************
*** 1413,1419 ****
       return (long)getpid();
   }

! #if !defined(HAVE_STRERROR) && defined(USE_GETCWD)
   static char *strerror __ARGS((int));

       static char *
--- 1413,1419 ----
       return (long)getpid();
   }

! #if !defined(HAVE_STRERROR)
   static char *strerror __ARGS((int));

       static char *
***************
*** 1722,1727 ****
--- 1722,1776 ----
  	 kill(getpid(), deadly_signal); /* Die using the signal we caught */
       }
   }
+
+ #ifdef CAN_CHECK_JOB_CONTROL
+ /*
+  * return TRUE if job control disabled
+  * return FALSE if job control enabled or if fact cannot be determined
+  * return FALSE for error
+  */
+     int
+ mch_job_control_disabled()
+ {
+     pid_t ppid, my_grp, parent_grp;
+     char buf[2048];
+
+ #ifdef HAVE_GETPGID
+     {
+  /*
+ 	 * unistd.h under linux redhat6.2 seems to be screwed up:
+ 	 * setpgid seems fine, but getpgid remains unprototyped
+ 	 * unless -D_XOPEN_SOURCE=500 is passed to the compiler.
+ 	 * As a workaround we'll re-declare it here.  This probably
+ 	 * is not a good idea, but I'm hesitant to start requiring
+ 	 * a new define for such a minor piece of functionality, and
+ 	 * I don't know what else to do. - laubster@....
+ 	 */
+  extern pid_t getpgid(pid_t pid);
+  if (-1 == (my_grp = getpgid(0))) {
+ 	    (void)sprintf(buf, "error from getpgid: %d (%s)",
+ 	 errno, strerror(errno));
+ 	    (void)EMSG(buf);
+ 	    return FALSE;
+  }
+  ppid = getppid();
+  if (-1 == (parent_grp = getpgid(ppid))) {
+ 	    (void)sprintf(buf, "error from getpgid: %d (%s)",
+ 	 errno, strerror(errno));
+ 	    (void)EMSG(buf);
+ 	    return FALSE;
+  }
+     }
+     return ((parent_grp == my_grp) ? TRUE : FALSE);
+ #else
+     /*
+      * Somebody monkeyed with the CAN_CHECK_JOB_CONTROL setting
+      * without following through with the coding.
+      */
+ # error "oops, non-getpgid implementation needs coding"
+ #endif
+ }
+ #endif

       void
   mch_settmode(tmode)
*** os_unix.h Tue Sep  7 13:17:13 1999
--- ../../os_unix.h Thu Mar 23 08:22:50 2000
***************
*** 18,23 ****
--- 18,29 ----
   # endif
   #endif

+ #ifdef HAVE_GETPGID
+ # define CAN_CHECK_JOB_CONTROL 1
+ #else
+ # undef CAN_CHECK_JOB_CONTROL
+ #endif
+
   #include <stdio.h>
   #include <ctype.h>
   #include <sys/types.h>
***************
*** 327,332 ****
--- 333,340 ----
   #define mch_chdir(s) chdir(s)
   #define mch_getenv(x) (char_u *)getenv((char *)(x))
   #define mch_setenv(name, val, x) setenv(name, val, x)
+
+ int mch_job_control_disabled();

   #if !defined(S_ISDIR) && defined(S_IFDIR)
   # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
*** config.h.in Wed Nov  3 14:25:16 1999
--- ../../config.h.in Wed Mar 22 22:13:56 2000
***************
*** 122,127 ****
--- 122,130 ----
   /* Define if you have the getcwd() function.  */
   #undef HAVE_GETCWD

+ /* Define if you have the getpgid() function.  */
+ #undef HAVE_GETPGID
+
   /* Define if you have the getpwnam() function. */
   #undef HAVE_GETPWNAM

*** configure Sat Jan 15 05:16:29 2000
--- ../../configure Fri Mar 24 09:57:51 2000
***************
*** 4595,4601 ****
   fi


! for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpwnam
getpwuid \
  	 gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort
\
  	 select setenv setpgid setsid sigset strcasecmp strerror strftime \
  	 stricmp strncasecmp strnicmp strpbrk strtol tgetent usleep utime
utimes
--- 4595,4602 ----
   fi


! for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpgid \
!  getpwnam getpwuid \
  	 gettimeofday getwd lstat memcmp memset nanosleep opendir putenv qsort
\
  	 select setenv setpgid setsid sigset strcasecmp strerror strftime \
  	 stricmp strncasecmp strnicmp strpbrk strtol tgetent usleep utime
utimes


My real-life frustration?  Oracle's sqlplus running on hpux.  It's a
shell-like interface to an Oracle database.  When sqlplus starts, it
disables job control (grumble).  sqlplus offers an ability to invoke an
editor for modifying its current command.  When I fire up vim, and I hit
^z, vim hangs, and I have to kill -9 from a separate shell.  This gets
really tiring after a couple of hundred times.  :-)
--
J.D. Laub (Laubster)  | "Please don't speak with tongue in cheek
laubster@... |  when you refer to me"    - Fred LeBlanc

#13732 From: Bram Moolenaar <Bram@...>
Date: Tue Apr 4, 2000 5:10 pm
Subject: Patch 5.6.054
Bram@...
Send Email Send Email
 
Patch 5.6.054
Problem:    When using ":e" and ":e #" the cursor is put in the first column
	     when 'startofline' is set. (Cordell)
Solution:   Use the last known column when 'startofline' is set.
	     Also, use ECMD_LAST more often to simplify the code.
Files:     src/buffer.c, src/ex_cmds.c, src/ex_docmd.c, src/proto/buffer.pro


*** ../vim-5.6.53/src/buffer.c Wed Jan 26 12:20:20 2000
--- src/buffer.c Tue Apr  4 16:28:34 2000
***************
*** 30,36 ****
   static char_u *buflist_match __ARGS((vim_regexp *prog, BUF *buf));
   static char_u *buflist_match_try __ARGS((vim_regexp *prog, char_u *name));
   static void buflist_setfpos __ARGS((BUF *, linenr_t, colnr_t));
- static FPOS *buflist_findfpos __ARGS((BUF *buf));
   #ifdef UNIX
   static int otherfile_buf __ARGS((BUF *buf, char_u *ffname, struct stat *stp));
   static void buf_setino __ARGS((BUF *buf));
--- 30,35 ----
***************
*** 1423,1429 ****
    * find the position (lnum and col) for the buffer 'buf' for the current
window
    * returns a pointer to no_position if no position is found
    */
!     static FPOS *
   buflist_findfpos(buf)
       BUF  *buf;
   {
--- 1422,1428 ----
    * find the position (lnum and col) for the buffer 'buf' for the current
window
    * returns a pointer to no_position if no position is found
    */
!     FPOS *
   buflist_findfpos(buf)
       BUF  *buf;
   {
*** ../vim-5.6.53/src/ex_cmds.c Thu Mar 30 16:44:47 2000
--- src/ex_cmds.c Tue Apr  4 16:25:26 2000
***************
*** 2294,2299 ****
--- 2294,2301 ----
       linenr_t lnum;
       linenr_t topline = 0;
       int  newcol = -1;
+     int  solcol = -1;
+     FPOS *pos;

       if (fnum != 0)
       {
***************
*** 2417,2423 ****
  	 /* May jump to last used line number for a loaded buffer or when asked
  	  * for explicitly */
  	 if ((oldbuf && newlnum == ECMD_LASTL) || newlnum == ECMD_LAST)
! 	    newlnum = buflist_findlnum(buf);

  	 /*
  	  * Make the (new) buffer the one used by the current window.
--- 2419,2429 ----
  	 /* May jump to last used line number for a loaded buffer or when asked
  	  * for explicitly */
  	 if ((oldbuf && newlnum == ECMD_LASTL) || newlnum == ECMD_LAST)
!  {
! 	    pos = buflist_findfpos(buf);
! 	    newlnum = pos->lnum;
! 	    solcol = pos->col;
!  }

  	 /*
  	  * Make the (new) buffer the one used by the current window.
***************
*** 2514,2520 ****
--- 2520,2529 ----
       {
  	 set_last_cursor(curwin); /* may set b_last_cursor */
  	 if (newlnum == ECMD_LAST || newlnum == ECMD_LASTL)
+  {
  	     newlnum = curwin->w_cursor.lnum;
+ 	    solcol = curwin->w_cursor.col;
+  }
   #ifdef AUTOCMD
  	 buf = curbuf;
  	 if (buf->b_fname != NULL)
***************
*** 2651,2657 ****
  	 {
  	     curwin->w_cursor.lnum = newlnum;
  	     check_cursor_lnum();
! 	    beginline(BL_SOL | BL_FIX);
  	 }
  	 else 	 /* no line number, go to last line in Ex mode */
  	 {
--- 2660,2673 ----
  	 {
  	     curwin->w_cursor.lnum = newlnum;
  	     check_cursor_lnum();
! 	    if (solcol >= 0 && !p_sol)
! 	    {
! 	 /* 'sol' is off: Use last known column. */
! 	 curwin->w_cursor.col = solcol;
! 	 check_cursor_col();
! 	    }
! 	    else
! 	 beginline(BL_SOL | BL_FIX);
  	 }
  	 else 	 /* no line number, go to last line in Ex mode */
  	 {
*** ../vim-5.6.53/src/ex_docmd.c Mon Apr  3 09:38:10 2000
--- src/ex_docmd.c Tue Apr  4 16:52:08 2000
***************
*** 5848,5855 ****
   {
       int  other;
       char_u *p;
-     char_u *ffname;
-     BUF  *buf;

       if (argn < 0 || argn >= arg_file_count)
       {
--- 5851,5856 ----
***************
*** 5894,5916 ****
  	 if (argn == arg_file_count - 1)
  	     arg_had_last = TRUE;

!  /*
! 	 * If no line number given, use the last known line number.
! 	 */
!  if (eap->do_ecmd_lnum == 0)
!  {
! 	    ffname = fix_fname(arg_files[curwin->w_arg_idx]);
! 	    if (ffname != NULL)
! 	    {
! 	 buf = buflist_findname(ffname);
! 	 if (buf != NULL)
! 		    eap->do_ecmd_lnum = buflist_findlnum(buf);
! 	 vim_free(ffname);
! 	    }
!  }
!
  	 (void)do_ecmd(0, arg_files[curwin->w_arg_idx],
! 		      NULL, eap->do_ecmd_cmd, eap->do_ecmd_lnum,
  		       (p_hid ? ECMD_HIDE : 0) +
  					    (eap->forceit ? ECMD_FORCEIT : 0));
       }
--- 5895,5903 ----
  	 if (argn == arg_file_count - 1)
  	     arg_had_last = TRUE;

!  /* Edit the file; always use the last known line number. */
  	 (void)do_ecmd(0, arg_files[curwin->w_arg_idx],
! 		      NULL, eap->do_ecmd_cmd, ECMD_LAST,
  		       (p_hid ? ECMD_HIDE : 0) +
  					    (eap->forceit ? ECMD_FORCEIT : 0));
       }
***************
*** 7534,7540 ****
  		     return NULL;
  		 }
  		 if (lnump != NULL)
! 		    *lnump = buflist_findlnum(buf);
  		 if (buf->b_fname == NULL)
  		 {
  		     result = (char_u *)"";
--- 7521,7527 ----
  		     return NULL;
  		 }
  		 if (lnump != NULL)
! 		    *lnump = ECMD_LAST;
  		 if (buf->b_fname == NULL)
  		 {
  		     result = (char_u *)"";
***************
*** 7652,7658 ****
       char_u *repl;
       int  srclen;
       char_u *p;
-     linenr_t dummy;

       result = vim_strsave(arg);
       if (result == NULL)
--- 7639,7644 ----
***************
*** 7665,7671 ****
  	 else
  	 {
  	     /* replace "<sfile>" with the sourced file name, and do ":" stuff */
! 	    repl = eval_vars(p, &srclen, &dummy, &errormsg, result);
  	     if (errormsg != NULL)
  	     {
  		 if (*errormsg)
--- 7651,7657 ----
  	 else
  	 {
  	     /* replace "<sfile>" with the sourced file name, and do ":" stuff */
! 	    repl = eval_vars(p, &srclen, NULL, &errormsg, result);
  	     if (errormsg != NULL)
  	     {
  		 if (*errormsg)
*** ../vim-5.6.53/src/proto/buffer.pro Sun Jan 16 14:22:13 2000
--- src/proto/buffer.pro Tue Apr  4 16:27:04 2000
***************
*** 16,21 ****
--- 16,22 ----
   int ExpandBufnames __ARGS((char_u *pat, int *num_file, char_u ***file, int
options));
   BUF *buflist_findnr __ARGS((int nr));
   char_u *buflist_nr2name __ARGS((int n, int fullname, int helptail));
+ FPOS *buflist_findfpos __ARGS((BUF *buf));
   linenr_t buflist_findlnum __ARGS((BUF *buf));
   void buflist_list __ARGS((void));
   int buflist_name_nr __ARGS((int fnum, char_u **fname, linenr_t *lnum));
*** ../vim-5.6.53/src/version.c Mon Apr  3 21:11:14 2000
--- src/version.c Tue Apr  4 17:06:54 2000
***************
*** 420,421 ****
--- 420,423 ----
   {   /* Add new patch number below this line */
+ /**/
+     54,
   /**/

--
INSPECTOR END OF FILM: Move along.  There's nothing to see!  Keep moving!
    [Suddenly he notices the cameras.]
INSPECTOR END OF FILM: (to Camera) All right, put that away sonny.
    [He walks over to it and puts his hand over the lens.]
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

#13733 From: Wichert Akkerman <wichert@...>
Date: Tue Apr 4, 2000 7:55 pm
Subject: Re: xxd - stdout bug
wichert@...
Send Email Send Email
 
Previously Ronald Hoogenboom wrote:
> This is because the output stream is always fclose()'d on exit of the
> program and that shouldn't be done if the output stream is stdout.

That is perfectly good behaviour. If fclose() fails it means that we
couldn't write out data correctly, indicating an error like a broken
pipe, a full disk or something else, and thus loss of data. Ignoring
that would be a real bug.

Wichert.

--
    ________________________________________________________________
  / Generally uninteresting signature - ignore at your convenience  \
| wichert@...                    http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |

#13734 From: Juergen Weigert <Juergen.Weigert@...>
Date: Tue Apr 4, 2000 9:45 pm
Subject: Re: xxd - stdout bug
Juergen.Weigert@...
Send Email Send Email
 
> Previously Ronald Hoogenboom wrote:
> > This is because the output stream is always fclose()'d on exit of the
> > program and that shouldn't be done if the output stream is stdout.
>
> That is perfectly good behaviour. If fclose() fails it means that we
> couldn't write out data correctly, indicating an error like a broken
> pipe, a full disk or something else, and thus loss of data. Ignoring
> that would be a real bug.

I suspect that something odd is going on here.
What if pclose() is required and we fclose() the thing?
Ronald was talking about piped situations...

         Jw.

--
  o \  Juergen Weigert         unix-software __/
<V> | jw@...         creator    __/
  \  |                neTVision        __/
(/) | Tel. 0911/92699-440, Fax -441__/                     vim:set noai wm=8

#13735 From: Johannes Zellner <johannes@...>
Date: Wed Apr 12, 2000 9:01 am
Subject: syn region, matchgroup & transparent
johannes@...
Send Email Send Email
 
Hello,

here's again a syntax issue.
suppose you're editing a ft=vim file with comments.
If you type
     :syn region junkGroup start=/"/ end=/$/ transparent
nothing will change, as transparent is specified.

If you type
     :syn region junkGroup matchgroup=Statement start=/"/ end=/$/ transparent
The comment leader `"' will be highlighted as Statement (which is correct)
but the rest of the line will be highlighted using vim syntax, but *not*
in the Comment color any more.

weird ?

--
    Johannes

#13736 From: Sunil Shetye <shetye@...>
Date: Wed Apr 5, 2000 4:36 am
Subject: Re: proposed vim patch: job control
shetye@...
Send Email Send Email
 
Hi,

Quoting from J.D. Laub's mail on Tue, Apr 04, 2000 at 11:34:22AM -0600:
> editor for modifying its current command.  When I fire up vim, and I hit
> ^z, vim hangs, and I have to kill -9 from a separate shell.  This gets
> really tiring after a couple of hundred times.  :-)

How about disabling ^z?

:map <C-z> <Nop>

Shetye.

#13737 From: Wichert Akkerman <wichert@...>
Date: Tue Apr 4, 2000 11:59 pm
Subject: Re: xxd - stdout bug
wichert@...
Send Email Send Email
 
Previously Juergen Weigert wrote:
> I suspect that something odd is going on here.
> What if pclose() is required and we fclose() the thing?
> Ronald was talking about piped situations...

pclose() is used if you open the pipe yourself, which isn't being done
here (in particular pclose() waits for the child process to terminate
so we don't leave and zombies and we can get the exit status of the
child).

In this case xxd doesn't create the pipe itself and should indeed
check if it was able to write its output by either checking the
return value for each printf() (bothersome) or check the result
of fclose().

Wichert.

--
    ________________________________________________________________
  / Generally uninteresting signature - ignore at your convenience  \
| wichert@...                    http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |

#13738 From: Bram Moolenaar <Bram@...>
Date: Tue Apr 4, 2000 8:00 pm
Subject: Patch 5.6.055
Bram@...
Send Email Send Email
 
Patch 5.6.055
Problem:    When 'statusline' only contains a text without "%" and doesn't fit
	     in the window, Vim crashes. (Ron Aaron)
Solution:   Don't use the pointer for the first item if there is no item.
Files:     src/screen.c


*** ../vim-5.6.54/src/screen.c Wed Feb  9 22:17:24 2000
--- src/screen.c Tue Apr  4 20:43:22 2000
***************
*** 3068,3075 ****
  	 for (l = 0; l < itemcnt; l++)
  	     if (item[l].type == Trunc)
  		 break;
!  l = l == itemcnt ? 0 : l;
!  s = item[l].start;
  	 if ((int) (s - out) > maxlen)
  	 {   /* Truncation mark is beyond max length */
  	     s = out + maxlen - 1;
--- 3068,3080 ----
  	 for (l = 0; l < itemcnt; l++)
  	     if (item[l].type == Trunc)
  		 break;
!  if (itemcnt == 0)
! 	    s = out;
!  else
!  {
! 	    l = l == itemcnt ? 0 : l;
! 	    s = item[l].start;
!  }
  	 if ((int) (s - out) > maxlen)
  	 {   /* Truncation mark is beyond max length */
  	     s = out + maxlen - 1;
***************
*** 3083,3089 ****
  	 else
  	 {
  	     p = s + num - maxlen;
! 	    mch_memmove(s, p, STRLEN(s) + 1);
  	     *s = '<';
  	     for (; l < itemcnt; l++)
  		 item[l].start -= num - maxlen;
--- 3088,3094 ----
  	 else
  	 {
  	     p = s + num - maxlen;
! 	    mch_memmove(s, p, STRLEN(p) + 1);
  	     *s = '<';
  	     for (; l < itemcnt; l++)
  		 item[l].start -= num - maxlen;
*** ../vim-5.6.54/src/version.c Tue Apr  4 20:49:35 2000
--- src/version.c Tue Apr  4 20:49:06 2000
***************
*** 420,421 ****
--- 420,423 ----
   {   /* Add new patch number below this line */
+ /**/
+     55,
   /**/

--
(letter from Mark to Mike, about the film's probale certificate)
       For an 'A' we would have to: Lose as may shits as possible Take Jesus
       Christ out, if possible Loose "I fart in your general direction" Lose
       "the oral sex" Lose "oh, fuck off" Lose "We make castanets out of your
       testicles"
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

#13739 From: Bram Moolenaar <Bram@...>
Date: Tue Apr 4, 2000 8:00 pm
Subject: Patch 5.6.056 (extra)
Bram@...
Send Email Send Email
 
Patch 5.6.056 (extra)
Problem:    MS-DOS: F11 and F12 don't work when 'bioskey' is set.
Solution:   Use enhanced keyboard functions. (Vince Negri)
             Detect presence of enhanced keybard and set bioskey_read and
             bioskey_ready.
Files:      src/os_msdos.c


*** ../vim-5.6.55/src/os_msdos.c Sat Mar 25 16:34:41 2000
--- src/os_msdos.c Tue Apr  4 21:44:38 2000
***************
*** 42,47 ****
--- 42,50 ----
   static int ctrlc_pressed = FALSE;   /* set when ctrl-C or ctrl-break detected
*/
   static int delayed_redraw = FALSE;  /* set when ctrl-C detected */

+ static int bioskey_read = _NKEYBRD_READ;   /* bioskey() argument: read key */
+ static int bioskey_ready = _NKEYBRD_READY; /* bioskey() argument: key ready?
*/
+
   #ifdef USE_MOUSE
   static int mouse_avail = FALSE;  /* mouse present */
   static int mouse_active;  /* mouse enabled */
***************
*** 285,290 ****
--- 288,294 ----
       }
       return rawkey;
   }
+
   /*
    * Set normal fg/bg color, based on T_ME.  Called whem t_me has been set.
    */
***************
*** 595,601 ****
  	 }
   #endif

!  if ((p_consk ? cons_kbhit() : p_biosk ? bioskey(1) : kbhit())
  		 || cbrk_pressed
   #ifdef USE_MOUSE
  						     || mouse_click >= 0
--- 599,606 ----
  	 }
   #endif

!  if ((p_consk ? cons_kbhit()
! 				 : p_biosk ? bioskey(bioskey_ready) : kbhit())
  		 || cbrk_pressed
   #ifdef USE_MOUSE
  						     || mouse_click >= 0
***************
*** 879,900 ****
   #endif
  	 if (p_biosk && !p_consk)
  	 {
! 	    while ((len == 0 || bioskey(1)) && len < maxlen)
  	     {
! 	 c = translate_altkeys(bioskey(0)); /* get the key */
  		 /*
  		  * translate a few things for inchar():
  		  * 0x0000 == CTRL-break  -> 3 (CTRL-C)
  		  * 0x0300 == CTRL-@  -> NUL
  		  * 0xnn00 == extended key code -> K_NUL, nn
  		  * K_NUL 	 -> K_NUL, 3
  		  */
  		 if (c == 0)
  		     c = 3;
  		 else if (c == 0x0300)
  		     c = NUL;
! 	 else if ((c & 0xff) == 0 || c == K_NUL
! 				 || c == 0x4e2b || c == 0x4a2d || c == 0x372a)
  		 {
  		     if (c == K_NUL)
  			 c = 3;
--- 884,910 ----
   #endif
  	 if (p_biosk && !p_consk)
  	 {
! 	    while ((len == 0 || bioskey(bioskey_ready)) && len < maxlen)
  	     {
! 	 c = translate_altkeys(bioskey(bioskey_read)); /* get the key */
  		 /*
  		  * translate a few things for inchar():
  		  * 0x0000 == CTRL-break  -> 3 (CTRL-C)
  		  * 0x0300 == CTRL-@  -> NUL
  		  * 0xnn00 == extended key code -> K_NUL, nn
+ 		 * 0xnne0 == enhanced keyboard -> K_NUL, nn
  		  * K_NUL 	 -> K_NUL, 3
  		  */
  		 if (c == 0)
  		     c = 3;
  		 else if (c == 0x0300)
  		     c = NUL;
! 	 else if ((c & 0xff) == 0
! 		 || c == K_NUL
! 		 || c == 0x4e2b
! 		 || c == 0x4a2d
! 		 || c == 0x372a
! 		 || ((c & 0xff) == 0xe0 && c != 0xe0))
  		 {
  		     if (c == K_NUL)
  			 c = 3;
***************
*** 1143,1148 ****
--- 1153,1184 ----
       regs.h.bl = 0x00;
       regs.h.bh = 0x00;
       int86(0x10, ®s, ®s);
+
+     /*
+      * Test if we have an enhanced AT keyboard.  Write 0xFFFF to the keyboard
+      * buffer and try to read it back.  If we can't in 16 tries, it's an old
+      * type XT keyboard.
+      */
+     regs.h.ah = 0x05;
+     regs.x.cx = 0xffff;
+     int86(0x16, ®s, ®s);
+     if (regs.h.al != 1) /* skip this when keyboard buffer is full */
+     {
+  int i;
+
+  for (i = 0; i < 16; ++i)
+  {
+ 	    regs.h.ah = 0x10;
+ 	    int86(0x16, ®s, ®s);
+ 	    if (regs.x.ax == 0xffff)
+ 	 break;
+  }
+  if (i == 16) /* 0xffff not read, must be old keyboard */
+  {
+ 	    bioskey_read = 0;
+ 	    bioskey_ready = 1;
+  }
+     }

   #ifdef MCH_CURSOR_SHAPE
       /* Save the old cursor shape */
*** ../vim-5.6.55/src/version.c Tue Apr  4 20:52:37 2000
--- src/version.c Tue Apr  4 21:06:01 2000
***************
*** 420,421 ****
--- 420,423 ----
   {   /* Add new patch number below this line */
+ /**/
+     56,
   /**/

--
Wi n0t trei a h0liday in Sweden thi yer?
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

#13740 From: Bram Moolenaar <Bram@...>
Date: Tue Apr 4, 2000 8:00 pm
Subject: Re: statusline crash
Bram@...
Send Email Send Email
 
Ron Aaron wrote:

> Setting a statusline wider than the window width makes vim crash.  Here is a
> script which will crash vim (5.5.53, Linux GTK)

I can't reproduce it on FreeBSD, not even with efence.  It does crash on
Windows though (could have guessed that!).

Anyway, it's a problem with a statusline having no "%" items.  I have fixed
it, patch coming real soon now...

--
MICHAEL PALIN PLAYED: 1ST SOLDIER WITH A KEEN INTEREST IN BIRDS, DENNIS, MR
                       DUCK (A VILLAGE CARPENTER WHO IS ALMOST KEENER THAN
                       ANYONE ELSE TO BURN WITCHES), THREE-HEADED KNIGHT, SIR
                       GALAHAD, KING OF SWAMP CASTLE, BROTHER MAYNARD'S ROOMATE
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

#13741 From: Bram Moolenaar <Bram@...>
Date: Tue Apr 4, 2000 8:00 pm
Subject: Re: myfiletypefile correction/improvement(?)
Bram@...
Send Email Send Email
 
Doug Potts wrote:

> My suggestion would be to include the myfiletypefile sourcing inside of the
> filetype augroup definition (I've tried this and it works).

Well, that's possible.  But when you do "augroup filetype" inside your
myfiletypefile it also works correctly, doesn't it?  That's how it is
recommended at ":help myfiletypefile".

--
ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
                   KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
                   HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
                   LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
                   BROTHER MAYNARD
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/

Messages 13712 - 13741 of 69880   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help