Skip to content

Commit 3ce48f4

Browse files
committed
v0.2.66: Final BUG-merang fix, disable old status bar on Windows
1 parent e515478 commit 3ce48f4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/editor_app.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ EditorApp::EditorApp(int argc, char* argv[])
191191
for (int i = 1; i < argc; i++) {
192192
std::string arg = argv[i];
193193
if (arg == "--version" || arg == "-v") {
194-
printf("%s\n", get_version().c_str());
194+
std::string ver = get_version();
195+
printf("%s\n", ver.c_str());
195196
running_ = false;
196197
return;
197198
}
@@ -363,8 +364,9 @@ void EditorApp::update_native_status_bar() {
363364
HWND status_hwnd = (HWND)native_status_bar;
364365

365366
// Get vim mode
367+
std::string vim_mode = get_vim_mode_str();
366368
wchar_t mode_buf[32];
367-
swprintf(mode_buf, 32, L"%s", get_vim_mode_str().c_str());
369+
mbstowcs(mode_buf, vim_mode.c_str(), 32);
368370
SendMessage(status_hwnd, SB_SETTEXT, 0, (LPARAM)mode_buf);
369371

370372
// Get filename

0 commit comments

Comments
 (0)