Sublime Forum

[Mac, ST4] Hitting enter in search field is creating a new line

#1

I have the keybinding, but in the new SublimeText 4, the search field of the find all(replace?) dialog will add a new line if I hit enter. (Mac, with as many windows key binds as I can, because Mac hotkeys are garbage.)

 	// Find panel key bindings
	{ "keys": ["enter"], "command": "find_next", "context":
		[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
	},

	// Replace panel key bindings
	{ "keys": ["enter"], "command": "find_next", "context":
		[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
	},

In the Single file search, it works, but the multi-file search it adds a line feed.

0 Likes

#2

Does it happen in safe mode as well?

It’s possible there’s a package with keybindings (possibly hidden ones) that are getting in the way.

0 Likes

#3

@OdatNurd I have the exact same problem and it indeed is not reproducible in safe mode.

The alt + enter does trigger a search though. In safe mode both enter and alt + enter trigger a search.

I’ve tried disabling all my packages (with exception to Package Control) to no effect though.

0 Likes

#4

For what it’s worth: https://github.com/sublimehq/sublime_text/issues/4218#issuecomment-847152317

It ends up that, somehow the user overrides the keybinding file in the Default package. That results in that all built-in keybindings are effectively removed and only those added by yourself work.

2 Likes

#5

Thanks, that solved it!

0 Likes

#6

Oof… I can’t go back to the Mac shortcuts… there has to be a way to keep the default enter?

0 Likes