From 9ff6de0122208602f797322430f48093bfb5954e Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Mon, 13 Nov 2023 00:41:17 +0900 Subject: [PATCH] Override the default value of `editor.find.seedSearchStringFromSelection` via the `configurationDefaults` contribution point (#1766) * Override the default value of `editor.find.seedSearchStringFromSelection` via the `configurationDefaults` contribution point * Remove the section from README.md about the `editor.find.seedSearchStringFromSelection` config * Update README.md --- README.md | 12 ++++-------- package.json | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1bb7c8518c..f623329712 100644 --- a/README.md +++ b/README.md @@ -43,16 +43,12 @@ It's an intended design that simulates the original Emacs' behavior. You can disable it with `emacs-mcx.cursorMoveOnFindWidget` option described below. See https://github.com/whitphx/vscode-emacs-mcx/issues/137 for the details about this topic. -### i-search (`C-s`) is initialized with the currently selected string and the previous search is removed. +### The find widget is not initialized with the currently selected string when using `C-s`. It's different from the original VSCode' behavior. -This is VSCode's design that an extension cannot control. -To disable it, you should set `editor.find.seedSearchStringFromSelection` VSCode setting as `"never"`. -It makes the find widget work similarly to Emacs. +This behavior is controlled by `editor.find.seedSearchStringFromSelection` VSCode setting. This extension overrides its default value as `"never"` for the Emacs-like behavior, +while the original VSCode's default value is `"always"`. -Refs: - -- [The official doc about `editor.find.seedSearchStringFromSelection` setting](basics#_seed-search-string-from-selection) -- [The GitHub issue where we discuss about it](https://github.com/whitphx/vscode-emacs-mcx/issues/107) +You can [edit the setting](https://code.visualstudio.com/docs/getstarted/settings) if you prefer a different behavior. ### The extension has been broken! diff --git a/package.json b/package.json index 67a85daa46..95c958916b 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,9 @@ } } }, + "configurationDefaults": { + "editor.find.seedSearchStringFromSelection": "never" + }, "commands": [ { "command": "emacs-mcx.addSelectionToNextFindMatch",