Commit Graph

6358 Commits

Author SHA1 Message Date
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
ae2ed21e07 Merge remote-tracking branch 'Delapouite/current-selection' 2018-05-07 21:48:54 +10:00
Delapouite
408c3d6957 Docs: homogenize "selections" idiom in keys.asciidoc 2018-05-07 10:58:58 +02:00
Maxime Coste
e3feab0097 Merge branch 'master' of git://github.com/gspia/kakoune 2018-05-05 08:16:15 +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
gspia
bbd1fd6576 Comments for Idris 2018-05-04 10:22:17 +03: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
d882d51643 Merge remote-tracking branch 'Screwtapello/non-greedy-markdown-backticks' into HEAD 2018-05-02 22:51:06 +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
Tim Allen
7e124eef98 markdown.kak: backtick spans should be non-greedy.
Previously, due to a typo, Kakoune would highlight backtick spans from the first backtick to the last backtick in a paragraph, no matter how many backticks were in between. Now spans correctly stop at the first backtick after the opening backtick.
2018-05-02 13:54:45 +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
cbb91bcaed Merge branch 'imp/small-changes-trampoline' of git://github.com/1nquisitive/kakoune into master 2018-04-29 19:59:43 +10:00
Maxime Coste
787ca7f19b Regex: small code style tweak 2018-04-29 19:58:18 +10:00
Maxime Coste
1e8026f143 Regex: Use only 128 characters in start desc and encode others as 0
Using 257 was using lots of memory for no good reason, as > 127
codepoint are not common enough to be treated specially.
2018-04-29 19:58:18 +10:00
Maxime Coste
528ecb7417 Regex: Use a custom 'DualThreadStack' structure to hold thread info
Instead of using two vectors, we can hold both current and next
threads in a single buffer, with stacks growing on each end.

Benchmarking shows this to be slightly faster, and should use less memory.
2018-04-29 19:58:18 +10:00
Albin Otterhäll
b9cc0d94a9 Small improvements of TRAMPOLINE 2018-04-29 10:04:22 +02:00
Delapouite
8b00d763e0 Docs: add exhaustive list of scoped objects 2018-04-28 17:41:24 +02:00
Maxime Coste
3afa32935f Merge remote-tracking branch 'Delapouite/unnamed-client' into HEAD 2018-04-28 09:30:35 +10:00
Maxime Coste
a1b8864c77 Merge remote-tracking branch 'lenormf/regex-format-string' into HEAD 2018-04-28 09:29:57 +10:00
Maxime Coste
2b9ec411d3 fix potential overflow in dump_regex 2018-04-28 09:29:15 +10:00
Maxime Coste
72bf881488 git-tools.kak: Remove not (yet) existing -with-hooks switch use
Fixes #2015
2018-04-27 19:44:58 +10:00
Frank LENORMAND
9bac04d35f regex_impl: Fix a potential format string flaw 2018-04-27 09:24:22 +03:00
Maxime Coste
8438b33175 Add a debug regex command to dump regex instructions 2018-04-27 08:35:09 +10:00
Maxime Coste
f10eb9faa3 Use indices instead of pointers for saves/instruction in ThreadedRegexVM
Performance seems unaffacted, but memory usage should be lowered
as the Thread struct is 4 bytes instead of 16.
2018-04-27 08:35:09 +10:00
Maxime Coste
869736359a Make all fifo cleanup hooks run always
Those should not get prevented from running just because the user
disabled hooks, they are important for cleanup.
2018-04-26 08:31:36 +10:00
Maxime Coste
4eb6740794 Add a -always switch to hook command to ignore hooks disabled
Hooks specified as always will run regardless of the hook disabled
status.
2018-04-26 08:28:11 +10:00
Maxime Coste
f99f0020dc Fix (again) C++ raw string highlighting 2018-04-25 21:19:04 +10:00
Maxime Coste
2d96fbed7c Reserve data for # register 2018-04-25 21:19:04 +10:00
Maxime Coste
2fc5a0317c Refactor RegexIterator::next to directly use a ThreadedRegexVM 2018-04-25 21:20:32 +10:00
Maxime Coste
fa17c46653 Regex: Refactor ThreadedRegexVM state handling
Remove ExecState to store threads inside the ThreadedRegexVM so that
memory buffers can be reused between executions. Extract an ExecConfig
struct with all the data thats execution specific to avoid storing
it needlessly inside the ThreadedRegexVM.
2018-04-25 21:19:04 +10:00
Delapouite
746b9acb96 Change client default name: "unnamed0" → "client0" 2018-04-23 11:42:11 +02:00
Stephen Hassard
eca53db2bf remove dragonflybsd specific logic since pkg-config works perfectly fine now 2018-04-22 09:12:45 -07:00
Maxime Coste
6df7086f3a Merge remote-tracking branch 'Delapouite/rotate-doc' into master 2018-04-22 09:41:58 +10:00
Maxime Coste
ee604fd863 Merge remote-tracking branch 'Delapouite/set-option' into master 2018-04-22 09:41:15 +10:00
Maxime Coste
4c5a3c1dff git-tools.kak: improve completion support and no-message detection 2018-04-22 09:40:45 +10:00
Maxime Coste
fea6bc9524 c-family.kak: Fix highlighting of raw strings 2018-04-22 09:40:45 +10:00
Delapouite
9eb1bb4481 Docs: fix docstrings in rc files set-optionset 2018-04-19 19:28:32 +02:00