Add horizontal scrolling support and refactor mouse click handling in GUI.

- Introduce horizontal scrolling with column offset synchronization in GUI.
- Refactor mouse click handling for improved accuracy and viewport alignment.
- Enhance tab expansion and cursor rendering logic for better user experience.
- Replace redundant variable declarations in `Buffer` for cleaner code.
This commit is contained in:
2025-11-30 17:19:46 -08:00
parent 38ba8c9871
commit fcb2e9a7ed
5 changed files with 189 additions and 83 deletions

View File

@@ -189,6 +189,15 @@ main(int argc, const char *argv[])
fe = std::make_unique<TerminalFrontend>();
}
#if defined(KTE_BUILD_GUI) && defined(__APPLE__)
if (use_gui) {
/* likely using the .app, so need to cd */
if (chdir(getenv("HOME")) != 0) {
std::cerr << "kge.app: failed to chdir to HOME" << std::endl;
}
}
#endif
if (!fe->Init(editor)) {
std::cerr << "kte: failed to initialize frontend" << std::endl;
return 1;