diff --git a/src/backup/todo.txt b/src/backup/todo.txt index f5c8e81..d362599 100644 --- a/src/backup/todo.txt +++ b/src/backup/todo.txt @@ -8,6 +8,7 @@ - Macros - ctrl-e started doing no-ops again ... ?? - Window position: vscode opens in fullscreen and then remembers what position it was close in (could be a config option) +- On Linux: Try to implement is_debugger_present() - OnUpdate view hooks! - OnSave buffer hooks which will execute the config on save diff --git a/src/basic/basic_head.h b/src/basic/basic_head.h index a7c4026..10b5bc1 100644 --- a/src/basic/basic_head.h +++ b/src/basic/basic_head.h @@ -77,7 +77,14 @@ #endif #if OS_WINDOWS -#define BREAK() __debugbreak() +#ifndef NOMINMAX + #define NOMINMAX +#endif +#ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN +#endif +#include +#define BREAK() if (IsDebuggerPresent()) {__debugbreak();} #elif OS_LINUX #define BREAK() raise(SIGTRAP) #elif OS_WASM diff --git a/src/text_editor/config.cpp b/src/text_editor/config.cpp index 8603c2a..b54704f 100644 --- a/src/text_editor/config.cpp +++ b/src/text_editor/config.cpp @@ -282,11 +282,8 @@ void TestParser() { ok = MatchEvent(trigger, &event); Assert(!ok); } - - } RegisterFunction(&TestFunctions, TestParser); - void CMD_OpenConfig() { Buffer *buffer = GetBuffer(GlobalConfigBufferID); Open(buffer->name); diff --git a/src/text_editor/globals.cpp b/src/text_editor/globals.cpp index 61dc344..409ddfa 100644 --- a/src/text_editor/globals.cpp +++ b/src/text_editor/globals.cpp @@ -8,7 +8,11 @@ bool WaitForEventsState = true; bool RunGCThisFrame; bool SearchCaseSensitive = false; bool SearchWordBoundary = false; +#if OS_WINDOWS bool BreakOnError = true; +#else +bool BreakOnError = false; +#endif WindowID WindowIDs; ViewID ViewIDs;