Commit Graph

20 Commits

Author SHA1 Message Date
Maxime Coste
0ce6bd9bf5 use ByteCount instead of CharCount when we are really counting bytes
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
669d2e456f add postfix operator++ to BufferIterator 2012-10-02 14:09:06 +02:00
Maxime Coste
4b0ccb0437 String and BufferIterator value_type goes back to plain char 2012-10-01 20:20:08 +02:00
Maxime Coste
e4fd839dda use a strongly typed int CharCount for character counts 2012-08-23 23:56:35 +02:00
Maxime Coste
0d8cce2728 use a strongly typed int LineCount for line counts 2012-08-22 23:33:52 +02:00
Maxime Coste
416785f53c Add BufferIterator::clamp(bool avoid_eol) method 2012-08-15 18:18:12 +02:00
Maxime Coste
1ede3f6b13 BufferIterator: use default operator= 2012-08-08 18:51:30 +02:00
Maxime Coste
dd05d6c6f5 BufferIterator: fix operator+ 2012-08-07 23:18:37 +02:00
Maxime Coste
2830825c56 BufferIterator: allow invalid iterator in operator= 2012-07-12 23:11:16 +02:00
Maxime Coste
36e4dacdf5 Fix BufferIterator::on_erase and tweak Buffer 2012-06-28 14:26:01 +02:00
Maxime Coste
ccec35f88c code cleanups in buffer 2012-06-25 19:05:32 +02:00
Maxime Coste
9337938403 replace std::string references with String 2012-04-14 01:17:09 +00:00
Maxime Coste
e4b872abd2 remove ModificationListener and use a list of iterators to update instead
This permits to fix a bug in BufferIterator::upgrade, replaced by
BufferIterator::on_insert and BufferIterator::on_erase. ModificationListener
was only used to updating iterators anyway.
2012-04-04 13:56:19 +00:00
Maxime Coste
2cd318e50d fix BufferIterator::update when removing an end of line 2012-04-01 15:40:25 +00:00
Maxime Coste
07e1fcf67b specialize BufferIterator::operator-- 2012-03-31 15:21:14 +00:00
Maxime Coste
45e362d213 specialize BufferIterator::operator++ to speed up Kakoune 2012-03-30 12:01:18 +00:00
Maxime Coste
2e7cd2233c add a Line::length method 2012-03-30 12:00:40 +00:00
Maxime Coste
0ba7c7286d Store buffer content in a list of lines
Instead of a big std::string, buffer now store it's content in a
list of lines. In order to achieve O(log(n)) random access, lines
contains both their content and their offset since the start of
the file, making binary search usable.

BufferIterator now have a LineAndColumn coordinate into the buffer
instead of an offset so that access is still O(1).
2012-03-30 11:37:18 +00:00
Maxime Coste
3dd82a2b85 get rid of Buffer::at 2012-03-19 14:04:33 +00:00
Maxime Coste
62482b65ec rename buffer_iterator.inl.h to buffer_iterator.inl.hh 2011-10-27 14:13:39 +00:00