Skip to content

Commit 2d30840

Browse files
committed
v0.10
1 parent 9c6efd0 commit 2d30840

File tree

2 files changed

+65
-25
lines changed

2 files changed

+65
-25
lines changed

cmake/GenerateVersion.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set(NVIM_VERSION_PRERELEASE "-boykisser") # :3
12
set(NVIM_VERSION
23
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}${NVIM_VERSION_PRERELEASE}")
34

src/nvim/version.c

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,30 +2723,52 @@ bool may_show_intro(void)
27232723
&& (vim_strchr(p_shm, SHM_INTRO) == NULL));
27242724
}
27252725

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+
27262765
/// Give an introductory message about Vim.
27272766
/// Only used when starting Vim on an empty file, without a file name.
27282767
/// Or with the ":intro" command (for Sven :-).
27292768
///
27302769
/// @param colon true for ":intro"
27312770
void intro_message(bool colon)
27322771
{
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-
27502772
// blanklines = screen height - # message lines
27512773
size_t lines_size = ARRAY_SIZE(lines);
27522774
assert(lines_size <= LONG_MAX);
@@ -2790,7 +2812,7 @@ void intro_message(bool colon)
27902812
}
27912813

27922814
if (*mesg != NUL) {
2793-
do_intro_line(row, mesg, colon);
2815+
do_intro_line(row, mesg, colon, blanklines);
27942816
}
27952817
row++;
27962818

@@ -2801,7 +2823,7 @@ void intro_message(bool colon)
28012823
}
28022824
}
28032825

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)
28052827
{
28062828
int l;
28072829

@@ -2820,15 +2842,32 @@ static void do_intro_line(int row, char *mesg, bool colon)
28202842
}
28212843

28222844
grid_line_start(grid, row);
2823-
// Split up in parts to highlight <> items differently.
2845+
28242846
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;
28292849
}
28302850
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);
28322871
}
28332872
grid_line_flush();
28342873
}

0 commit comments

Comments
 (0)