[gtksourceview/wip/chergert/vim] fix k at top line
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim] fix k at top line
- Date: Sun, 7 Nov 2021 19:01:33 +0000 (UTC)
commit 5a22d3086bd6b42ed9c13d34e229ff7b59bafd8c
Author: Christian Hergert <chergert redhat com>
Date: Sun Nov 7 11:01:28 2021 -0800
fix k at top line
gtksourceview/vim/gtk-source-vim-motion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-motion.c b/gtksourceview/vim/gtk-source-vim-motion.c
index ba3e4d6e..0eae6609 100644
--- a/gtksourceview/vim/gtk-source-vim-motion.c
+++ b/gtksourceview/vim/gtk-source-vim-motion.c
@@ -653,7 +653,8 @@ motion_prev_line_visual_column (GtkTextIter *iter,
if (self->apply_count != 1 || count == 0)
return FALSE;
- gtk_text_buffer_get_iter_at_line (buffer, iter, line - count);
+ line = count > line ? 0 : line - count;
+ gtk_text_buffer_get_iter_at_line (buffer, iter, line);
get_iter_at_visual_column (view, iter, column);
if (!gtk_text_iter_starts_line (iter) && gtk_text_iter_ends_line (iter))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]