summaryrefslogtreecommitdiff
path: root/src/buffer_utils.cc
AgeCommit message (Collapse)Author
2018-11-14Change BufReadFifo hook param to contain the inserted rangeMaxime Coste
the buffer name was not a very interesting information, whereas the buffer range allows a hook to run only on the appended text instead of all the buffer.
2018-10-23Refactor Hook management to have a well defined list of hooksMaxime Coste
Hooks are now an enum class instead of passing strings around.
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.
2018-02-05Remove the `New` flag from a buffer after reloading itMaxime Coste
If we reload a buffer, it means its underlying file exists, hence the New flag does not make sense anymore. It could be that the file appeared on the filesystem in the meantime.
2017-08-29Do less implicit parse_filename callsMaxime Coste
2017-03-08Add a -debug flag to :edit to set the buffer as debug dataMaxime Coste
As for the *debug* buffer, buffers with the debug flag wont get used for cycling through buffer, or word completion.
2017-01-25Fix fifo reading not handling potential errors from the read callMaxime Coste
Fixes #1153
2016-12-03Change ValueId to just be an enum class, it does not need any operatorsMaxime Coste
2016-12-01Make FDWatcher support Read, Write and Except events, instead of just ReadMaxime Coste
2016-11-28Cleanup include dependencies a bitMaxime Coste
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-23Re-enable undo support on fifo buffers when the fifo closesMaxime Coste
Fixes #881
2016-10-01Rename get_width to codepoint_widthMaxime Coste
2016-10-01Fix get_column function and add some unit tests for fullwidth textMaxime Coste
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-08-30Add a fd_readable(int fd) helper functionMaxime Coste
Use it instead of direct calls to select scatered around the code base.
2016-05-14BufferManager now owns the Buffers instead of registering themMaxime Coste
2016-03-16Use ByteCoords directly for buffer insert/erase/replaceMaxime Coste
2016-03-12Do not include the debug buffer in word completionMaxime Coste
2015-11-27Consolidate writing to fdMaxime Coste
2015-11-19Keep an empty last line in debug buffer to provide auto scrollingMaxime Coste
2015-10-18Fix OSX compilationMaxime Coste
2015-10-17More cleanups in the buffer open/reload codeMaxime Coste
2015-10-17Move line parsing and to Buffer.cc directlyMaxime Coste
2015-10-17Refactor buffer creation and reloading to be more explicitMaxime Coste
Reloading used to be implicit in the buffer creation function, which is not always nice, as code that explicitely wanted to reload a buffer could not say so.
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-08-04Support flags getting modified by hooks at buffer creationMaxime Coste
Fixes #361
2015-06-28Run BufReadFifo hook after reading from fifoMaxime Coste
2015-06-06Move write_debug to buffer utils as write_to_debug_bufferMaxime Coste
2015-06-03Fix memory leak in fifo buffer handlingMaxime Coste
2015-05-05Fix bug in fifo creation where BufOpenFifo hook was using a dead stringMaxime Coste
2015-04-27Replace some String temporaries with StringViewsMaxime Coste
2015-04-19Run BufOpenFifo hook when opening a fifo in a (new or already existing) bufferMaxime Coste
2015-03-10Refactor String, use a common StringOps interface, hide std::stringMaxime Coste
2015-03-01rename StringStorage to StringDataMaxime Coste
2015-02-25Respect columns when copying selection, not just bytesMaxime Coste
2015-01-22Avoid temporary strings on buffer load/reloadMaxime Coste
Pass directly a Vector<ref_ptr<StringStorage>> to the buffer
2015-01-12replace all std::vector with VectorMaxime Coste
2014-12-03Use a select based event handling and fix deadlockMaxime Coste
2014-11-25Separate events between normal and urgent onesMaxime Coste
Run urgent ones while executing %sh blocks. Fixes #236
2014-11-04Reuse existing buffer when creating a fifo oneMaxime Coste
That way, client having this buffer already visible wont switch to another one due to previous buffer getting deleted
2014-10-20Port more code to StringView instead of const String&Maxime Coste
2014-10-13Refactor regex uses, do not reference boost except in regex.hhMaxime Coste
2014-10-03Use InternedStrings for buffer contentsMaxime Coste
2014-08-26Limit the iteration count when reading from a fifoMaxime Coste
2014-08-15Add support for reading from stdin/writing to stdout in filter modeMaxime Coste
Note that kakoune still needs to read the whole buffer first, only once stdin is closed can it execute the keys.
2014-07-07Do not write '*** kak: fifo closed ***' in buffersMaxime Coste
The status line '[fifo]' flag should replace that
2014-07-05utf8: use end of sequence iterators for more securityMaxime Coste
2014-06-30Fix spurious eol appearing in non scrolling fifo buffersMaxime Coste
2014-06-16Add BufCloseFifo hook and use that to remove fifo directoriesMaxime Coste