1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-12 16:40:27 +00:00

Update CHANGELOG and make tweaks to win32 shell

This commit is contained in:
bakpakin 2022-07-09 11:39:06 -05:00
parent 9da91a8217
commit 6a92e8b609
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file.
## 1.23.1 - ???
- Add better support for windows console in the default shell.c for autocompletion and
other shell-like input features.
- Improve default error message from `assert`.
- Add the `tabseq` macro for simpler table comprehensions.
- Allow setting `(dyn :task-id)` in fibers to improve context in supervisor messages. Prior to

View File

@ -136,6 +136,7 @@ void janet_line_get(const char *p, JanetBuffer *buffer) {
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
static void setup_console_output(void) {
/* Enable color console on windows 10 console and utf8 output and other processing */
@ -158,7 +159,7 @@ static int rawmode(void) {
dwMode &= ~ENABLE_ECHO_INPUT;
dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT;
dwMode &= ~ENABLE_PROCESSED_INPUT;
SetConsoleMode(hOut, dwMode);
if (!SetConsoleMode(hOut, dwMode)) return 1;
gbl_israwmode = 1;
return 0;
}
@ -193,7 +194,7 @@ static long read_console(char *into, size_t n) {
}
static int check_simpleline(JanetBuffer *buffer) {
if (rawmode()) {
if (!_isatty(_fileno(stdin)) || rawmode()) {
simpleline(buffer);
return 1;
}