Kaydet (Commit) 3bcd7fc4 authored tarafından Matthew Brush's avatar Matthew Brush

Merge pull request #19 from techee/fixes

Fixes
...@@ -2895,7 +2895,8 @@ gboolean document_check_disk_status(GeanyDocument *doc, gboolean force) ...@@ -2895,7 +2895,8 @@ gboolean document_check_disk_status(GeanyDocument *doc, gboolean force)
g_return_val_if_fail(doc != NULL, FALSE); g_return_val_if_fail(doc != NULL, FALSE);
/* ignore remote files and documents that have never been saved to disk */ /* ignore remote files and documents that have never been saved to disk */
if (file_prefs.disk_check_timeout == 0 || doc->real_path == NULL || doc->priv->is_remote) if (notebook_switch_in_progress() || file_prefs.disk_check_timeout == 0
|| doc->real_path == NULL || doc->priv->is_remote)
return FALSE; return FALSE;
use_gio_filemon = (doc->priv->monitor != NULL); use_gio_filemon = (doc->priv->monitor != NULL);
......
...@@ -169,6 +169,8 @@ static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *ev, gpointe ...@@ -169,6 +169,8 @@ static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *ev, gpointe
/* user may have rebound keybinding to a different modifier than Ctrl, so check all */ /* user may have rebound keybinding to a different modifier than Ctrl, so check all */
if (switch_in_progress && is_modifier_key(ev->keyval)) if (switch_in_progress && is_modifier_key(ev->keyval))
{ {
GeanyDocument *doc;
switch_in_progress = FALSE; switch_in_progress = FALSE;
if (switch_dialog) if (switch_dialog)
...@@ -177,8 +179,10 @@ static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *ev, gpointe ...@@ -177,8 +179,10 @@ static gboolean on_key_release_event(GtkWidget *widget, GdkEventKey *ev, gpointe
switch_dialog = NULL; switch_dialog = NULL;
} }
update_mru_docs_head(document_get_current()); doc = document_get_current();
update_mru_docs_head(doc);
mru_pos = 0; mru_pos = 0;
document_check_disk_status(doc, TRUE);
} }
return FALSE; return FALSE;
} }
...@@ -289,6 +293,12 @@ void notebook_switch_tablastused(void) ...@@ -289,6 +293,12 @@ void notebook_switch_tablastused(void)
} }
gboolean notebook_switch_in_progress(void)
{
return switch_in_progress;
}
static gboolean focus_sci(GtkWidget *widget, GdkEventButton *event, gpointer user_data) static gboolean focus_sci(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
{ {
GeanyDocument *doc = document_get_current(); GeanyDocument *doc = document_get_current();
......
...@@ -36,4 +36,8 @@ void notebook_remove_page(gint page_num); ...@@ -36,4 +36,8 @@ void notebook_remove_page(gint page_num);
* previous tabs. */ * previous tabs. */
void notebook_switch_tablastused(void); void notebook_switch_tablastused(void);
/* Returns TRUE when MRU tab switch is in progress (i.e. not at the final
* document yet). */
gboolean notebook_switch_in_progress(void);
#endif #endif
...@@ -384,15 +384,21 @@ gboolean tm_workspace_create_global_tags(const char *pre_process, const char **i ...@@ -384,15 +384,21 @@ gboolean tm_workspace_create_global_tags(const char *pre_process, const char **i
*/ */
if (pre_process != NULL) if (pre_process != NULL)
{ {
gint ret;
command = g_strdup_printf("%s %s | grep -v -E '^\\s*(G_BEGIN_DECLS|G_END_DECLS)\\s*$' > %s", command = g_strdup_printf("%s %s | grep -v -E '^\\s*(G_BEGIN_DECLS|G_END_DECLS)\\s*$' > %s",
pre_process, temp_file, temp_file2); pre_process, temp_file, temp_file2);
#ifdef TM_DEBUG #ifdef TM_DEBUG
g_message("Executing: %s", command); g_message("Executing: %s", command);
#endif #endif
system(command); ret = system(command);
g_free(command); g_free(command);
g_unlink(temp_file); g_unlink(temp_file);
g_free(temp_file); g_free(temp_file);
if (ret == -1)
{
g_unlink(temp_file2);
return FALSE;
}
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment