[PATCH] mark buffer modified adding CRLF at EOF



mark buffer modified upon automatic insertion of a
newline at EOF to avoid surprising users.

Is that the right way to do it ?
It seems to work...

-- 
Vincent Legoll
Index: filediff.py
===================================================================
--- filediff.py	(revision 1349)
+++ filediff.py	(working copy)
@@ -572,6 +572,7 @@
                         tasks.remove(t)
                         if (self.prefs.supply_newline and t.text and not t.text[-1].endswith("\n")):
                             t.buf.insert(t.buf.get_end_iter(), "\n")
+                            self.set_buffer_modified(t.buf, True)
                             t.text.append("\n")
                         panetext[t.pane] = "".join(t.text)
             yield 1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]