summaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2013-04-17 14:02:07 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2013-04-17 14:02:07 +0400
commitb24bf5235b902a703ab77c9d4b47e11e173482b4 (patch)
tree4bbe4c0468955a4eb5801cca1215e46a7ab05b23 /vim
parent80415d61bb3eb38df8070555cebedaf0ffdba16d (diff)
downloadcibs-pkgs-b24bf5235b902a703ab77c9d4b47e11e173482b4.tar.gz
Debian's tiny patch
Diffstat (limited to 'vim')
-rw-r--r--vim/patches/vim-tiny.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/vim/patches/vim-tiny.patch b/vim/patches/vim-tiny.patch
new file mode 100644
index 0000000..2892598
--- /dev/null
+++ b/vim/patches/vim-tiny.patch
@@ -0,0 +1,59 @@
+Subject: Support sourcing a vimrc.tiny when Vim is invoked as vi
+ This is used only in the vim-tiny package to allow a specific
+ configuration for vim-tiny's vi. The vim-tiny package is substantially
+ different from the other Vim packages, so it did not make sense to
+ share the same config.
+Forwarded: not-needed
+Author: Stefano Zacchiroli <zack@debian.org>
+Author: James Vega <jamessan@debian.org>
+Bug-Debian: http://bugs.debian.org/222138
+
+--- a/src/main.c
++++ b/src/main.c
+@@ -83,6 +83,9 @@
+ #ifdef FEAT_DIFF
+ int diff_mode; /* start with 'diff' set */
+ #endif
++#ifdef SYS_TINYRC_FILE
++ int vi_mode; /* started as "vi" */
++#endif
+ } mparm_T;
+
+ /* Values for edit_type. */
+@@ -1606,6 +1609,10 @@
+ }
+ else if (STRNICMP(initstr, "vim", 3) == 0)
+ initstr += 3;
++#ifdef SYS_TINYRC_FILE
++ else if (STRNICMP(initstr, "vi", 2) == 0)
++ parmp->vi_mode = TRUE;
++#endif
+
+ /* Catch "[r][g]vimdiff" and "[r][g]viewdiff". */
+ if (STRICMP(initstr, "diff") == 0)
+@@ -2916,7 +2923,12 @@
+ * Get system wide defaults, if the file name is defined.
+ */
+ #ifdef SYS_VIMRC_FILE
+- (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
++# if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC)
++ if (parmp->vi_mode)
++ (void)do_source((char_u *)SYS_TINYRC_FILE, FALSE, DOSO_NONE);
++ else
++# endif
++ (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
+ #endif
+ #ifdef MACOS_X
+ (void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, DOSO_NONE);
+--- a/src/os_unix.h
++++ b/src/os_unix.h
+@@ -233,6 +233,9 @@
+ /*
+ * Unix system-dependent file names
+ */
++#ifndef SYS_TINYRC_FILE
++# define SYS_TINYRC_FILE "$VIM/vimrc.tiny"
++#endif
+ #ifndef SYS_VIMRC_FILE
+ # define SYS_VIMRC_FILE "$VIM/vimrc"
+ #endif