Skip to content

Commit 3f5211c

Browse files
committed
v13.9.0.2
1 parent a9c5eb4 commit 3f5211c

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

src/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#define VERSION_NUM1 13
22
#define VERSION_NUM2 9
33
#define VERSION_NUM3 0
4-
#define VERSION_NUM4 1
4+
#define VERSION_NUM4 2
55

66
#define STRINGIZER_HELPER(a) #a
77
#define STRINGIZER(a) STRINGIZER_HELPER(a)

src/ghost_terminal.cpp

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,7 @@ class ghost_terminal final: public simple_terminal {
839839
}
840840
else if(able_get_result)
841841
return Wait;
842-
else
843-
return Continue;
842+
return Continue;
844843
}
845844
virtual bool terminal_run(const wstring& command) override {
846845
auto Result = linker.NOTYFY({{L"Event", L"ShioriEcho"},
@@ -928,25 +927,11 @@ class ghost_terminal final: public simple_terminal {
928927
return command;
929928
{
930929
//考虑到sstp极慢的速度,只在需要时更新command的色彩
931-
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
932-
INPUT_RECORD irBuf[16];
933-
DWORD cNumRead;
934-
//peek next input event
935-
PeekConsoleInputW(hInput, irBuf, 16, &cNumRead);
936-
for (size_t i = 0; i < cNumRead; ++i) {
937-
const auto& ir = irBuf[i];
938-
if (ir.EventType == WINDOW_BUFFER_SIZE_EVENT)
939-
break;
940-
else if(ir.EventType != KEY_EVENT)
941-
continue;
942-
const auto& key = ir.Event.KeyEvent;
943-
if (!key.bKeyDown)
944-
continue;
945-
if(key.wVirtualKeyCode != VK_RETURN)
946-
return command;
947-
else
948-
break;
949-
}
930+
const auto next_char = terminal_n::peek_key_input();
931+
if(next_char == L'\r' || next_char == L'\n')
932+
;//fall through
933+
else if(next_char)
934+
return command;
950935
}
951936
auto Result = linker.NOTYFY({{L"Event", L"ShioriEcho.CommandUpdate"},
952937
{L"Reference0", command}});

0 commit comments

Comments
 (0)