[gnome-builder] vim: fix scrolloff at beginning of document
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: fix scrolloff at beginning of document
- Date: Mon, 12 Jan 2015 23:37:54 +0000 (UTC)
commit fbb1252c74ea299fde96fd3a79a9e3dc4880d2a7
Author: Florian Bäuerle <florian bae gmail com>
Date: Sun Jan 11 18:24:39 2015 +0100
vim: fix scrolloff at beginning of document
https://bugzilla.gnome.org/show_bug.cgi?id=742767
Signed-off-by: Florian Bäuerle <florian bae gmail com>
src/vim/gb-source-vim.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 3bec5b2..318682b 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -2792,7 +2792,7 @@ gb_source_vim_move_page (GbSourceVim *vim,
adjusted_scroll = gb_source_vim_adjust_scroll (vim, line, GB_SOURCE_VIM_ALIGNMENT_KEEP);
break;
case GB_SOURCE_VIM_PAGE_UP:
- line = gtk_text_iter_get_line (&iter_top);
+ line = MAX (vim->priv->scroll_off, gtk_text_iter_get_line (&iter_top));
adjusted_scroll = gb_source_vim_adjust_scroll (vim, line, GB_SOURCE_VIM_ALIGNMENT_BOTTOM);
break;
case GB_SOURCE_VIM_PAGE_DOWN:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]