[gnome-builder] vim: ignore delete-range callback if we are not the focused view.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: ignore delete-range callback if we are not the focused view.
- Date: Fri, 9 Jan 2015 02:35:22 +0000 (UTC)
commit 2a5981721908cd5258655cccc13a6a8d7cb5c4b3
Author: Christian Hergert <christian hergert me>
Date: Thu Jan 8 18:35:02 2015 -0800
vim: ignore delete-range callback if we are not the focused view.
This helps some spurious scrolling I've been seeing with split views.
src/vim/gb-source-vim.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 4f7a5e9..8fd9d44 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -3251,6 +3251,12 @@ gb_source_vim_delete_range_cb (GtkTextBuffer *buffer,
g_return_if_fail (end);
g_return_if_fail (GB_IS_SOURCE_VIM (vim));
+ /*
+ * If we are not the focus widget, then it is not our problem.
+ */
+ if (!gtk_widget_has_focus (GTK_WIDGET (vim->priv->text_view)))
+ return;
+
if (vim->priv->mode == GB_SOURCE_VIM_INSERT)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]