diff --git a/src/main.cc b/src/main.cc index 4ceae5a8..27c144ae 100644 --- a/src/main.cc +++ b/src/main.cc @@ -40,25 +40,25 @@ namespace Kakoune extern const char* version; struct { - int version; + unsigned int version; const char* notes; } constexpr version_notes[] = { { - 99999999, - "• Big breaking refactoring of various Kakoune features,\n" + 0, + "» Big breaking refactoring of various Kakoune features,\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, - "• 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" - "• '*' 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" - "• 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" - "• WORD text object moved to instead of W for consistency\n" - "• rotate main selection moved to ), rotate content to , ( for backward\n" - "• faces are now scoped, set-face command takes an additional scope parameter\n" - "• key is gone, use instead\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" + "» 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" + "» WORD text object moved to instead of W for consistency\n" + "» rotate main selection moved to ), rotate content to , ( for backward\n" + "» faces are now scoped, set-face command takes an additional scope parameter\n" + "» key is gone, use instead\n" } }; 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; 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 month = (note.version / 100) % 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); } }