Skip to content

Instantly share code, notes, and snippets.

@codebrainz
Created June 2, 2011 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codebrainz/1003959 to your computer and use it in GitHub Desktop.
Save codebrainz/1003959 to your computer and use it in GitHub Desktop.
Geany - Grab focus after opening each document (Scintilla Widgets).
diff --git a/src/keyfile.c b/src/keyfile.c
index ad6aea5..5577b39 100644
--- a/src/keyfile.c
+++ b/src/keyfile.c
@@ -1031,6 +1031,7 @@ static gboolean open_session_file(gchar **tmp, guint len)
editor_set_line_wrapping(doc->editor, line_wrapping);
doc->editor->line_breaking = line_breaking;
doc->editor->auto_indent = auto_indent;
+ gtk_widget_grab_focus(doc->editor->sci);
ret = TRUE;
}
}
@codebrainz
Copy link
Author

Or this could be done once for each time project files are opened, maybe in project.c around line 314.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment