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
Tobias Kortkamp
bb124895b7
tmux-repl fails on FreeBSD and claims that tmux' version is too old
...
even though tmux 2.7 is installed.
The problem is that
```
expr "$(tmux -V)" : 'tmux \([0-9]*\|master\)'
```
fails on FreeBSD. It works fine with GNU expr.
Replace the expression with cut(1) and a simple parameter expansion
which should hopefully work fine on any POSIX system.
Signed-off-by: Tobias Kortkamp <git@tobik.me>
2018-04-24 20:16:32 +02: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-option
→ set
2018-04-19 19:28:32 +02:00
Delapouite
9f852652ee
Docs: fix rotate content example
2018-04-19 18:55:41 +02:00
Maxime Coste
0b773ac26c
Complete word from the current buffer in regex_prompt
...
This allows to use Kakoune fuzzy matching to get the words we
are looking for.
2018-04-19 07:58:42 +10:00
Maxime Coste
f545ff7727
Move get_word_db to word_db.cc
2018-04-19 07:58:42 +10:00
Maxime Coste
e207bd30d4
Extract a for_n_best algorithm from completion function
...
Provide the heap based n-best algorithm through a nice interface.
2018-04-19 07:58:42 +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
Tobias Kortkamp
01757475f8
Tobias Kortkamp Copyright Waiver
...
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
Signed-off-by: Tobias Kortkamp <git@tobik.me>
2018-04-17 17:20:54 +02:00
Maxime Coste
0f38be544c
Makefile: use git-describe to get the version string
...
That means we can just tag releases and the version will be taken
from the tag to generate the tarball.
2018-04-14 13:05:59 +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
Maxime Coste
567c82840a
ruby.kak: Refactor end autoinsertion logic to be more robust
...
Fixes the bug described by PR #1994
2018-04-14 12:47:42 +10:00
Maxime Coste
d5d54889bb
Merge remote-tracking branch 'natec425/master'
2018-04-14 09:20:13 +10:00
Tobias Kortkamp
4aa5582821
Update README.asciidoc to mention FreeBSD
...
I've just committed a FreeBSD port of kakoune to the ports tree [1]. A binary package should also be available in the next couple of days.
It would be nice if it could be mentioned in the README.
Thank you :)
[1] https://www.freshports.org/editors/kakoune
2018-04-13 13:16:34 +02:00
Maxime Coste
99fea9c0f9
Fix typo
...
Thanks @lenormf
2018-04-12 21:28:15 +10:00