[latexila] comment: don't insert trailing space
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] comment: don't insert trailing space
- Date: Sat, 27 Dec 2014 18:04:55 +0000 (UTC)
commit 4b4752e8170a5c0ed12771407700dabe7423c9ee
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 0fa20d7..23e8062 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -381,7 +381,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]