Skip to content

Instantly share code, notes, and snippets.

@koron
Created March 31, 2013 04:24
Show Gist options
  • Save koron/5279539 to your computer and use it in GitHub Desktop.
Save koron/5279539 to your computer and use it in GitHub Desktop.
https://gist.github.com/shiwano/5276921 を intro に表示すべくやってみたが、あえなく撃沈。 半角カナと一部の全角記号が悪さをしてるらしいが、Vim最大の魔境 screen.c に関係しそうだったので撤退。
# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0
diff -r 73ed2bb6def5 src/version.c
--- a/src/version.c Sun Mar 24 10:08:39 2013 +0900
+++ b/src/version.c Sun Mar 31 13:20:42 2013 +0900
@@ -2943,26 +2943,26 @@
char *p;
static char *(lines[]) =
{
- N_("VIM - Vi IMproved"),
- "",
- N_("version "),
- N_("by Bram Moolenaar et al."),
-#ifdef MODIFIED_BY
- " ",
-#endif
- N_("Vim is open source and freely distributable"),
- "",
- N_("Help poor children in Uganda!"),
- N_("type :help iccf<Enter> for information "),
- "",
- N_("type :q<Enter> to exit "),
- N_("type :help<Enter> or <F1> for on-line help"),
- N_("type :help version7<Enter> for version info"),
- NULL,
- "",
- N_("Running in Vi compatible mode"),
- N_("type :set nocp<Enter> for Vim defaults"),
- N_("type :help cp-default<Enter> for info on this"),
+ " メ__-─-,-- _ ",
+ " ,イ>:::::::::::< ヽ〟 ",
+ " ヽ─イ /,::::,::::::::\ >─r ",
+ " ヾ〟//:!:::A::::::|:!:ヽ ,丿 ",
+ " ソ r:リ ハ::::::ハ:ハ::|rヘ〟 ",
+ " Ⅲ:|:| V―ヘ::::/-ル゙|/ ハリ\ あらぶる ",
+ " !|:ハ:|,-=〟ヽ/,-=.ソハリ H Vim の ",
+ " !ヽriゾUソゾ \"ハUソノ゙hNノソ ぽーず♡ ",
+ " |!ハヾヾ` `´ノlリ´ ",
+ " ノ:ノハ ハ 丶 クハ ____ ",
+ " _________(ヽ/(ヾ/ハ,:ヽ 冖 ∠||ヽ _-==|リリ!) ",
+ " ,-´¬¬─-─/\\ \ノ:ハ\ゝ =- ハvノリ:ヾ丿::(⊃´ イ==-──´ ",
+ " ((-====Ξ二二::-´\ヾ \-ヾ::``丶^ )/|:!)!:::<(___/卜-'ヾ=-―´",
+ "/ソ /ハ/ ∠/ --===( ) ⊂)ヽへ:::)==Η!ηv 》:!>====|≡≡) ",
+ "! ` !/リ リ/:-==\"ヽ:ヽ'\" |, -リリノ |!\乂 ヾ:ル | ル=-\"ヾヽ ",
+ " | | ハヽ-=/:リヽ::(>___|) -=='\" =-v-\"===ヽ》|| ハ ||ヾ)ハ ",
+ " ハ ! !!ヾ !:/リ/ヽ:ヽ |/ ‖ /\ Vim ヽ》 ! || リ ",
+ "__/ソ V ///'|ヽ:ハ) |Y ‖ /:::\ ! }‖ !|| / ",
+ " ‖ | |/ヽ!リ | | | / |:::|\ヽV ||| ( ",
+ " \\ハ|| | | | ! |:::| \(!\ リ| ` ",
};
#ifdef FEAT_GUI
static char *(gui_lines[]) =
@@ -3071,71 +3071,16 @@
int add_version;
int attr;
{
- char_u vers[20];
int col;
- char_u *p;
- int l;
- int clen;
-#ifdef MODIFIED_BY
-# define MODBY_LEN 150
- char_u modby[MODBY_LEN];
-
- if (*mesg == ' ')
- {
- vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1);
- l = STRLEN(modby);
- vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1);
- mesg = modby;
- }
-#endif
/* Center the message horizontally. */
col = vim_strsize(mesg);
- if (add_version)
- {
- STRCPY(vers, mediumVersion);
- if (highest_patch())
- {
- /* Check for 9.9x or 9.9xx, alpha/beta version */
- if (isalpha((int)vers[3]))
- {
- int len = (isalpha((int)vers[4])) ? 5 : 4;
- sprintf((char *)vers + len, ".%d%s", highest_patch(),
- mediumVersion + len);
- }
- else
- sprintf((char *)vers + 3, ".%d", highest_patch());
- }
- col += (int)STRLEN(vers);
- }
col = (Columns - col) / 2;
if (col < 0)
col = 0;
/* Split up in parts to highlight <> items differently. */
- for (p = mesg; *p != NUL; p += l)
- {
- clen = 0;
- for (l = 0; p[l] != NUL
- && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l)
- {
-#ifdef FEAT_MBYTE
- if (has_mbyte)
- {
- clen += ptr2cells(p + l);
- l += (*mb_ptr2len)(p + l) - 1;
- }
- else
-#endif
- clen += byte2cells(p[l]);
- }
- screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr);
- col += clen;
- }
-
- /* Add the version number to the version line. */
- if (add_version)
- screen_puts(vers, row, col, 0);
+ screen_puts_len(mesg, STRLEN(mesg), row, col, attr);
}
/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment