Skip to content

Commit

Permalink
Make New command focus editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel committed Dec 3, 2022
1 parent 96342f3 commit 8dd9200
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/callbacks.c
Expand Up @@ -91,7 +91,7 @@ static gboolean on_window_delete_event(GtkWidget *widget, GdkEvent *event, gpoin

void on_new1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
document_new_file(NULL, NULL, NULL);
keybindings_send_command(GEANY_KEY_GROUP_FILE, GEANY_KEYS_FILE_NEW);
}


Expand Down
1 change: 1 addition & 0 deletions src/keybindings.c
Expand Up @@ -1447,6 +1447,7 @@ static gboolean cb_func_file_action(guint key_id)
{
case GEANY_KEYS_FILE_NEW:
document_new_file(NULL, NULL, NULL);
cb_func_switch_action(GEANY_KEYS_FOCUS_EDITOR);
break;
case GEANY_KEYS_FILE_OPEN:
on_open1_activate(NULL, NULL);
Expand Down

0 comments on commit 8dd9200

Please sign in to comment.