Merge remote-tracking branch 'lenormf/fix-development-version'
This commit is contained in:
commit
3c51da4488
32
src/main.cc
32
src/main.cc
|
@ -40,25 +40,25 @@ namespace Kakoune
|
||||||
extern const char* version;
|
extern const char* version;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int version;
|
unsigned int version;
|
||||||
const char* notes;
|
const char* notes;
|
||||||
} constexpr version_notes[] = { {
|
} constexpr version_notes[] = { {
|
||||||
99999999,
|
0,
|
||||||
"• Big breaking refactoring of various Kakoune features,\n"
|
"» Big breaking refactoring of various Kakoune features,\n"
|
||||||
" configuration might need to be updated see `:doc changelog` for details\n"
|
" configuration might need to be updated see `:doc changelog` for details\n"
|
||||||
"• define-command -allow-override switch has been renamed -override\n"
|
"» define-command -allow-override switch has been renamed -override\n"
|
||||||
}, {
|
}, {
|
||||||
20180413,
|
20180413,
|
||||||
"• ModeChange hook has been introduced and is expected to replace\n"
|
"» ModeChange hook has been introduced and is expected to replace\n"
|
||||||
" the various ${MODE}Begin/${MODE}End hooks, consider those deprecated.\n"
|
" the various ${MODE}Begin/${MODE}End hooks, consider those deprecated.\n"
|
||||||
"• '*' Does not strip whitespaces anymore, use built-in '_' to strip them\n"
|
"» '*' Does not strip whitespaces anymore, use built-in '_' to strip them\n"
|
||||||
"• 'l' on eol will go to next line, 'h' on first char will go to previous\n"
|
"» 'l' on eol will go to next line, 'h' on first char will go to previous\n"
|
||||||
"• selections merging behaviour is now a bit more complex again\n"
|
"» selections merging behaviour is now a bit more complex again\n"
|
||||||
"• 'x' will only jump to next line if full line is already selected\n"
|
"» 'x' will only jump to next line if full line is already selected\n"
|
||||||
"• WORD text object moved to <a-w> instead of W for consistency\n"
|
"» WORD text object moved to <a-w> instead of W for consistency\n"
|
||||||
"• rotate main selection moved to ), rotate content to <a-)>, ( for backward\n"
|
"» rotate main selection moved to ), rotate content to <a-)>, ( for backward\n"
|
||||||
"• faces are now scoped, set-face command takes an additional scope parameter\n"
|
"» faces are now scoped, set-face command takes an additional scope parameter\n"
|
||||||
"• <backtab> key is gone, use <s-tab> instead\n"
|
"» <backtab> key is gone, use <s-tab> instead\n"
|
||||||
} };
|
} };
|
||||||
|
|
||||||
void show_startup_info(Client* local_client, int last_version)
|
void show_startup_info(Client* local_client, int last_version)
|
||||||
|
@ -66,12 +66,14 @@ void show_startup_info(Client* local_client, int last_version)
|
||||||
String info;
|
String info;
|
||||||
for (auto note : version_notes)
|
for (auto note : version_notes)
|
||||||
{
|
{
|
||||||
if (note.version > last_version)
|
if (not note.version)
|
||||||
|
info += format("• Development version\n{}\n", note.notes);
|
||||||
|
else if (note.version > last_version)
|
||||||
{
|
{
|
||||||
const auto year = note.version / 10000;
|
const auto year = note.version / 10000;
|
||||||
const auto month = (note.version / 100) % 100;
|
const auto month = (note.version / 100) % 100;
|
||||||
const auto day = note.version % 100;
|
const auto day = note.version % 100;
|
||||||
info += format("● Kakoune v{}.{}{}.{}{}\n{}\n",
|
info += format("• Kakoune v{}.{}{}.{}{}\n{}\n",
|
||||||
year, month < 10 ? "0" : "", month, day < 10 ? "0" : "", day, note.notes);
|
year, month < 10 ? "0" : "", month, day < 10 ? "0" : "", day, note.notes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user