null/demo.local.php
[gitlive] / Commit.js
index fa696e1..e56a48e 100644 (file)
--- a/Commit.js
+++ b/Commit.js
@@ -56,7 +56,7 @@ Commit=new XObject({
     
         this.get('/commitDate').el.set_text(c.changed);
         this.get('/commitAuthor').el.set_text(c.author);
-        
+        this.get('/commitMsg').el.get_buffer().set_text('');
         this.get('/commitPatch').showDiff(c.files);
         
         this.el.show_all();
@@ -65,10 +65,16 @@ Commit=new XObject({
         if (run_ret < 1 ) {
             return false;
         }
+        var buf = this.get('/commitMsg').el.get_buffer();
+        var e = {};
+        var s = {};
+        buf.get_start_iter(s);
+        buf.get_end_iter(e);
+        
         var ret=  {
             date :  this.get('/commitDate').el.get_text(),
             author :  this.get('/commitAuthor').el.get_text(),
-            message :  this.get('/commitMsg').el.get_text()
+            message : buf.get_text(s.value, e.value, false)
         };
      
         return ret;