summaryrefslogtreecommitdiff
path: root/src/buffer.hh
AgeCommit message (Collapse)Author
2018-05-09Mark Client, Window, Buffer and OptionManager as finalMaxime Coste
Avoids warning about non virtual destructor calls on them, as they have a vtable due to OptionManagerWatcher.
2018-05-02Refactor buffer undo treeMaxime Coste
Store the undo tree as an array of undo nodes, instead of as a pointer based tree.
2018-03-13Do not jump to buffer start on `g.` with no previous modificationsMaxime Coste
2018-02-11Refuse modification of ReadOnly buffers and make Debug buffer readonlyMaxime Coste
The debug buffer is a bit special as lots of events might mutate it, permitting it to be modified leads to some buggy behaviour: For example, `pipe` uses a ForwardChangeTracker to track buffer changes, but when applied on a debug buffer with the profile flag on, each shell execution will trigger an additional modification of the buffer while applying the changes, leading to an assertion failing as changes might not be happening in a forward way anymore. Trying to modify a debug buffer will now raise an error immediatly.
2017-11-12Move Array and ConstexprVector to a constexpr_utils.hh headerMaxime Coste
2017-09-20Add max_history_id in status printed with <a-u> and <a-U>Delapouite
2017-08-18Respecify EnumDescs array sizes manually to workaround clang-3.6 bugMaxime Coste
2017-08-12Remove size redundancy in enum_desc function declarationMaxime Coste
The need to have the array size in the return type was redundant with the actual list of elements.
2017-08-04Purge history on buffer reload when NoUndo flag is onMaxime Coste
We were preserving the history in that case, so on fifo buffers (that set the NoUndo flag until the fifo is closed), we still had the history from the "previous life" of the buffer, leading crashes when trying to apply it. Fixes #1518
2017-07-07Formatting fixesMaxime Coste
2017-06-11Fix the Buffer::end() madnessMaxime Coste
Until now, buffer had multiple recognized end coordinates, either { line_count, 0 } or { line_count - 1, line[line_count - 1].length }. Now the only correct end coord is { line_count, 0 }, removing the need for various special cases.
2017-06-07noexept-ify BufferIterator methodsMaxime Coste
2017-06-07Use String default ctor instead of empty stringMaxime Coste
2017-05-22Do not avoid eol in insert mode vertical movementMaxime Coste
2017-05-22Remove virtual destructor from OptionManagerWatcherMaxime Coste
We should never destruct anything through an OptionManagerWatcher pointer, so having all those destructor virtual makes no sense.
2017-05-07Respect tabstop in Buffer::offset_coordMaxime Coste
2017-03-16Try to clean up option include a bitMaxime Coste
2017-03-15Small code tweaks regarding flags handlingMaxime Coste
2017-03-15Migrate WithBitOps template specialization to with_bit_ops functionMaxime Coste
This way we dont depend on knowing the base template to enable bit ops on an enum type.
2017-03-15Migrate to a more value based meta programming modelMaxime Coste
Introduce Meta::Type<T> to store a type as value, and pass it around, migrate enum_desc and option_type_name to this.
2017-02-20Fix performance of word completion with many different selectionsMaxime Coste
Fixes #1228
2017-02-06Small layout tweak for Buffer::HistoryNodeMaxime Coste
2017-01-28Make BufferIterator only a bidirectional iteratorMaxime Coste
Distance computation is too expensive on BufferIterators to treat them as random access.
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-11-24Forward client name to contexts created for write-allMaxime Coste
Fixes #937
2016-11-14Propagate the hooks disabled state through prompt, menu, and command executionMaxime Coste
Maintain it as well during buffer creation even if the hooks are not executed in client context. Fixes #818
2016-10-01Support codepoints of variable widthMaxime Coste
Add a ColumnCount type and use it in place of CharCount whenever more appropriate, take column size of codepoints into account for vertical movements and docstring wrapping. Fixes #811
2016-07-27BufferIterator is random access, not just bidirectionalMaxime Coste
2016-07-27Revert "Try to disambiguate timespec as a struct"Maxime Coste
This reverts commit 17d2dc9477444786b3db8ea834a45abbcb88abfd.
2016-07-27Try to disambiguate timespec as a structMaxime Coste
2016-07-27Add missing <time.h> header so that timespec is well definedMaxime Coste
2016-07-24Support for going backward/forward in buffer history with <a-u>/<a-U>Maxime Coste
2016-07-24Support counts for undo/redoMaxime Coste
2016-07-24Support moving between arbitrary history nodesMaxime Coste
2016-07-24Store creation timepoint in HistoryNodeMaxime Coste
2016-07-24Set memory domains for Buffer::HistoryNodeMaxime Coste
2016-07-24Store buffer undo/redo information in a tree instead of a vectorMaxime Coste
2016-07-24Merge remote-tracking branch 'lenormf/readonly-mode'Maxime Coste
2016-07-23Implement a `readonly` modeFrank LENORMAND
This commit introduces the `readonly` variable as well as the `-ro` command line option which prevent buffers from being overwritten on disk when the `write` command is used without arguments. Some buffers can selectively be put in readonly mode by setting the `readonly` variable on the `buffer` scope, the `global` mode will affect all buffers (even those who will be open subsequently), using the `window` scope will have no effect. Closes #685
2016-07-15Make buffer iterator iteration/dereference fasterMaxime Coste
2016-07-10Ensure buffer create/close hooks are run at appropriate timesMaxime Coste
They used to be ran before the buffer was added to the buffer list we now run them afterwards.
2016-04-21Fix BufferIterator::difference_type, it should be signedMaxime Coste
2016-03-16Use ByteCoords directly for buffer insert/erase/replaceMaxime Coste
2016-03-16Avoid the spurious newline insertion when replacing at end of bufferMaxime Coste
Add a Buffer::replace method to handle the replacements properly Fixes #633
2016-03-12Do not include the debug buffer in word completionMaxime Coste
2016-01-27Make BufferIterator::operator* return a const ref to be more compatibleMaxime Coste
2015-12-06Change eolformat and BOM options to be enums instead of stringsMaxime Coste
2015-12-01Update buffer display names after changing working directoryMaxime Coste
Fixes #501
2015-11-12Faster BufferIterator::operator++/--Maxime Coste
2015-11-07Optimize BufferIterator to avoid a lot of pointer chasingMaxime Coste