Alyssa Ross
7685a657ca
Fix grammar in highlight error message
2018-06-01 13:02:38 +02:00
Delapouite
b60ed6ca53
docs: fix missing ]
in wrap hl -marker switch docstring
...
Also add the related changelog entry
2018-05-30 18:11:19 +02:00
Alyssa Ross
2deb2c0294
Fix typos in add-highlighter range help
2018-05-28 13:19:12 +02:00
Maxime Coste
f06badcfd3
Fix clang compilation
2018-05-28 08:26:19 +10:00
Maxime Coste
b5693c6253
Refactor option_from_string to return directly the option value
2018-05-27 13:00:50 +10:00
Maxime Coste
2617f5e022
Add unit test for option parsing
2018-05-27 13:00:48 +10:00
Maxime Coste
f1c1de834a
Add a -marker <marker_text> switch support to the wrap highlighter
...
This makes wrapped lines very explicit.
Fixes #2065
2018-05-26 22:22:00 +10:00
Maxime Coste
68fb3ba88f
Rework fail
command not to display command call stack
...
`fail` triggers "expected" errors, and hence should just display
the provided message.
2018-05-26 21:31:17 +10:00
Maxime Coste
54b62cbef7
Do not expose C++ typeid().name to user facing errors on wrong option type
...
Fixes #2079
2018-05-26 10:01:26 +10:00
Maxime Coste
9b89652b0b
Fix potential assert on itersel selection restoration
...
We cannot guarantee after an itersel that selections are going to
still be in ascending order, but we were calling a SelectionList
constructor that was assuming this was the case.
2018-05-24 08:08:51 +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
56e2174cf6
Do not reuse m_buffer_trash to store dying buffers in ~BufferManager
...
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-05-21 20:30:24 +10:00
Maxime Coste
d4e36958f8
Gather options in a vector when running Buffer::on_option_changed
...
on_option_changed might trigger hooks that will mutate the option
managers, invalidating the iterators we use.
2018-05-21 20:07:25 +10:00
Maxime Coste
919b7ce645
Fix also the implementation of to_string(size_t) change
2018-05-21 20:01:19 +10:00
Maxime Coste
edc53de8cc
Small code cleanup
2018-05-21 07:55:07 +10:00
Maxime Coste
b7dabf11f2
Fix incompatible to_string function declaration when size_t is unsigned int
2018-05-21 07:53:21 +10:00
Maxime Coste
ec0f8fe574
Extend try
command to support multiple catches.
...
If a catch command fails, and another catch is availabe following
it, that following catch gets executed.
2018-05-19 14:15:16 +10:00
Maxime Coste
243cfbc4ae
Fix behaviour of extending to next match when wrapping
...
If the search wraps to get to next match, drop that selection when
extending.
2018-05-19 14:15:16 +10:00
Maxime Coste
14d12fac04
Rename -allow-override switch to -override
...
Closes #2057
2018-05-19 14:15:16 +10:00
Maxime Coste
c9a8658671
Fix assert with window small enough so that no part of buffer is displayed
...
Fixes #2056
2018-05-19 14:15:16 +10:00
Maxime Coste
79b60f69a9
Small code cleanups
2018-05-17 22:55:53 +10:00
Maxime Coste
b22c8ad8c7
Fix potential missed redraws
2018-05-17 22:50:11 +10:00
Maxime Coste
b0577d07f6
Merge remote-tracking branch 'Screwtapello/newlines-after-json-errors'
2018-05-17 07:47:34 +10:00
Maxime Coste
9bd3231d9b
Avoid needless constant allocation in StaticRegister::set
2018-05-17 07:41:32 +10:00
Maxime Coste
4cc9c9997e
compute_line_modifications: avoid potentially long iteration
2018-05-17 07:41:32 +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
Tim Allen
0af53fb0dc
Print a newline after errors in the JSON UI.
...
This makes them just a little easier to read.
2018-05-16 23:26:05 +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
b204e773d4
Do not push jumps implicitely in transient contexts
...
This should improve performance in draft contexts.
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
327d8ad759
Mark Client, Window, Buffer and OptionManager as final
...
Avoids warning about non virtual destructor calls on them,
as they have a vtable due to OptionManagerWatcher.
2018-05-09 23:01:40 +10:00
Maxime Coste
e8c648b7b7
Store the timestamp at which a display buffer was generated
...
Coordinates inside a display buffer are only valid for a certain
buffer content, they cannot be used once the buffer has been
modified.
Fixes #2034
2018-05-08 21:56:44 +10:00
Maxime Coste
148d6c205b
Fix wrong behaviour in select surrounding
...
Fixes #2030
2018-05-07 22:17:57 +10:00
Maxime Coste
7a841dcca7
Remove out of date noexcept(false) on MessageWriter destructor
...
This made sense when the writer was trying to send the message
in its destructor, but this is not the case anymore.
2018-05-05 07:59:13 +10:00
Maxime Coste
da1d78a3c2
Do not let exception propagate out of register restoring lambda
...
It is called during a std::vector destruction, which is noexcept,
leading to terminate being called.
2018-05-05 07:57:37 +10:00
Maxime Coste
7325ad216c
Add support for explicit menu selection from the UI
...
the JsonUI now supports a "menu_select(int)" RPC call that should
trigger explicit selection of the provided item index.
As discussed for issue #2019 .
2018-05-03 22:28:20 +10:00
Maxime Coste
c2637f08d9
JsonUI: Add support for a "mouse" RPC calls from the UI
...
As discussed on issue #2019
2018-05-03 22:27:59 +10:00
Maxime Coste
a19ce37634
Tweak the way register restorers are created to try to fix OSX compilation
2018-05-03 08:14:15 +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
4288f0fb3a
Move ScopedEdition to context_wrap
...
No need to create it both in context_wrap and in the called function.
2018-05-01 22:49:01 +10:00
Maxime Coste
286a244aa2
Replace RegisterRestorer with a on_scope_end + lambda
2018-05-01 22:48:14 +10:00
Maxime Coste
6777c14697
Make OnScopeEnd valid even when non-copy elided
...
OnScopeEnd was relying on copy elision to avoid temporary destructor
calls that would run the scope end function too soon.
2018-05-01 22:47:06 +10:00
Maxime Coste
1fb53ca712
Fix wrong use of constexpr
2018-04-30 07:41:31 +10:00
Maxime Coste
e4f90e5ed2
Fix tests after changes to json_ui output
2018-04-29 23:06:24 +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
57112b0845
Rename move to move_cursor
...
move is pretty ambiguous and hard to find due to std::move.
2018-04-29 22:31:57 +10:00
Maxime Coste
8e555cb992
JsonUI: add support for set_ui_options RPC call
...
As discussed on #2019
2018-04-29 20:45:53 +10:00
Maxime Coste
2fa553e728
Remove implicit conversion from String to DisplayAtom/DisplayLine
2018-04-29 20:45:53 +10:00
Maxime Coste
787ca7f19b
Regex: small code style tweak
2018-04-29 19:58:18 +10:00