Changeset 9421ea53a3eaa48ff6a7b2b9dbce7cdc7a952723
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r7d6376a
|
r9421ea5
|
|
| 26 | 26 | // Textbuffer signal handlers |
| 27 | 27 | buf->signal_insert().connect( |
| 28 | | sigc::mem_fun(*this, &Document::on_insert) ); |
| | 28 | sigc::mem_fun(*this, &Document::on_insert), false); |
| 29 | 29 | buf->signal_erase().connect( |
| 30 | | sigc::mem_fun(*this, &Document::on_erase) ); |
| | 30 | sigc::mem_fun(*this, &Document::on_erase), false); |
| 31 | 31 | |
| 32 | 32 | // Obby signal handlers |
| … |
… |
|
| 66 | 66 | if(m_editing) return; |
| 67 | 67 | |
| 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); |
| 71 | 70 | } |
| 72 | 71 | |
| … |
… |
|
| 76 | 75 | if(m_editing) return; |
| 77 | 76 | |
| 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() ); |
| 81 | 80 | } |
| 82 | 81 | |