[latexila/gnome-3-14] comment: don't insert trailing space
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/gnome-3-14] comment: don't insert trailing space
- Date: Sun, 18 Jan 2015 18:01:39 +0000 (UTC)
commit ac1341bfeb41cdfa6d0b7d44a865df833594f88e
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Dec 27 19:03:21 2014 +0100
comment: don't insert trailing space
src/document.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/document.vala b/src/document.vala
index 51418cb..6da46a9 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -382,7 +382,12 @@ public class Document : Gtk.SourceBuffer
for (int line_num = start_line ; line_num <= end_line ; line_num++)
{
- insert (ref cur_iter, "% ", -1);
+ if (cur_iter.ends_line ())
+ // Don't insert a trailing space.
+ insert (ref cur_iter, "%", -1);
+ else
+ insert (ref cur_iter, "% ", -1);
+
cur_iter.forward_line ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]