Skip to content

Commit 5fdfd51

Browse files
authored
Dedup command history by default (#17852)
Under ConPTY we don't load any user settings. `SetUpConsole` notes: > If we are [ConPTY], we don't want to load any user settings, > because that could result in some strange rendering results [...] This enables deduplication by default, which I figured wouldn't cause any regressions since it's a user-controllable setting anyway, while it's clearly something the average user wants enabled, for the same reason that PSReadLine has HistoryNoDuplicates enabled by default. Closes #17797 ## Validation Steps Performed * Launch conhost, enter 2 commands, press F7, select the older one, press Enter, press F7. 2 entries ✅ * Launch WT, enter 2 commands, press F7, select the older one, press Enter, press F7. 2 entries ✅
1 parent 7b50f12 commit 5fdfd51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/host/settings.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Settings::Settings() :
3636
_bAutoPosition(true),
3737
_uHistoryBufferSize(DEFAULT_NUMBER_OF_COMMANDS),
3838
_uNumberOfHistoryBuffers(DEFAULT_NUMBER_OF_BUFFERS),
39-
_bHistoryNoDup(false),
39+
_bHistoryNoDup(true),
4040
// ColorTable initialized below
4141
_uCodePage(ServiceLocator::LocateGlobals().uiOEMCP),
4242
_uScrollScale(1),
@@ -110,7 +110,7 @@ void Settings::ApplyDesktopSpecificDefaults()
110110
_bQuickEdit = TRUE;
111111
_uHistoryBufferSize = 50;
112112
_uNumberOfHistoryBuffers = 4;
113-
_bHistoryNoDup = FALSE;
113+
_bHistoryNoDup = true;
114114

115115
_renderSettings.ResetColorTable();
116116

src/propsheet/registry.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ VOID InitRegistryValues(
7979
pStateInfo->CursorSize = 25;
8080
pStateInfo->HistoryBufferSize = 25;
8181
pStateInfo->NumberOfHistoryBuffers = 4;
82-
pStateInfo->HistoryNoDup = 0;
82+
pStateInfo->HistoryNoDup = 1;
8383

8484
// clang-format off
8585
if (pStateInfo->fIsV2Console)

0 commit comments

Comments
 (0)