summaryrefslogtreecommitdiff
path: root/src/buffer.cc
AgeCommit message (Collapse)Author
2017-08-01Slight formatting tweakMaxime Coste
2017-06-28Consider non-files buffers as never modifiedMaxime Coste
2017-06-26Fix replacing last eol with a single eolMaxime Coste
2017-06-15Move tolerance for one past end of line coordinates to highlighter codeMaxime Coste
The rest of Kakoune's code now requires coord passed to Buffer::iterator_at to be valid.
2017-06-15Go back to window lines ending at one past the end of the buffer lineMaxime Coste
Change Buffer::iterator_at so that this case is tolerated, and fixes the coord to next line start instead of clamping to last line char.
2017-06-12Simplify a bit buffer iteration functionsMaxime Coste
Dont try to ensure the returned value is valid, incrementing past the end/decrementing before begin is the caller's error.
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-07Run BufCreate hook *before* Buf{Open,New}FileMaxime Coste
2017-06-07Small style tweakMaxime Coste
2017-05-26Remove unneeded explicit conversionMaxime Coste
2017-05-22Do not avoid eol in insert mode vertical movementMaxime Coste
2017-05-21Fix vertical movement with tabstopsMaxime Coste
Fixes #1388
2017-05-07Respect tabstop in Buffer::offset_coordMaxime Coste
2017-04-20Fix generation of empty erase changesMaxime Coste
Fixes #1308
2017-03-22Try to fix clang 3.5 compilationMaxime Coste
2017-03-16Fixes some clang-tidy warning and add a few missing meta.hh includeMaxime Coste
2017-03-15Small code tweaks regarding flags handlingMaxime Coste
2017-02-19Rename BufNew and BufOpen hooks to BufNewFile and BufOpenFileMaxime Coste
Fixes #1225
2017-02-07Fix Buffer::offset_coord that was dropping the target coordinateMaxime Coste
2017-01-31Formatting fixMaxime Coste
2017-01-30Make SharedString::create take a list of StringViewsMaxime Coste
2017-01-28Remove hash from StringDataMaxime Coste
Maintaining the hash value of strings is not worth it as we only use it for buffer reload, but pay for it on any buffer modifications.
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