mirror of
https://github.com/janet-lang/janet
synced 2025-08-04 13:03:52 +00:00
Update CHANGELOG and make tweaks to win32 shell
This commit is contained in:
parent
9da91a8217
commit
6a92e8b609
@ -2,6 +2,8 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## 1.23.1 - ???
|
## 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`.
|
- Improve default error message from `assert`.
|
||||||
- Add the `tabseq` macro for simpler table comprehensions.
|
- Add the `tabseq` macro for simpler table comprehensions.
|
||||||
- Allow setting `(dyn :task-id)` in fibers to improve context in supervisor messages. Prior to
|
- Allow setting `(dyn :task-id)` in fibers to improve context in supervisor messages. Prior to
|
||||||
|
@ -136,6 +136,7 @@ void janet_line_get(const char *p, JanetBuffer *buffer) {
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <io.h>
|
||||||
|
|
||||||
static void setup_console_output(void) {
|
static void setup_console_output(void) {
|
||||||
/* Enable color console on windows 10 console and utf8 output and other processing */
|
/* 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_ECHO_INPUT;
|
||||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT;
|
dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT;
|
||||||
dwMode &= ~ENABLE_PROCESSED_INPUT;
|
dwMode &= ~ENABLE_PROCESSED_INPUT;
|
||||||
SetConsoleMode(hOut, dwMode);
|
if (!SetConsoleMode(hOut, dwMode)) return 1;
|
||||||
gbl_israwmode = 1;
|
gbl_israwmode = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -193,7 +194,7 @@ static long read_console(char *into, size_t n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int check_simpleline(JanetBuffer *buffer) {
|
static int check_simpleline(JanetBuffer *buffer) {
|
||||||
if (rawmode()) {
|
if (!_isatty(_fileno(stdin)) || rawmode()) {
|
||||||
simpleline(buffer);
|
simpleline(buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user