[gtksourceview/wip/chergert/vim: 55/293] fix $ motion
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim: 55/293] fix $ motion
- Date: Fri, 5 Nov 2021 04:22:57 +0000 (UTC)
commit a5e7e91575787cf81864a593cadfeda7fc1dca7d
Author: Christian Hergert <chergert redhat com>
Date: Sat Oct 23 14:29:43 2021 -0700
fix $ motion
gtksourceview/vim/gtk-source-vim-motion.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-motion.c b/gtksourceview/vim/gtk-source-vim-motion.c
index 072b5271..40fcdc4a 100644
--- a/gtksourceview/vim/gtk-source-vim-motion.c
+++ b/gtksourceview/vim/gtk-source-vim-motion.c
@@ -492,7 +492,13 @@ static gboolean
motion_line_end (GtkTextIter *iter,
GtkSourceView *view)
{
- return gtk_text_iter_forward_to_line_end (iter);
+ GtkTextIter begin = *iter;
+
+ gtk_text_iter_forward_to_line_end (iter);
+ if (!gtk_text_iter_starts_line (iter))
+ gtk_text_iter_backward_char (iter);
+
+ return !gtk_text_iter_equal (&begin, iter);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]