[gtksourceview/wip/chergert/vim: 259/293] avoid swapping iters
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim: 259/293] avoid swapping iters
- Date: Fri, 5 Nov 2021 04:23:07 +0000 (UTC)
commit 771d764ea5c054ccfb146cd94e8c9e1dcac995a6
Author: Christian Hergert <chergert redhat com>
Date: Wed Nov 3 14:50:21 2021 -0700
avoid swapping iters
gtksourceview/vim/gtk-source-vim-command.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-command.c b/gtksourceview/vim/gtk-source-vim-command.c
index 53f613f6..d691c510 100644
--- a/gtksourceview/vim/gtk-source-vim-command.c
+++ b/gtksourceview/vim/gtk-source-vim-command.c
@@ -125,9 +125,7 @@ gtk_source_vim_command_yank (GtkSourceVimCommand *self)
gtk_source_vim_state_get_buffer (GTK_SOURCE_VIM_STATE (self), &iter, &selection);
text = gtk_text_iter_get_slice (&iter, &selection);
- gtk_text_iter_order (&selection, &iter);
-
- if (gtk_text_iter_is_end (&iter))
+ if (gtk_text_iter_is_end (&iter) || gtk_text_iter_is_end (&selection))
{
char *tmp = text;
text = g_strdup_printf ("%s\n", tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]