summaryrefslogtreecommitdiff
path: root/src/buffer.cc
AgeCommit message (Collapse)Author
2012-11-27fix buffer creation on empty fileMaxime Coste
2012-11-23Buffer takes a vector of lines as initial contentMaxime Coste
2012-11-23buffer: increment timestamp on notify savedMaxime Coste
2012-11-22Cleanups and minor refactoring on BufferMaxime Coste
2012-11-22move Window ownership to the ClientManager instead of the BufferMaxime Coste
2012-11-22rename (hook|option)_manager to (hook|option)s.Maxime Coste
And Global(Hook|Option)Manager to Global(Hook|Option)s
2012-11-21Buffer: replace reset_undo_data with a NoUndo flagMaxime Coste
2012-11-21minor fixes to buffer constructorMaxime Coste
2012-11-20Buffer: replace Buffer::Type with Buffer::FlagsMaxime Coste
2012-11-12make Buffer::{add,remove}_change_listener const and the listener list mutableMaxime Coste
2012-11-05Rework Window creation, avoid using the same window in multiple clientsMaxime Coste
2012-10-31Fix buffer iterator_at_line_{begin,end}(LineCount)Maxime Coste
2012-10-11Makefile: add -Wall to CXXFLAGSMaxime Coste
2012-10-11use ByteCount instead of CharCount when we are really counting bytesMaxime Coste
(that is most of the time when we are not concerned with displaying)
2012-10-08Buffer: add some utf8 sanity checksMaxime Coste
2012-10-02move clamp to utils.hhMaxime Coste
2012-09-11Buffer: reset undo data after executing hooks in constructorMaxime Coste
2012-09-10Buffer: Allow inserting at the end when the inserted text ends with an end ↵Maxime Coste
of line Adapted other code in consequence and added unit tests so that this behavior is maintained.
2012-08-23use a strongly typed int CharCount for character countsMaxime Coste
2012-08-22use a strongly typed int LineCount for line countsMaxime Coste
2012-08-21Add Buffer::iterator_at_line{begin,end}(size_t line) overloadsMaxime Coste
2012-08-15Buffer::{iterator_at,clamp} takes an optional avoid_eol parameterMaxime Coste
when avoid_eol is true, clamping does avoid end-of-line if possible
2012-08-15misc cleanupsMaxime Coste
2012-08-15Buffer: add a timestampMaxime Coste
2012-08-14Buffer: stronger invariant, a buffer is never empty and all lines finish by '\n'Maxime Coste
2012-08-10Buffer: move back Modification as an implementation detailMaxime Coste
* Filters now only works on insertion and take directly the iterator and content * use Buffer::insert and Buffer::erase to modify a buffer
2012-08-10Buffer: fix corner case in insertMaxime Coste
2012-08-10Buffer: add reset_undo_data methodMaxime Coste
2012-08-08Refactor BufferManagerMaxime Coste
2012-08-05Context: only buffer context are not allowed, an editor is always neededMaxime Coste
2012-08-02Buffer: fix insert at end of bufferMaxime Coste
2012-07-18Fix end_it computation in Buffer::insert, avoid clamping in iterator_atMaxime Coste
2012-07-16Go back to a generic BufferChangeListener interface for selection updateMaxime Coste
2012-06-29Buffer: pass by value instead of by reference when object will be copied anywayMaxime Coste
Let copy elision and move semantics kick in
2012-06-28Fix BufferIterator::on_erase and tweak BufferMaxime Coste
2012-06-25code cleanups in bufferMaxime Coste
2012-06-14execute BufClose hook in Buffer destructorMaxime Coste
2012-06-05fix some warnings detected with clangMaxime Coste
2012-06-12BufCreate hook is always called for every buffer, BufNew is called when ↵Maxime Coste
creating a new file
2012-06-07HookManager are now hierarchical from window to buffer to globalMaxime Coste
window hooks also executes buffer hook which also execute global hooks
2012-06-04check if no modification were made in Buffer::end_undo_groupMaxime Coste
2012-04-14replace std::string references with StringMaxime Coste
2012-04-04remove ModificationListener and use a list of iterators to update insteadMaxime Coste
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-04fix some corner cases in Buffer modificationMaxime Coste
2012-04-03add an OptionManager class and use it to manage tabstopsMaxime Coste
OptionManager map names to options, and may delegate option resolution to it's parent if it does not contains the asked for option. That way Buffers can override global options, and Windows can override Buffer options.
2012-04-03rename HooksManager to HookManagerMaxime Coste
2012-03-30add a Line::length methodMaxime Coste
2012-03-30Store buffer content in a list of linesMaxime Coste
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-26BufferManager no longer owns buffers, only register themMaxime Coste
2012-03-19get rid of Buffer::atMaxime Coste