[gnome-builder] vim: add support for "set so=10" or "set scrolloff=10"
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: add support for "set so=10" or "set scrolloff=10"
- Date: Sun, 11 Jan 2015 04:07:55 +0000 (UTC)
commit b995854e4f01847e5d658cd0696023fa8bfcd577
Author: Christian Hergert <christian hergert me>
Date: Sat Jan 10 20:07:41 2015 -0800
vim: add support for "set so=10" or "set scrolloff=10"
src/vim/gb-source-vim.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 11631e6..3bec5b2 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -3997,6 +3997,16 @@ gb_source_vim_op_set_pair (GbSourceVim *vim,
gtk_source_view_set_indent_width (source_view, v64);
}
+ else if (g_str_equal ("so", key) || g_str_equal ("scrolloff", key))
+ {
+ gint64 v64;
+
+ v64 = g_ascii_strtoll (value, NULL, 10);
+ if (((v64 == G_MAXINT64) || (v64 == G_MININT64)) && (errno == ERANGE))
+ return;
+
+ vim->priv->scroll_off = (guint)v64;
+ }
else if (g_str_has_prefix (key, "nonu"))
{
gtk_source_view_set_show_line_numbers (source_view, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]