Commit Graph

106 Commits

Author SHA1 Message Date
Maxime Coste
ab6a999431 Rename containers.hh to ranges.hh (and Container to Range) 2017-08-29 15:23:03 +07:00
Maxime Coste
1709886873 avoid literal eol in status lines, replace them with another symbol 2017-08-29 10:01:43 +07:00
Maxime Coste
e80b36b495 Expose client pid as $kak_client_pid
As requested in #1414
2017-08-28 13:12:45 +07:00
Maxime Coste
f7bed9eb18 Support specifying an exit status on quit commands
The current client exit status can be specified as an optional
parameter, is nothing is given the exit status will be 0.

Fixes #1230
2017-08-23 13:33:13 +07:00
Maxime Coste
7a79cbbc81 Migrate code to c++14 2017-07-19 08:47:14 +02:00
Maxime Coste
f57e72ab4a Small code tweak 2017-05-27 06:17:44 +01:00
Maxime Coste
0cb192921a Remove unused WindowAndSelections timestamp field
The SelectionList already has a timestamp.
2017-01-29 12:50:16 +00:00
Maxime Coste
e8ee8c23d8 Support the +line syntax for clients as well.
Fix a crash on daemon quit as well.
2017-01-21 12:17:49 +00:00
Maxime Coste
6f4515f005 Only touch new clients selections when target coord are explicit
Do not implicitely change new clients selections to target coordinates
when the user did not specify them, so that we can re-use the selections
from the found free window, which is the generally desired behaviour.
2017-01-19 18:44:26 +00:00
Maxime Coste
089ee8ac0a Fix crash when quitting the first client while another client is connected 2016-12-01 20:55:28 +00:00
Maxime Coste
a65e8142f3 Rework handling of initial coordinates so that init commands can change them
Fixes #944
2016-12-01 20:55:20 +00:00
Maxime Coste
540e504e68 Ensure all available input is handled before going back to main loop
We were not handling keys that could have been generated while handling
other keys (like during a shell evaluation).
2016-11-30 09:47:38 +00:00
Maxime Coste
3a81260917 Simplify greatly UI input handling
This round trip through an input callback expected to call
is_key_available and get_key was overcomplicated, just send the
keys as they arrive, the client is already buffering due to urgent
event mode.
2016-11-29 21:59:36 +00:00
Maxime Coste
8e5f491d3f Support deleting a buffer even if another client is in insert mode on it 2016-11-05 11:29:47 +00:00
Maxime Coste
cc2affea11 Always allow to delete a buffer, just recreate a scratch buffer if needed
Fixes #850
2016-10-13 21:37:44 +01:00
Maxime Coste
5440d31f99 Only create a default *scratch* when we dont have any non debug buffers
Fixes #852
Closes #856
2016-10-11 00:45:05 +01:00
Maxime Coste
4fc20b8d7d Rework client quitting and handling of remote errors
Client quitting no longer immediately unwinds, client is just pushed
for deletion until we get back to the main loop, similarly to what
happens for buffer and window deletion.
2016-09-04 17:56:07 +01:00
Maxime Coste
ba421e45f7 Delay window deletion until we get back to main loop
Avoid WinResize hooks while redrawing, ensure window resize only
take place while handling user input.

Fixes #672
2016-05-14 08:17:52 +01:00
Maxime Coste
9e15181dc9 Rework container helpers, use pipe syntax and cleanup implementation
use 'container | filter(func) | reverse() | transform(func)' instead
of 'transform(reverse(filter(container), func), func)' to express
container transformations.
2016-03-08 21:35:56 +00:00
Maxime Coste
b5b5b82c70 destroy buffer manager first but clear clients before destroying buffers.
Fixes #612
2016-03-03 14:05:07 +00:00
Maxime Coste
3987463e75 Remove direct access to ui, go through client
Client can now update menu/info positions when the window move
around.
2016-02-27 17:23:13 +00:00
Maxime Coste
dfe3098b18 Fix buffer deletion logic
'eval -buffer * db' was failing in certain cases
2016-02-11 23:07:42 +00:00
Maxime Coste
8701a53252 Fix use of dead temporary strings in completions 2016-02-10 13:33:49 +00:00
Maxime Coste
87769c9b03 Migrate most completion to ranked match 2016-02-09 22:50:10 +00:00
Maxime Coste
411e5a9486 Extract jump list handling in a JumpList struct 2015-12-23 01:56:54 +00:00
Maxime Coste
d2b0dba39d Support quitting while executing RuntimeError hooks
Fixes #529
2015-12-14 19:06:30 +00:00
Maxime Coste
9134066e85 Try to switch to last buffer when removing the current one 2015-11-10 13:52:48 +00:00
Maxime Coste
6840f7ce9c Store the last used buffer in clients
Fixes #474
2015-11-07 18:25:49 +00:00
Maxime Coste
7776c38755 Detect ungraceful exits, and backup modified buffers in these cases 2015-10-08 13:43:39 +01:00
Maxime Coste
04536657d1 Add a kill command that kills the current session
Fixes #331
A given session can be killed with 'echo kill | kak -p <session>'
2015-08-26 19:34:19 +01:00
Maxime Coste
0c41c14187 Reorganize slightly local client creation 2015-08-26 19:33:52 +01:00
Maxime Coste
3834440298 Rework window redraw handling, should redraw window less often 2015-06-21 19:56:23 +01:00
Maxime Coste
f0886ad323 Get rid of the mode trash, delete mode directly when leaving on_key 2015-06-03 20:03:06 +01:00
Maxime Coste
8f6fc6a0f3 Port even more code to use format function 2015-06-01 21:15:59 +01:00
Maxime Coste
993e842fdf Retreat ! go back to C++11 only code
This reverts commit b42de85031.
2015-05-26 18:42:09 +01:00
Maxime Coste
b42de85031 Migrate code to c++14 2015-05-25 13:51:17 +01:00
Maxime Coste
519254dfdc More useage of the format function 2015-03-30 23:56:33 +01:00
Maxime Coste
9657ef88b7 Small refactoring in client_manager.cc 2015-03-14 11:27:01 +00:00
Maxime Coste
2747c4dd3e exception::what returns a StringView rather than a const char* 2015-03-13 13:15:51 +00:00
Maxime Coste
0a6901899d Use RefPtr as SafePtr backend 2015-02-23 20:39:56 +00:00
Maxime Coste
b697bf1795 Release display buffers when a window is added to free list 2015-01-26 19:41:10 +00:00
Maxime Coste
ca9baecd4c Another stule tweak 2015-01-04 22:34:36 +00:00
Maxime Coste
b6ff15aa75 Unify completion from container content logic 2014-12-23 13:54:09 +00:00
Maxime Coste
87d312b6d4 More string cleanups 2014-12-08 13:59:29 +00:00
Maxime Coste
a3b3001d8f Rework client pending key handling, fix insert/normal timers 2014-11-29 20:14:52 +00:00
Maxime Coste
49931fbf05 Separate events between normal and urgent ones
Run urgent ones while executing %sh blocks.

Fixes #236
2014-11-25 13:52:06 +00:00
Maxime Coste
fc4142178f Port more code to StringView instead of const String& 2014-10-20 19:18:38 +01:00
Maxime Coste
2e2812b10f Do not escape completions in completer functions let the client decide
Fixes #231
2014-08-18 23:31:02 +01:00
Maxime Coste
2204b7cf06 Defer deletion of buffers to after the event loop
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-12 19:24:09 +01:00
Maxime Coste
a32b49acd1 Rename ColorPair to Face and ColorRegistry to FaceRegistry
Face also stores the attributes
2014-07-11 00:27:43 +01:00