Sunday, August 20, 2023

Re: Vim error message when opening .ini file

--> patch --dry-run -ruN NEW-dosini.vim < the-patch
checking file NEW-dosini.vim
patch: **** malformed patch at line 6: finish

I'm likely not applying the patch correctly.  I've never applied a patch before.  What am I doing wrong?

On Sunday, August 20, 2023 at 4:47:59 AM UTC-4 Christian Brabandt wrote:

On Sa, 19 Aug 2023, Melvin Q. Watchpocket wrote:

>
>
> Vim shows the following long error message when I open a file with a dot-ini (.ini) file extension:
>
> Error detected while processing /usr/share/vim/vimrc[25]../usr/share/vim/vim90/syntax/syntax.vim[44]..BufRead Autocommands for "*~"..BufRead Autocommands for "*.ini"..FileType Autocommands for "*"..Syntax Autocommands for "*"..function
> <SNR>3_SynSet[25]..script /usr/share/vim/vim90/syntax/dosini.vim: line 28: E10: \ should be followed by /, ? or &
>
> Following that "\" on line 28 with any one of "/", "?" or "&" resulted in an even longer error message.

Please try the following patch:

diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim
index 751a12f4b..42e9b7fd6 100644
--- a/runtime/syntax/dosini.vim
+++ b/runtime/syntax/dosini.vim
@@ -14,6 +14,9 @@ if exists("b:current_syntax")
finish
endif

+let s:cpo_save = &cpo
+set cpo&vim
+
" shut case off
syn case ignore

@@ -39,4 +42,7 @@ hi def link dosiniValue String

let b:current_syntax = "dosini"

+let &cpo = s:cpo_save
+unlet s:cpo_save
+
" vim: sts=2 sw=2 et


Best,
Christian
--
A stitch in time saves nine.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/1ad689e2-c81f-4c31-8603-b83da90b98ddn%40googlegroups.com.

No comments:

Post a Comment