gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/fox-gui/fx_console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fox-gui/fx_console.cpp')
-rw-r--r--fox-gui/fx_console.cpp 22
1 files changed, 12 insertions, 10 deletions
diff --git a/fox-gui/fx_console.cpp b/fox-gui/fx_console.cpp
index cf5afbc8..68342677 100644
--- a/fox-gui/fx_console.cpp
+++ b/fox-gui/fx_console.cpp
@@ -153,11 +153,18 @@ long fx_console::on_key_press(FXObject* obj, FXSelector sel, void* ptr)
setCursorPos(m_input_begin + line_len);
appendText("\n");
- const char* input_line = m_input.text();
- m_history.add(input_line);
-
- this->m_status = output_mode;
- m_engine->set_request(gsl_shell_thread::execute_request, input_line);
+ if (m_input == "exit")
+ {
+ FXApp* app = getApp();
+ app->handle(this, FXSEL(SEL_COMMAND, gsl_shell_app::ID_CONSOLE_CLOSE), NULL);
+ }
+ else
+ {
+ const char* input_line = m_input.text();
+ m_history.add(input_line);
+ this->m_status = output_mode;
+ m_engine->set_request(gsl_shell_thread::execute_request, input_line);
+ }
return 1;
}
@@ -232,11 +239,6 @@ long fx_console::on_lua_output(FXObject* obj, FXSelector sel, void* ptr)
{
m_status = input_mode;
}
- else if (status == gsl_shell::exit_request)
- {
- FXApp* app = getApp();
- app->handle(this, FXSEL(SEL_COMMAND,FXApp::ID_QUIT), NULL);
- }
else
{
show_errors();
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月29日 00:34:54 +0000

AltStyle によって変換されたページ (->オリジナル) /