summaryrefslogtreecommitdiff
path: root/src/buffer_manager.cc
AgeCommit message (Collapse)Author
2018-05-21Do not reuse m_buffer_trash to store dying buffers in ~BufferManagerMaxime Coste
Doing that clears m_buffer_trash, deleting buffers contained there, but we are not ready to have Buffer destructors running yet as we did not clear the ClientManager, meaning we might have free windows pointing to buffers in the buffer trash.
2018-04-06Make error messages more consistentDelapouite
2018-04-05Add new buffers at the back of the buffer listMaxime Coste
This will be reverted if we discover why we were doing things the over way around. Fixes #1881
2018-03-25Remove contains_that and use any_of to be closer to the c++ stdlibMaxime Coste
2018-02-18BufferManager: Support missing ClientManagerMaxime Coste
2017-08-29Rename containers.hh to ranges.hh (and Container to Range)Maxime Coste
2016-11-29Small cleanup in BufferManager codeMaxime Coste
2016-10-13Always allow to delete a buffer, just recreate a scratch buffer if neededMaxime Coste
Fixes #850
2016-10-11Only create a default *scratch* when we dont have any non debug buffersMaxime Coste
Fixes #852 Closes #856
2016-10-10Convert some uses of lambda to more concise std::mem_fnMaxime Coste
2016-07-24Merge remote-tracking branch 'lenormf/readonly-mode'Maxime Coste
2016-07-24Replace C-style operators with their alphabetical equivalentFrank LENORMAND
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-07-04Avoid possible access to an invalid, being deleted buffer list.Maxime Coste
2016-05-15Fix duplicate buffer problem, fix real_path beahviourMaxime Coste
2016-05-14BufferManager now owns the Buffers instead of registering themMaxime Coste
2016-05-14Delay window deletion until we get back to main loopMaxime Coste
Avoid WinResize hooks while redrawing, ensure window resize only take place while handling user input. Fixes #672
2016-03-03destroy buffer manager first but clear clients before destroying buffers.Maxime Coste
Fixes #612
2016-03-02BufferManager should outlive ClientManager in the endMaxime Coste
If not, clients end up keeping references on a buffer while it it being deleted.
2016-03-02Ensure ClientManager is always outliving the BufferManagerMaxime Coste
2015-11-07Store the last used buffer in clientsMaxime Coste
Fixes #474
2015-09-08Tweak BufferManager::delete_buffer implementationMaxime Coste
2015-08-06ensure a buffer is not referenced a second time, just before actually ↵Maxime Coste
deleting it It can happen in certain case that a buffer gets referenced after it gets moved to the trash, for example when it gets deleted during its construction (due to BufCreate hook for example).
2015-07-08Gracefully handle exception when opening files given on command lineMaxime Coste
Fixes #310
2015-06-01Port more code to use the format function instead of adhoc string concatMaxime Coste
2015-04-23Fix :open bug that could set a deleted buffer as the last used oneMaxime Coste
2015-03-12Avoid calling real_path when not needed in BufferManager::get_buffer_ifpMaxime Coste
2015-02-23Use RefPtr as SafePtr backendMaxime Coste
2015-01-26Try to improve ga behaviourMaxime Coste
2014-12-23Extract complete_buffer_name as a free function in commands.ccMaxime Coste
2014-12-23Unify completion from container content logicMaxime Coste
2014-10-13Do not assert on SIGTERM and backup modified buffers on signal induced ↵Maxime Coste
termination
2014-08-18Do not escape completions in completer functions let the client decideMaxime Coste
Fixes #231
2014-08-12Defer deletion of buffers to after the event loopMaxime Coste
We can have SelectionList in flights on the buffer, so mark it for deletion by moving it in a buffer trash, and effectively delete it later, at a point where there should not be any further access to it.
2014-08-03Fix buffer name completion when basename onlyMaxime Coste
2014-07-31Buffer completion match directory names as well for subsequence matchMaxime Coste
2014-04-19Use StringView in BufferManagerMaxime Coste
2014-04-18Use StringView for completion functionsMaxime Coste
2014-04-07rename BufferManager::complete_buffername to complete_buffer_nameMaxime Coste
2013-11-10Fix warningsMaxime Coste
2013-09-25Do not take directories into account when completing buffer nameMaxime Coste
(except if a / is found in the completion prefix)
2013-09-24use subsequence instead of regex matching for buffer completionMaxime Coste
2013-09-23Add prefix_match function and use it instead of adhoc codeMaxime Coste
2013-04-10Use the buffer manager to delete buffer, throw when a client is insertingMaxime Coste
2013-04-09sort includes directivesMaxime Coste
2013-04-09rename assert to kak_assert to avoid collisionsMaxime Coste
2013-03-25move absolute path logic to Buffer classMaxime Coste
2013-03-22BufferManager notify the ClientManager when a buffer diesMaxime Coste
2013-03-21BufferManager: replace Buffer* get_buffer with Buffer& get_bufferMaxime Coste