[gtksourceview] Fix another join-line case
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Fix another join-line case
- Date: Thu, 12 Mar 2015 19:48:58 +0000 (UTC)
commit a9f1e33ce8f98581cd80f50660233e24d07c8669
Author: Paolo Borelli <pborelli gnome org>
Date: Thu Mar 12 20:47:07 2015 +0100
Fix another join-line case
Last patch fixed on thing and broke another... make sure we insert
a space between the joined lines unless the second line is empty
gtksourceview/gtksourcebuffer.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index d3ce2f4..b5d599b 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -2593,7 +2593,6 @@ gtk_source_buffer_join_lines (GtkSourceBuffer *buffer,
{
GtkTextIter iter;
gunichar ch;
- gboolean insert_space = FALSE;
iter = *start;
@@ -2602,7 +2601,6 @@ gtk_source_buffer_join_lines (GtkSourceBuffer *buffer,
ch = gtk_text_iter_get_char (&iter);
if (!g_unichar_isspace (ch))
{
- insert_space = TRUE;
break;
}
} while (gtk_text_iter_forward_char (&iter) &&
@@ -2611,7 +2609,7 @@ gtk_source_buffer_join_lines (GtkSourceBuffer *buffer,
if (!gtk_text_iter_is_end (&iter))
{
gtk_text_buffer_delete (text_buffer, start, &iter);
- if (insert_space)
+ if (!gtk_text_iter_ends_line (start))
{
gtk_text_buffer_insert (text_buffer, start, " ", 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]