[gnome-builder] source-vim: Only snure scroll for key events
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] source-vim: Only snure scroll for key events
- Date: Thu, 29 Jan 2015 15:16:06 +0000 (UTC)
commit 41f5921aabef7abd877b00b7f3e615c285b913c8
Author: Carlos Soriano <csoriano gnome org>
Date: Thu Jan 29 16:14:32 2015 +0100
source-vim: Only snure scroll for key events
In insert mode we connect to every event with the after-event signal
but we only want to ensure scroll when we are navigating with keys,
not because of the scroll wheel or because the focus changed.
src/vim/gb-source-vim.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 0edf817..cf7bbfc 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -3381,7 +3381,8 @@ gb_source_vim_event_after_cb (GtkTextView *text_view,
{
g_return_if_fail (GB_IS_SOURCE_VIM (vim));
- if (vim->priv->mode == GB_SOURCE_VIM_INSERT)
+ if (vim->priv->mode == GB_SOURCE_VIM_INSERT &&
+ event->type == GDK_KEY_PRESS)
gb_source_vim_ensure_scroll (vim);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]