@@ -2723,30 +2723,52 @@ bool may_show_intro(void)
2723
2723
&& (vim_strchr (p_shm , SHM_INTRO ) == NULL ));
2724
2724
}
2725
2725
2726
+ static char * (lines []) = {
2727
+ "⠀⠀⠀⣰⠶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠶⠲⣄⠀" , /* 00 */
2728
+ "⠀⠀⣠⡟⠀⠈⠙⢦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⡶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⠋⠁⠀ ⢻⡄" , /* 01 */
2729
+ "⠀⢀⡿⠀⠀⠀⠀⠀⠙⠷⣄⣀⣤⠤⠤⠤⠤⢤⣷⡀⠙⢷⡄⠀⠀⠀⠀⣠⠞⠉⠀⠀⠀⠀⠀⠈⣷" , /* 02 */
2730
+ "⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠈⠁⠀⠀⠹⣦⡀⣠⡞⠁⠀⠀⠀⠀⠀⠀⠀⠀⣿" , /* 03 */
2731
+ "⠀⣾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠃⠀⠀⠀⠀⠀⠀⠀ ⠀⠈⣻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿" , /* 04 */
2732
+ "⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡟" , /* 05 */
2733
+ "⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⠁" , /* 06 */
2734
+ "⠀⢿⠀⠀⠀⠀⣤⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣤⣤⡀⠀⠀⠀⠀⠀⣸⠇⠀" , /* 07 */
2735
+ "⠀⠘⣇⠀⠀⠀⠀⠉⠉⠛⠛⢿⣶⣦⠀⠀⠀⠀⠀⠀⢴⣾⣟⣛⡋⠉⠉⠉⠁⠀⠀⠀⠀⣴⠏⠀⠀" , /* 08 */
2736
+ "⣀ ⠙⢷⡄⠀⠀⣀⣤⣶⣾⠿⠋⠁⠀⠴⠶⠶⠄⠀⠀⠉⠙⠻⠿⣿⣷⣶⡄⠀⠀⠴⠾⠛⠛⣹⠇" , /* 09 */
2737
+ "⢿⡍⠉⠉⠉⠀⠀⠈⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀ ⠀⠀⠀⣤⠶⣆⣠⡤⠄⢀⣤⠞⠁⠀" , /* 10 */
2738
+ "⠈⠻⣆⡀⠶⢻⣇⡴⠖⠀⠀⠀⣴⡀⣀⡴⠚⠳⠦⣤⣤⠾⠃⠀⠀⠀⠀⠘⠟⠋⠀⠀⠀⢻⣄⠀⠀" , /* 11 */
2739
+ "⠀⠀⣼⠃⠀⠀⠉⠁⠀⠀⠀⠀⠈⠉⢻⡆⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⠀" , /* 12 */
2740
+ "⠀⢠⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡀⠀⠀ ⣿⠀⠀⠀⠀⠀⠀⠀⠀⣀⡶⠶⠟⠛⠛⠁⠀" , /* 13 */
2741
+ "⠀⣾⡴⠖⠛⠳⢦⣿⠲⣄⣀⠀⠀⠀⠀⠘⢷⣀⠀⣸⠃⠀⠀⠀⣀⣀⣤⠶⠚⠉⠀⠀⠀⠀⠀⠀⠀" , /* 14 */
2742
+ "⠀⠀⠀⠀⠀⠀⠀⠈⢷⡀⠈⠻⠦⠀⠀⠀⠀⠉⠉⠁⠀⠀⠀⠀⠹⣆⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀" , /* 15 */
2743
+ "⠀⠀⠀⠀⠀⠀⠀⢀⡴⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀" , /* 16 */
2744
+ "⠀⠀⠀⠀⠀⠀⢠⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⡄⠀⠀⠀⠀⠀⠀⠀⠀" , /* 17 */
2745
+ "⠀⠀⠀⠀⠀⠀⠈⠉⠛⠛⢲⡖⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡆⠀⠀⠀⠀⠀⠀⠀" , /* 18 */
2746
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀" , /* 19 */
2747
+ "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈ " , /* 20 */
2748
+ /*0 1 2 3 */
2749
+ /*0123456789012345678901234567890123456*/
2750
+ };
2751
+
2752
+ #define BLUSHES_SIZE 4
2753
+ struct blush {
2754
+ int row ;
2755
+ char * value ;
2756
+ };
2757
+
2758
+ static struct blush blushes [BLUSHES_SIZE ] = {
2759
+ {11 , "⠶⢻⣇⡴⠖" },
2760
+ {12 , "⠉⠁" },
2761
+ {10 , "⣤⠶⣆⣠⡤⠄" },
2762
+ {11 , "⠘⠟⠋" },
2763
+ };
2764
+
2726
2765
/// Give an introductory message about Vim.
2727
2766
/// Only used when starting Vim on an empty file, without a file name.
2728
2767
/// Or with the ":intro" command (for Sven :-).
2729
2768
///
2730
2769
/// @param colon true for ":intro"
2731
2770
void intro_message (bool colon )
2732
2771
{
2733
- static char * (lines []) = {
2734
- N_ (NVIM_VERSION_LONG ),
2735
- "" ,
2736
- N_ ("Nvim is open source and freely distributable" ),
2737
- "https://neovim.io/#chat" ,
2738
- "" ,
2739
- N_ ("type :help nvim<Enter> if you are new! " ),
2740
- N_ ("type :checkhealth<Enter> to optimize Nvim" ),
2741
- N_ ("type :q<Enter> to exit " ),
2742
- N_ ("type :help<Enter> for help " ),
2743
- "" ,
2744
- N_ ("type :help news<Enter> to see changes in v%s.%s" ),
2745
- "" ,
2746
- N_ ("Help poor children in Uganda!" ),
2747
- N_ ("type :help iccf<Enter> for information " ),
2748
- };
2749
-
2750
2772
// blanklines = screen height - # message lines
2751
2773
size_t lines_size = ARRAY_SIZE (lines );
2752
2774
assert (lines_size <= LONG_MAX );
@@ -2790,7 +2812,7 @@ void intro_message(bool colon)
2790
2812
}
2791
2813
2792
2814
if (* mesg != NUL ) {
2793
- do_intro_line (row , mesg , colon );
2815
+ do_intro_line (row , mesg , colon , blanklines );
2794
2816
}
2795
2817
row ++ ;
2796
2818
@@ -2801,7 +2823,7 @@ void intro_message(bool colon)
2801
2823
}
2802
2824
}
2803
2825
2804
- static void do_intro_line (int row , char * mesg , bool colon )
2826
+ static void do_intro_line (int row , char * mesg , bool colon , int blanklines )
2805
2827
{
2806
2828
int l ;
2807
2829
@@ -2820,15 +2842,32 @@ static void do_intro_line(int row, char *mesg, bool colon)
2820
2842
}
2821
2843
2822
2844
grid_line_start (grid , row );
2823
- // Split up in parts to highlight <> items differently.
2845
+
2824
2846
for (char * p = mesg ; * p != NUL ; p += l ) {
2825
- for (l = 0 ;
2826
- p [l ] != NUL && (l == 0 || (p [l ] != '<' && p [l - 1 ] != '>' ));
2827
- l ++ ) {
2828
- l += utfc_ptr2len (p + l ) - 1 ;
2847
+ for (l = 0 ; p [l ] != NUL && l == 0 ; l ++ ) {
2848
+ l += utf_ptr2len (p + l ) - 1 ;
2829
2849
}
2830
2850
assert (row <= INT_MAX && col <= INT_MAX );
2831
- col += grid_line_puts (col , p , l , * p == '<' ? HL_ATTR (HLF_8 ) : 0 );
2851
+
2852
+ bool is_blushing = false;
2853
+ for (int b = 0 ; b < BLUSHES_SIZE ; b ++ ) {
2854
+ if (blushes [b ].row != row - blanklines /2 ) {
2855
+ continue ;
2856
+ }
2857
+
2858
+ char * blush = blushes [b ].value ;
2859
+ u_long blush_len = strlen (blush );
2860
+
2861
+ for (int offset = 0 ; offset < (int )blush_len ; offset ++ ) {
2862
+ if (strncmp (p - offset , blush , blush_len ) == 0 ) {
2863
+ is_blushing = true;
2864
+ goto grid_line_puts_time ;
2865
+ }
2866
+ }
2867
+ }
2868
+
2869
+ grid_line_puts_time :
2870
+ col += grid_line_puts (col , p , l , is_blushing ? HL_ATTR (HLF_E ) : 0 );
2832
2871
}
2833
2872
grid_line_flush ();
2834
2873
}
0 commit comments