Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resuming incremental search replaces old search with word at current location #107

Closed
m27315 opened this issue Apr 19, 2019 · 10 comments · Fixed by #1766
Closed

Resuming incremental search replaces old search with word at current location #107

m27315 opened this issue Apr 19, 2019 · 10 comments · Fixed by #1766

Comments

@m27315
Copy link

m27315 commented Apr 19, 2019

Steps to Reproduce

  1. Search for word (C-s).
  2. Exit incremental search through movement (e.g., C-a, jump to front of line).
  3. Assuming a different word is now under the cursor, resuming the incremental search (pressing C-s again) will instead search for the current word instead of resuming previous search.

Expected Behavior

Emacs would resume the previous incremental search, instead of starting a new search with the word under the cursor.

Versions

Awesome Emacs Keymap: 0.11.2
VSCode Version: 1.33.1
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:20:22.771Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.19.27-gentoo-r1
@joeshaw
Copy link
Contributor

joeshaw commented May 16, 2019

Setting editor.find.seedSearchStringFromSelection to false will stop the find widget from doing this. Perhaps the extension should set this setting.

@whitphx
Copy link
Owner

whitphx commented Jun 12, 2019

It seems overriding configuration by extension is not allowed now.
Related issue: microsoft/vscode#26707 (comment)

For now, please set editor.find.seedSearchStringFromSelection config as @joeshaw wrote by yourself. Thanks!

@TTimo
Copy link

TTimo commented Feb 16, 2020

I love the extension, but this particular problem with C-s has been driving me nuts. Thanks for the workaround!

@whitphx
Copy link
Owner

whitphx commented Mar 16, 2020

memo: microsoft/vscode#1396

@laktech
Copy link

laktech commented Jan 15, 2022

https://code.visualstudio.com/docs/getstarted/settings#_default-settings

link to the config docs as it's not a boolean type as the comments above suggest. the config accepts "never", "always", "selection"

@whitphx
Copy link
Owner

whitphx commented Jan 20, 2022

Thank you.
It seems to have been changed at v1.59: microsoft/vscode-docs@a27b0ef#diff-d432cc9e616a920ea35cfeddb72b780f663270fd96f6871ec99dc8bda5b8cfb5R350

I will update the README of this extension.

@whitphx
Copy link
Owner

whitphx commented Jan 20, 2022

Yet, this page still says

This feature can be turned off by setting editor.find.seedSearchStringFromSelection to false.

So it seems to accept both false and "never".

@whitphx
Copy link
Owner

whitphx commented Jan 20, 2022

#1168

@whitphx
Copy link
Owner

whitphx commented Jan 24, 2022

Updating the VSCode settings seems to be possible:

-> Try to set editor.find.seedSearchStringFromSelection programatically.

@whitphx
Copy link
Owner

whitphx commented Nov 12, 2023

From 0.54.0, this extension overrides the default value of editor.find.seedSearchStringFromSelection to "never" so the workaround introduced above will no longer necessary.
It still allows configuring the setting by users, so people who like VSCode's default behavior like #1278 can use it while they need to edit the settings by hand.

I changed my mind and overriding the default value of the global config is too aggressive, so reverted it #1768, v0.51.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants