Commit Graph

719 Commits

Author SHA1 Message Date
Maxime Coste
346c78f5e0 Header and dependency cleanup 2019-01-24 21:22:20 +11:00
Maxime Coste
90dd084993 Only embed gdb script on ELF targets, and add missing gdb symlink 2019-01-23 20:59:32 +11:00
Maxime Coste
ebc9f7703b Embed gdb pretty-printing script directly into Kakoune binary
This will get stripped correctly, and should make debugging easier.
2019-01-23 20:27:16 +11:00
Maxime Coste
cb7401439b Kakoune v2019.01.20 2019-01-20 22:52:01 +11:00
Maxime Coste
ae69759a53 Defer deletion of unsetted option to return to main loop
Fixes #2572
2019-01-20 22:46:40 +11:00
Maxime Coste
7df7f5d38b small code tweak 2019-01-19 10:34:12 +11:00
Maxime Coste
09e6518545 Remove DurationMs and slight code refactor 2018-12-28 06:27:35 +11:00
Frank LENORMAND
623c8a76f4 src: Run and display the time taken by unit tests to run in debug mode
Knowing how much time the editor took to run unit tests gives users
a notion of how fast it's performing on a given system.
2018-12-23 09:26:12 +03:00
Maxime Coste
d2f2c3d0c7 Generate a coredump on quit due to SIGSEGV 2018-12-13 21:29:33 +11:00
Maxime Coste
64f1c31401 Refactor parsing of keys and introduce a builtin key parser mode
By setting the ncurses_builtin_key_parser ui_option to true, we
can disable ncurses parsing of key strokes to get less portable
parsing but support for more complex modifiers.
2018-12-09 21:35:22 +11:00
Maxime Coste
b897a18aa6 Use a dummy function for SIGPIPE instead of SIG_IGN
SIG_IGN is inherited after 'execve' and requires us to reset
that signal handler, which does not work well with vfork on
OSX. Using an empty function does the trick and will be auto
reset to default on exec.
2018-12-06 20:33:13 +11:00
Maxime Coste
1553d91d27 Make '_' the default extra_word_chars, and remove built-in support
Fixes #2599
2018-11-27 18:16:21 +11:00
Maxime Coste
31d3cef093 Merge remote-tracking branch 'lenormf/rename-auto_complete' 2018-11-25 23:01:02 +11:00
Olivier Perret
b96ab67479 Expose selection(s) length with a value 2018-11-08 20:14:33 +11:00
Maxime Coste
3b40ab82f4 Kakoune v2018.10.27 2018-10-27 09:26:50 +11:00
Maxime Coste
dfc11d1c43 Refactor Hook management to have a well defined list of hooks
Hooks are now an enum class instead of passing strings around.
2018-10-23 08:15:53 +11:00
Maxime Coste
eba40028b9 Update startup messsage and changelog.asciidoc 2018-10-06 10:55:26 +10:00
Maxime Coste
5d0ea2936d Ignore errors in write_stdout
Fixes #2418
2018-09-23 17:16:09 +10:00
Jason Felice
6c4593b18a Document that -f starts with whole file selected 2018-09-21 10:01:20 -04:00
Maxime Coste
d73ec20285 Kakoune v2018.09.04 2018-09-04 08:22:28 +10:00
Maxime Coste
68aba9e353 Use shell specific quoting for env vars
Add a test case to validate roundtrips between Kakoune and the
shell.
2018-08-29 07:53:59 +10:00
Matt Peterson
d0a8426272 Use $USER if getpwuid fails 2018-08-24 10:50:59 -04:00
Maxime Coste
f706b8c9be Add a -version switch to Kakoune
Closes #1035
2018-08-09 11:24:11 +02:00
Maxime Coste
075d1048ab Avoid invalid access to Optional
If the UI is not ok, the exit status of the client might not be
available. Return -1 in that case.
2018-07-30 10:32:38 +01:00
Maxime Coste
737807dde2 Replace a few loops with ranges 2018-07-26 21:23:06 +10:00
Maxime Coste
3c51da4488 Merge remote-tracking branch 'lenormf/fix-development-version' 2018-07-22 15:58:41 +10:00
Frank LENORMAND
a2f9c68a7c src: Change the bullet point symbols in the version notes 2018-07-20 13:55:16 +03:00
Frank LENORMAND
60bd8df3c2 src: Don't print a number for the development version 2018-07-20 13:49:36 +03:00
Frank LENORMAND
0b8899d1d4 src: Rename auto_complete to autocomplete
Removing the underscore seems to make the option name more
in line with the others (even though some do use a separator,
e.g. `disabled_hooks`).
2018-07-19 18:57:33 +03:00
Maxime Coste
7195100609 Re-introduce kill_session::exit_status, @lenormf was right
As discussed in #2186, in the end we need the exit status for the
case where the local client exited first (the server forked to
background) then another client trigger the kill command.
2018-07-19 19:27:56 +10:00
Maxime Coste
40a91b1120 Add a -debug '...' switch to Kakoune startup that sets the debug option
This gives an easy way to profile startup by running with -debug profile.
2018-07-19 18:36:49 +10:00
Maxime Coste
bde726d034 Change autoshowcompl to auto_complete with insert|prompt possible values 2018-07-15 11:10:32 +10:00
Maxim Baz
3ca424d10f
Fix description of ui_options 2018-07-13 22:46:24 +02:00
Maxime Coste
eab98c88bd Refactor handling of startup info to make it configurable
A new `status_info_version` option allows user to disable info
message regarding changes that happened at that version or
earlier.
2018-07-05 07:54:28 +10:00
Maxime Coste
ed123a2cc9 Reference the big breaking refactoring in the startup message 2018-07-05 07:54:28 +10:00
Maxime Coste
27163106c7 Make register expansions expand to the full register content
Now that we have a nice standard way to express lists of strings,
registers can be fully exposed. An new $kak_main_reg_... env var
was added to provide the previous behaviour which is relied on by
doc.kak.
2018-07-05 07:54:28 +10:00
Maxime Coste
76093f252c Change env vars that are lists to use the general list syntax 2018-07-05 07:54:28 +10:00
Maxime Coste
ec16969609 Do not reparse %sh{...} strings
Automatic reparsing of %sh{...}, while convenient in many cases,
can be surprising as well, and can lead to security problems:

'echo %sh{ printf "foo\necho bar" }' runs 'echo foo', then 'echo bar'.
we make this danger explicit, and we fix the 'nop %sh{...}' pattern.

To reparse %sh{...} strings, they can be passed to evaluate-commands,
which has been fixed to work in every cases where %sh{...} reparsing
was used..
2018-07-05 07:54:28 +10:00
Maxime Coste
4ef5c80724 Fix Kakoune client busy looping on SIGHUP
Pure clients never quitted when they got SIGHUP after recent changes
to add is_ok to UserInterface. run_client now tracks the UI state as
well and quits if the UI gets killed.
2018-05-23 08:16:35 +10:00
Maxime Coste
14d12fac04 Rename -allow-override switch to -override
Closes #2057
2018-05-19 14:15:16 +10:00
Maxime Coste
b22c8ad8c7 Fix potential missed redraws 2018-05-17 22:50:11 +10:00
Maxime Coste
fcce76ba57 Handle all pending events before redrawing
If new events happen while handling events, take care of those
new events as well before redrawing.
2018-05-17 07:41:32 +10:00
Maxime Coste
75eb293f98 Rename Context::Flags::Transient to Context::Flags::Draft
Draft is well establish and all draft context are transient.
2018-05-14 08:23:00 +10:00
Maxime Coste
288cf6de73 Fix performance problem when generating many values for # register
Fixes #2008
2018-05-09 23:02:53 +10:00
Maxime Coste
74f90c1fc5 Refactor buffer undo tree
Store the undo tree as an array of undo nodes, instead of as a
pointer based tree.
2018-05-02 22:34:55 +10:00
Maxime Coste
bcecb2f877 Fix crash on quitting 2018-04-29 22:59:20 +10:00
Maxime Coste
178d2d3cd3 Rework the way UI can trigger a client quitting
Add a UserInterface::is_ok method and return false on
SIGHUP/stdin closing/socket dropping

This should be cleaner and more robust than the previous SIGHUP
handling code.

Fixes #1594
2018-04-29 22:31:57 +10:00
Maxime Coste
2d96fbed7c Reserve data for # register 2018-04-25 21:19:04 +10:00
Maxime Coste
c2759ac526 Fix handling of local client quitting during its creation
If the local client was quitted during its creation (using -e quit
for example), we could have been accessing a null pointer afterwards.

Make the rest of the code aware that local_client might be null.
2018-04-19 07:56:37 +10:00
Maxime Coste
7f6a6ab1d3 Update startup message and include released version in it
Having released version information in that message will be useful
to allow user to know which breaking changes apply to them.
2018-04-14 13:04:45 +10:00