summaryrefslogtreecommitdiff
path: root/src/buffer.cc
AgeCommit message (Collapse)Author
2017-01-01When inserting at the end, store the next line as end pos in the changeMaxime 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-09-21Tweak Buffer::offset_coord implementationMaxime Coste
2016-08-14Fix comment missing a closing parenthesisMaxime Coste
2016-07-26Use explicit initialization of the `timespec` object to fix compilation on ↵Frank LENORMAND
older compilers
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-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-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-06-28Change end of line format detection logic to match vimsMaxime Coste
Only consider a buffer to be Crlf if *all* of its lines use it, else consider it as Lf with embedded Cr chars. Fixes #686
2016-05-17Use variadic macros for kak_assert to remove the need for COMMAMaxime Coste
2016-05-14BufferManager now owns the Buffers instead of registering themMaxime Coste
2016-03-17Fix another bug in Buffer::replace implementationMaxime Coste
2016-03-17Fix bug introduced in Buffer::do_insertMaxime Coste
2016-03-16Use ByteCoords directly for buffer insert/erase/replaceMaxime Coste
2016-03-16Use replace in Buffer unit testMaxime 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-16More cleanups in Buffer::do_insertMaxime Coste
2016-03-15Refactor Buffer::do_insertMaxime Coste
2016-03-15Slight cleanup in Buffer::do_insertMaxime Coste
2016-03-08Rework container helpers, use pipe syntax and cleanup implementationMaxime Coste
use 'container | filter(func) | reverse() | transform(func)' instead of 'transform(reverse(filter(container), func), func)' to express container transformations.
2016-02-05dont intern SharedStrings but StringDataPtrMaxime 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-10Remove useless checks, buffer has always at list one lineMaxime Coste
2015-10-17Move line parsing and to Buffer.cc directlyMaxime Coste
2015-09-27Store timespec for buffer fs timestamps, not just time_tMaxime Coste
time_t has a resolution of one second, which cause troubles when a file changes multiple time during that same second.
2015-09-01Cache buffer display nameMaxime Coste
2015-08-04Support flags getting modified by hooks at buffer creationMaxime Coste
Fixes #361
2015-05-26Workaround incomplete c++11 stdlib in gcc 4.8Maxime Coste
2015-05-22Move unit test functions in next to the code they are testingMaxime Coste
2015-05-14Keep hash stored in StringDataMaxime Coste
2015-05-14Do not use diff when reloading a no undo bufferMaxime Coste
2015-05-13Use diff when reloading bufferMaxime Coste
2015-03-31Use format for {Win,Buf}SetOption hooks descriptionMaxime Coste
2015-03-30Replace various adhoc operator+ based formatting with format funcMaxime Coste
2015-03-11Fix unneeded string copyMaxime Coste
2015-03-05Use a IdMap for storing hooksMaxime Coste
The number of hook names is small (<20), using an UnorderedMap is overkill, and prevents using StringView for key searching.
2015-03-01rename StringStorage to StringDataMaxime Coste
2015-02-16Wrap debug loop in ifdef KAK_DEBUGMaxime Coste
2015-02-06Fix compile warnings on OSX that could actually be errorsJimmy Thrasher
c++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MD -MP -MF .buffer.d -c -o .buffer.o buffer.cc buffer.cc:35:20: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] kak_assert(not line->length == 0 and line->data()[line->length-1] == '\n'); ^ ~~ ./assert.hh:17:18: note: expanded from macro 'kak_assert' if (not (condition)) \ ^ buffer.cc:35:20: note: add parentheses after the '!' to evaluate the comparison first ./assert.hh:17:18: note: expanded from macro 'kak_assert' if (not (condition)) \ ^ buffer.cc:35:20: note: add parentheses around left hand side expression to silence this warning ./assert.hh:17:18: note: expanded from macro 'kak_assert' if (not (condition)) \ ^ buffer.cc:177:20: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] kak_assert(not line->length == 0 and line->data()[line->length-1] == '\n'); ^ ~~ ./assert.hh:17:18: note: expanded from macro 'kak_assert' if (not (condition)) \ ^ buffer.cc:177:20: note: add parentheses after the '!' to evaluate the comparison first ./assert.hh:17:18: note: expanded from macro 'kak_assert' if (not (condition)) \ ^ buffer.cc:177:20: note: add parentheses around left hand side expression to silence this warning ./assert.hh:17:18: note: expanded from macro 'kak_assert' if (not (condition)) \ ^ 2 warnings generated.
2015-02-04Fix incorrect Buffer::Change generated in Buffer::reloadMaxime Coste
2015-02-02Fix buffer reloadingMaxime Coste
2015-01-29Tweak Buffer::Change layoutMaxime Coste