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
8c862c4eea
Only write to remote socket when we know they are writable
...
Buffer data (in an horribly innefficient way for now), and use the
event manager to watch for the socket being ready for a write.
Fixes #945
2016-12-01 20:11:09 +00:00
Maxime Coste
95c1528342
Fix crash when a client sends a packet advertising a wrong size
...
If the given size is less than the header size, the message is
clearly invalid, disconnect the client in that case.
2016-12-01 19:45:23 +00:00
Maxime Coste
7defdd3039
Make FDWatcher support Read, Write and Except events, instead of just Read
2016-12-01 19:44:07 +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
2fd1414b05
Clean up includes of user_interface.hh
2016-11-29 19:53:11 +00:00
Maxime Coste
0dff8a7d3f
Small remote code cleanup
2016-11-29 19:52:57 +00:00
Maxime Coste
f904402486
Handle all available keys when a RemoteClient input is available
...
We were just treating the next key. Which led to <esc> byte
remaining after suspend, that led that <esc> being interpretted
as <alt> when the following key got available.
Fixes #739
2016-10-06 23:47:44 +01:00
Maxime Coste
35559b65dd
Support codepoints of variable width
...
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-10-01 13:45:00 +01:00
Maxime Coste
21a76d135c
Fix handling of remote errors in the accepter
2016-09-05 13:47:56 +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
563497ade7
Use proper buffering when reading remote messages
...
Messages now have their size in a header, along with their type
and are only executed once fully received. We dont block anymore
while trying to read a full message.
2016-09-04 11:17:35 +01:00
Maxime Coste
044a6ce860
Rework binary network protocol to be more message based
...
We cannot just write to Kakoune socket from any application anymore,
use of kak -p is mandatory, as we now have an introduction to write.
2016-09-04 11:17:34 +01:00
Maxime Coste
8b02bb749d
Add a fd_readable(int fd) helper function
...
Use it instead of direct calls to select scatered around the code
base.
2016-08-30 22:56:47 +01:00
Maxime Coste
bedf2f703c
Small code cleanups
2016-08-09 21:45:06 +01:00
Maxime Coste
2425f4a781
Tweak session renaming code
2016-07-28 00:16:41 +01:00
Enrico Lumetti
1a7cd707aa
Add 'session' command to change remote session name
2016-07-24 22:46:33 +02:00
Maxime Coste
c73e64882c
Check session valididty on kak -l and support kak -clear for clearing the dead ones
...
Fixes #689
2016-06-06 19:28:56 +01:00
Maxime Coste
815924e4da
Merge remote-tracking branch 'lenormf/buffer-padding'
2016-04-11 13:44:10 +01:00
Maxime Coste
f1fb2114da
Handle <c-l> redrawing on the server side
...
That way we can force a redraw at any moment, including during
batch execution.
2016-03-07 21:44:50 +00:00
Frank LENORMAND
f408cf7ed3
Allow users to chose how the buffers are padded
2016-02-17 15:48:09 +02:00
Maxime Coste
8d37a716fb
Use a custom SSO aware string backend
2016-02-10 09:44:42 +00:00
Maxime Coste
99b4dc9929
Support connecting to other users sessions by using <user>/<session>
2016-01-20 22:58:39 +00:00
Frank LENORMAND
df31b88187
Fix "unused result" warnings for several system calls.
2015-12-10 11:00:10 +03:00
Maxime Coste
6925ff33b1
Send client dimensions on connection, avoid a race condition.
...
Fixes #429
2015-11-18 13:43:43 +00:00
Maxime Coste
bd01171861
Auto fork server when suspending the local client
...
That way, other clients can still be serviced by the server.
2015-10-08 20:05:47 +01:00
Maxime Coste
7776c38755
Detect ungraceful exits, and backup modified buffers in these cases
2015-10-08 13:43:39 +01:00
Maxime Coste
c54e6738b9
Use DisplayLine for menu choices
2015-10-05 01:25:23 +01:00
Maxime Coste
d2c4d22d1f
Keep it simple, remove all that sorted id map thing
2015-09-18 13:52:32 +01:00
Maxime Coste
bab95491c8
Keep sorted state when transmitting id maps
2015-09-16 22:29:19 +01:00
Maxime Coste
693d9a4861
Store key hash in IdMap
2015-09-16 20:02:12 +01:00
Maxime Coste
73c0fa175e
Use IdMap instead of UnorderedMap for ui options and env vars
2015-09-16 19:04:19 +01:00
Maxime Coste
85918d9f15
use getpwuid(geteuid())->pw_name rather than getlogin()
...
getlogin() can fail when stdin is not a tty on certain configuration
as it needs to find a controling terminal.
2015-09-15 13:32:26 +01:00
Maxime Coste
ededc84c8c
Remove some useless code in remote.cc
2015-09-03 23:17:57 +01:00
Maxime Coste
0755366cb1
Rework resize handling
...
Fixes #383
2015-08-23 15:18:18 +01:00
Maxime Coste
71e362e2f9
Move session socket to /tmp/kakoune/<user name>/<session>
2015-08-23 14:13:46 +01:00
Maxime Coste
504862fce7
Avoid double session closing
2015-08-22 11:27:48 +01:00
Maxime Coste
47ab4038ec
Format session socket name in place into the sockaddr_un
2015-08-22 11:27:04 +01:00
Maxime Coste
bf46870ff2
Move status/mode line drawing as a separate ui method
2015-06-17 21:28:02 +01:00
Maxime Coste
e6f0e8ef75
Move write_debug to buffer utils as write_to_debug_buffer
2015-06-06 11:54:48 +01:00
Maxime Coste
7cddaacc5d
Fix support for default face on remote clients
2015-06-04 18:51:00 +01:00
Maxime Coste
8f6fc6a0f3
Port even more code to use format function
2015-06-01 21:15:59 +01:00
Maxime Coste
f19bb4fe6d
Port more code to use the format function instead of adhoc string concat
2015-06-01 19:06:35 +01:00
Maxime Coste
bbefde9379
Move Colors enum class as NamedColor enum inside Color struct
2015-04-25 10:47:39 +01:00
Maxime Coste
ddd70fd09a
Make empty context construction more explicit
2015-04-19 18:47:52 +01:00
Maxime Coste
1cec8df45e
ArrayView content is not const anymore
...
As in upcoming std c++ array_view, ArrayView<T> points to mutable
data, use ArrayView<const T> or alias ConstArrayView<T> for const
data.
2015-03-09 13:54:09 +00:00
Maxime Coste
2a878d51fd
Even more memory tracking
2015-01-14 19:16:32 +00:00
Maxime Coste
da562e03a0
replace all std::vector with Vector
2015-01-12 13:58:41 +00:00
Maxime Coste
295a97f2a6
Rename memoryview to ArrayView
2015-01-06 13:43:37 +00:00
Maxime Coste
ebecd60eb8
Rework hashing, use a more extensible framework similar to n3876 proposal
...
std::hash specialization is a pain to work with, stop using that, and
just specialize a 'size_t hash_value(const T&)' free function.
2014-12-16 18:57:19 +00:00