summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/command.c b/command.c
index 4cae9c8..0f1c303 100644
--- a/command.c
+++ b/command.c
@@ -369,7 +369,9 @@ void command_execute_ex(Ted *ted, Command c, const CommandArgument *full_argumen
break;
case CMD_NEWLINE:
case CMD_NEWLINE_BACK:
- if (ted->find) {
+ if (code_action_is_open(ted)) {
+ code_action_select_best(ted);
+ } else if (ted->find) {
if (buffer == ted->find_buffer || buffer == ted->replace_buffer) {
if (c == CMD_NEWLINE)
find_next(ted);