[gnome-builder/gnome-builder-3-30] editor: focus to a location grab focus if file is already loaded
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-30] editor: focus to a location grab focus if file is already loaded
- Date: Thu, 27 Sep 2018 19:08:43 +0000 (UTC)
commit c27305d9f9c43dbc59bb42f7e6c810063a5862a3
Author: Günther Wagner <info gunibert de>
Date: Thu Sep 27 20:39:20 2018 +0200
editor: focus to a location grab focus if file is already loaded
Using the global search, the view doesn't get the focus if the file
is already loaded. To try keeping the cursor current location,
the global search use a 0:0 one to skip any scroll at a position.
But in this case, we miss to re-focusing the view.
src/libide/editor/ide-editor-perspective.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/libide/editor/ide-editor-perspective.c b/src/libide/editor/ide-editor-perspective.c
index c55ef30a3..5d2a20dfb 100644
--- a/src/libide/editor/ide-editor-perspective.c
+++ b/src/libide/editor/ide-editor-perspective.c
@@ -535,6 +535,8 @@ ide_editor_perspective_focus_location_full (IdeEditorPerspective *self,
*/
if (line || line_offset)
ide_editor_view_scroll_to_line_offset (lookup.view, line, line_offset);
+ else
+ gtk_widget_grab_focus (GTK_WIDGET (lookup.view));
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]