mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
eepp:
- add reusable-buffer String::toUtf8() conversion - extract shared find-bar CSS into UIFindBarStyle - reuse the shared style from UIDocFindReplace ecode: - enable terminal find, next, and previous shortcuts - install terminal bindings after conflicting editor bindings are removed eterm: - add searchable terminal history with plain text, RegEx, and LuaPattern modes - support case-sensitive and whole-word matching across wrapped rows - debounce searches and avoid unnecessary string allocations - add an animated find bar with status and wrapped result navigation - expose find commands through configurable keybindings and the context menu - render and navigate search matches in terminal history - forward right-button releases when applications capture the mouse - fix UITabWidgetSplitter ownership during shutdown tests: - cover UTF-8 buffer reuse and terminal search behavior - verify wrapped lines, Unicode, pattern modes, invalid expressions, and navigation - verify SGR right-button release encoding tooling: - clarify the mandatory optimized build workflow for performance work - require direct release test execution before falling back to Xvfb
This commit is contained in:
@@ -133,6 +133,10 @@ void TerminalManager::loadTerminalColorSchemes() {
|
||||
|
||||
KeyBindings::ShortcutMap TerminalManager::getTerminalKeybindings() {
|
||||
return {
|
||||
{ { KEY_F, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "terminal-find" },
|
||||
{ { KEY_G, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "terminal-find-next" },
|
||||
{ { KEY_G, KeyMod::getDefaultModifier() | KEYMOD_SHIFT | KEYMOD_ALT },
|
||||
"terminal-find-previous" },
|
||||
{ { KEY_T, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "create-new-terminal" },
|
||||
{ { KEY_E,
|
||||
KeyMod::getDefaultModifier() | KeyMod::getDefaultSecondaryModifier() | KEYMOD_SHIFT },
|
||||
@@ -741,7 +745,6 @@ void TerminalManager::setKeybindings( UITerminal* term ) {
|
||||
term->getKeyBindings().reset();
|
||||
term->addKeyBinds( mApp->getRealLocalKeybindings() );
|
||||
term->addKeyBinds( mApp->getRealSplitterKeybindings() );
|
||||
term->addKeyBinds( mApp->getRealTerminalKeybindings() );
|
||||
// Remove the keybinds that are problematic for a terminal
|
||||
term->getKeyBindings().removeCommandsKeybind(
|
||||
{ "open-file", "download-file-web", "open-folder", "debug-draw-highlight-toggle",
|
||||
@@ -749,6 +752,9 @@ void TerminalManager::setKeybindings( UITerminal* term ) {
|
||||
"open-locatebar", "open-command-palette", "open-global-search", "menu-toggle",
|
||||
"console-toggle", "go-to-line", "editor-go-back", "editor-go-forward",
|
||||
"project-run-executable", "project-build-and-run" } );
|
||||
// Terminal bindings must be installed last so they can intentionally reuse shortcuts removed
|
||||
// from the editor/global context (for example mod+shift+f).
|
||||
term->addKeyBinds( mApp->getRealTerminalKeybindings() );
|
||||
}
|
||||
|
||||
} // namespace ecode
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
namespace eterm {
|
||||
|
||||
struct TabWidgetSplitterDeleter {
|
||||
void operator()( UITabWidgetSplitter* splitter ) const { eeDelete( splitter ); }
|
||||
};
|
||||
|
||||
void App::TerminalSplitterClient::onTabCreated( UITab* tab, UIWidget* widget ) {
|
||||
if ( mApp.terminalIcon && widget && widget->isType( UI_TYPE_TERMINAL ) )
|
||||
tab->setIcon( mApp.terminalIcon->createDrawable( PixelDensity::dpToPxI( 12 ) ) );
|
||||
@@ -825,7 +829,9 @@ int App::run( int argc, char* argv[] ) {
|
||||
mainLayout->setLayoutSizePolicy( SizePolicy::MatchParent, SizePolicy::MatchParent );
|
||||
mainLayout->setPixelsSize( appWindow->getSize().asFloat() );
|
||||
|
||||
tabSplitter = UITabWidgetSplitter::New( &splitterClient, scene );
|
||||
std::unique_ptr<UITabWidgetSplitter, TabWidgetSplitterDeleter> tabSplitterOwner(
|
||||
UITabWidgetSplitter::New( &splitterClient, scene ) );
|
||||
tabSplitter = tabSplitterOwner.get();
|
||||
tabSplitter->setHideTabBarOnSingleTab( !config->window.alwaysShowTabBar );
|
||||
tabSplitter->setCanCreateSplitFn( [this]( SplitDirection, UIWidget* ) {
|
||||
restoreMaximizedTabWidget();
|
||||
|
||||
@@ -10,6 +10,10 @@ KeyBindings::ShortcutMap App::getDefaultKeybindings() const {
|
||||
return {
|
||||
{ { KEY_C, KEYMOD_CTRL | KEYMOD_SHIFT }, "terminal-copy" },
|
||||
{ { KEY_V, KEYMOD_CTRL | KEYMOD_SHIFT }, "terminal-paste" },
|
||||
{ { KEY_F, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "terminal-find" },
|
||||
{ { KEY_G, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "terminal-find-next" },
|
||||
{ { KEY_G, KeyMod::getDefaultModifier() | KEYMOD_SHIFT | KEYMOD_ALT },
|
||||
"terminal-find-previous" },
|
||||
{ { KEY_T, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "create-new-terminal" },
|
||||
{ { KEY_E,
|
||||
KeyMod::getDefaultModifier() | KeyMod::getDefaultSecondaryModifier() | KEYMOD_SHIFT },
|
||||
|
||||
Reference in New Issue
Block a user