• Fixed the keybinding merge bug. The helper was restoring missing default commands

by overwriting an occupied default shortcut, which treated user bindings like mod+d=duplicate-line-or-selection as stale
  because that command is not in the default keybinding table. Now it only adds a default when the default shortcut is actually
  free.

  Added a regression test in src/tests/unit_tests/uicodeeditor_tests.cpp:108 covering the reported case: mod+d reassigned, then
  an extra mod+e=show-markdown-preview binding exists. This was reported in SpartanJ/ecode#914.

• Implemented the splitter-level focus state cache, it will remember closed documents cursor state when reopened and it will restore cursor state per-code editor and not per-document (SpartanJ/ecode#893).
This commit is contained in:
Martín Lucas Golini
2026-06-25 11:26:31 -03:00
parent 0693688f73
commit e720b70863
9 changed files with 172 additions and 53 deletions
+4
View File
@@ -196,6 +196,8 @@ void AppConfig::load( const std::string& confPath, std::string& keybindingsPath,
editor.hideTabBarOnSingleTab = ini.getValueB( "editor", "hide_tab_bar_on_single_tab", false );
editor.hideTabBar = ini.getValueB( "editor", "hide_tab_bar", false );
editor.tabSwitcher = ini.getValueB( "editor", "tab_switcher", false );
editor.restoreEditorSelectionOnFocus =
ini.getValueB( "editor", "restore_editor_selection_on_focus", true );
editor.tabJumpMode =
UITabWidget::tabJumpModefromString( ini.getValue( "editor", "tab_jump_mode", "linear" ) );
@@ -388,6 +390,8 @@ void AppConfig::save( const std::vector<std::string>& recentFiles,
ini.setValueB( "editor", "hide_tab_bar_on_single_tab", editor.hideTabBarOnSingleTab );
ini.setValueB( "editor", "hide_tab_bar", editor.hideTabBar );
ini.setValueB( "editor", "tab_switcher", editor.tabSwitcher );
ini.setValueB( "editor", "restore_editor_selection_on_focus",
editor.restoreEditorSelectionOnFocus );
ini.setValue( "editor", "tab_jump_mode",
UITabWidget::tabJumpModeToString( editor.tabJumpMode ) );
ini.setValue( "editor", "new_tab_position", NewTabPosition::toString( editor.newTabPosition ) );