From 164e1f6b7cc616fbf03d07697232350d7a356b29 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 31 Jul 2015 14:08:12 +0200 Subject: [PATCH] Now setting focus on sourceview after opening a file. --- src/notebook.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/notebook.cc b/src/notebook.cc index 5f04d2b..41aa214 100644 --- a/src/notebook.cc +++ b/src/notebook.cc @@ -35,6 +35,7 @@ void Notebook::open(std::string path) { for(int c=0;cfile_path) { set_current_page(c); + get_current_view()->grab_focus(); return; } } @@ -68,6 +69,7 @@ void Notebook::open(std::string path) { set_current_page(size()-1); set_focus_child(*source_views.back()); get_current_view()->get_buffer()->set_modified(false); + get_current_view()->grab_focus(); //Add star on tab label when the page is not saved: auto source_view=get_current_view(); get_current_view()->get_buffer()->signal_modified_changed().connect([this, source_view]() {