Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(term): add descriptive error on Windows for lack of VT #32

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ The scope of what is covered by the version number excludes:

## Version history

### unreleased

- Chore: add compiler error on Windows if Virtual Terminal Processing is unavailable.

### Version 0.4.2, released 25-Jun-2024

- Fix: include additional headers for some MinGW installations
Expand Down
5 changes: 5 additions & 0 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ typedef struct ls_RegConst {
// This is needed because some flags are not defined on all platforms. So we
// still export the constants, but they will be all 0, and hence not do anything.
#ifdef _WIN32
// check compatibility: Windows virtual terminal processing was added in 2015,
// some older compiler suites don't have the proper headers.
#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT
#error Virtual terminal macros are undefined (eg. ENABLE_VIRTUAL_TERMINAL_INPUT). Update the toolchain or revert to Luasystem < 0.4
#endif
#define CHECK_WIN_FLAG_OR_ZERO(flag) flag
#define CHECK_NIX_FLAG_OR_ZERO(flag) 0
#else
Expand Down
Loading