Commit Graph

539 Commits

Author SHA1 Message Date
Maxime Coste
8badcdc0d5 Make DynamicRegister statically dispatch to its function 2016-03-31 09:17:02 +01:00
Maxime Coste
6739c5047e Support an optional column param with the +<line>[:<column>] syntax 2016-03-15 13:21:28 +00:00
Maxime Coste
b014093c97 Quit on SIGINT when using a DummyUI 2016-03-15 00:24:42 +00: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
4d4f18a78a Select ui at launch through the -ui <ui_name> switch 2016-03-07 21:44:50 +00: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
Maxime Coste
433940485f Initial, WIP json ui implementation
The JsonUI writes json rpc user interface commands on stdout and
reads json rpc requests on stdin.
2016-03-07 21:44:50 +00:00
Maxime Coste
52525a156f Remove complete_prefix option and behaviour
Now that we use subsequence based completion almost everywhere,
completing the common prefix does not make sense anymore.
2016-03-07 20:17:41 +00:00
Maxime Coste
134be9a1f6 Just write to stderr when exceptions are uncaught 2016-03-03 14:05:07 +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
67849f2db7 BufferManager should outlive ClientManager in the end
If not, clients end up keeping references on a buffer while
it it being deleted.
2016-03-02 20:27:47 +00:00
Maxime Coste
13d039c228 Ensure the BufferManager is destroyed first so that buffer hooks can access other managers
Fixes #612
2016-03-02 13:12:14 +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
0fc0702983 indentwidth can actually take 0 as a parameter 2016-02-12 13:53:54 +00:00
Maxime Coste
986c91a835 Support validating some options values before setting them
Fixes #583
2016-02-11 22:07:18 +00:00
Maxime Coste
032219b119 Rename set_signal_wrapper to set_signal_handler and tweak SignalHandler def 2016-01-10 20:46:15 +00:00
Maxime Coste
2f8612f8e7 Merge remote-tracking branch 'danlrobertson/safe_signal' 2016-01-10 03:00:25 +00:00
Maxime Coste
c39a4d5879 Add a static_words str-list option always considered for word completion
Fixes #313
2015-12-27 08:53:31 +00:00
Maxime Coste
978e8d18b9 Center the initial target line 2015-12-25 07:17:54 +00:00
Maxime Coste
a051250204 Do not try to access the local client if it was not succesfully created 2015-12-24 04:09:30 +00:00
Maxime Coste
4d230e4051 Support passing +<line number> parameter to specify the first buffer target line on open
Fixes #336
2015-12-23 22:56:33 +00:00
Daniel Robertson
f5f7bc80e8 Add a signal function using sigaction
Use a wrapper for sigaction in place of signal to ensure that the
SA_RESTART flag is set for all signals used.

Signed-off-by: Daniel Robertson <danlrobertson89@gmail.com>
2015-12-23 14:03:31 -05:00
Maxime Coste
bde0975d9b Filter mode require an event manager
Fixes #519
2015-12-08 00:12:56 +00:00
Maxime Coste
966ac90fe7 Change eolformat and BOM options to be enums instead of strings 2015-12-06 12:51:55 +00:00
Maxime Coste
eac6d63371 Small code refactor 2015-12-05 10:14:04 +00:00
Maxime Coste
84fc4bd6cb Support -e in filter mode to give commands to execute (executed before keys) 2015-12-03 13:48:30 +00:00
Maxime Coste
a81dbd90a1 Consolidate writing to fd 2015-11-27 13:50:40 +00:00
Maxime Coste
3644f2a056 Refactor registers to initialize all of them at startup and add null register
Fixes #497
2015-11-25 21:48:17 +00:00
Maxime Coste
36bf145b02 Support opening new files on kak -c command line
Fixes #485
2015-11-22 11:48:02 +00:00
Maxime Coste
5e4f5cd2a0 Move enum option handling in enum.hh and refactor enum options 2015-11-20 09:06:53 +00:00
Maxime Coste
c0f1b7b99f Introduce a debug flags option to control some tracing
Support shell|hooks and write traces in debug buffer
2015-11-19 21:58:26 +00:00
Maxime Coste
9656f088e7 Change autoinfo option to be a flags option, document flags options
Support the value1|value2|value3 syntax for flag options.
2015-11-18 23:47:28 +00:00
Maxime Coste
97cc166885 Try to restore the previously opened buffer when converting to client mode
Fixes #483
2015-11-16 13:52:33 +00:00
Maxime Coste
76fadd8108 More cleanups in the buffer open/reload code 2015-10-17 11:33:09 +01:00
Maxime Coste
fe704b9b84 Move line parsing and to Buffer.cc directly 2015-10-17 11:33:09 +01:00
Maxime Coste
3795ff735a Refactor buffer creation and reloading to be more explicit
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-10-17 11:33:09 +01:00
Maxime Coste
776059a4c3 Fix double destruction of local ui 2015-10-14 13:21:27 +01:00
Maxime Coste
a4447819e5 Fix OSX compilation 2015-10-09 13:41:28 +01:00
Maxime Coste
0d8b9c6677 Tweak handling of SIGINT 2015-10-08 20:23:32 +01: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
f7ba2a896c Tweak ui_options docstring 2015-10-02 13:56:19 +01:00
Eike Plack
faa3b3b173 Add self documentation to ui_options
* For now the non ui code will hold this information. Ideally the UI would
be able to describe its options in some way.
2015-10-02 13:54:08 +01:00
Maxime Coste
f59108072f Initial support for user configurable modeline with the modelinefmt option
modelinefmt is first sent through a command line expander (so %sh{...},
%val{...} et al. are expanded), then through markup expand (so that
{face} are interpreted as well)
2015-09-19 12:43:39 +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
e69db0f671 Regex are overkill for shell manager env vars, we just need exact match or prefix match 2015-09-03 13:21:35 +01:00
Maxime Coste
995a094471 Fallback on /usr/share/kak if the relative runtime path does not exists 2015-09-02 22:28:41 +01:00
Maxime Coste
1295bc95cc Fix clang compilation 2015-09-02 13:35:50 +01:00
Maxime Coste
ae7dc3c576 Simplify runtime_directory 2015-09-01 13:51:57 +01:00