[gnome-builder] vim: only retract offset if we aren't at the begining of the line
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: only retract offset if we aren't at the begining of the line
- Date: Wed, 31 Dec 2014 12:28:16 +0000 (UTC)
commit 35a61c6d926eaa4fc2afca6f20f43b58b83cd022
Author: Christian Hergert <christian hergert me>
Date: Wed Dec 31 03:22:31 2014 -0800
vim: only retract offset if we aren't at the begining of the line
src/vim/gb-source-vim.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 7e7f2ce..6338aac 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -1545,7 +1545,11 @@ gb_source_vim_move_up (GbSourceVim *vim)
if (is_single_char_selection (&iter, &selection))
{
if (gtk_text_iter_compare (&iter, &selection) > 0)
- priv->target_line_offset = --offset;
+ {
+ if (offset)
+ --offset;
+ priv->target_line_offset = offset;
+ }
}
gtk_text_buffer_get_iter_at_line (buffer, &iter, line - 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]