Changeset 9421ea53a3eaa48ff6a7b2b9dbce7cdc7a952723

Show
Ignore:
Timestamp:
01/06/07 23:29:06 (6 years ago)
Author:
Philipp Kern <phil@…>
Parents:
92f8c62392d191d5322ff3df1dcb8cf06df712ba
Children:
8b2a3a49c23b0f36032b2321d61dd524ef2f618c
git-committer:
Philipp Kern <phil@0x539.de> / 2007-01-06T22:29:06Z+0000
Message:

[project @ Fixed gobby synchronization]

Original author: Armin Burgmeier <armin@…>
Date: 2005-04-08 08:11:37+00:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/document.cpp

    r7d6376a r9421ea5  
    2626        // Textbuffer signal handlers 
    2727        buf->signal_insert().connect( 
    28                 sigc::mem_fun(*this, &Document::on_insert) ); 
     28                sigc::mem_fun(*this, &Document::on_insert), false); 
    2929        buf->signal_erase().connect( 
    30                 sigc::mem_fun(*this, &Document::on_erase) ); 
     30                sigc::mem_fun(*this, &Document::on_erase), false); 
    3131 
    3232        // Obby signal handlers 
     
    6666        if(m_editing) return; 
    6767 
    68         // TODO: begin.get_offset()-1? 
    69         std::cout << "Insert " << text << " at " << begin.get_offset()-1 << std::endl; 
    70         m_doc.insert(begin.get_offset() - 1, text); 
     68        std::cout << "Insert " << text << " at " << begin.get_offset() << std::endl; 
     69        m_doc.insert(begin.get_offset(), text); 
    7170} 
    7271 
     
    7675        if(m_editing) return; 
    7776         
    78         std::cout << (begin == end) << std::endl; 
    79         std::cout << "Erasing from " << begin << " to " << end.get_offset()+1 << std::endl; 
    80         m_doc.erase(begin.get_offset(), end.get_offset()+1 ); 
     77        std::cout << "Erasing from " << begin.get_offset() 
     78                  << " to " << end.get_offset() << std::endl; 
     79        m_doc.erase(begin.get_offset(), end.get_offset() ); 
    8180} 
    8281