Jason Felice
99be3ff5e2
Use helper template struct in MsgReader
...
This makes reads for all types, including String, Vector, and Optional,
use the same interface in MsgReader.
2019-04-22 10:49:12 -04:00
Maxime Coste
aec58b968b
Small code cleanup in Face struct definition
2019-04-18 14:37:24 +02:00
Maxime Coste
06d4ee578e
Update changelog
2019-04-17 08:38:52 +02:00
Maxime Coste
78419bc76f
Remove InsertCompletionSelect hook
2019-04-17 08:38:52 +02:00
Maxime Coste
9118a18d5d
Change completions option docstring element to be an arbitrary command
...
We can have the previous behaviour by just passing the docstring to
`info -placement menu`.
2019-04-17 08:38:52 +02:00
Maxime Coste
02fc42a12a
Rename info -placement to info -style and support modal style
...
Fixes #1375
Closes #1380
2019-04-17 08:38:52 +02:00
Maxime Coste
ace499ecb1
Pass selected completion text to InsertCompletionHide
2019-04-16 15:56:07 +02:00
Maxime Coste
0bff4851d9
Support '-placement menu' switch in the info command
...
Expose insert completion menu documentation via the info command.
2019-04-15 17:22:48 +02:00
Maxime Coste
6d83828dab
Support name captures in dynregex highlighters
...
Fixes #2856
2019-04-16 00:18:15 +10:00
Maxime Coste
6b79c1e000
Support named captures in hooks
...
Fixes #2857
2019-04-15 23:56:49 +10:00
Maxime Coste
ac73f7c27f
Run ClientClose hook before exiting the client itself
...
Closes #2849
2019-04-13 15:40:43 +10:00
Maxime Coste
91337d6091
Make it possible to edit an existing scratch buffer again
...
And make `edit! -scratch *scratch*` for the recreation of an empty
buffer.
Fixes #2852
2019-04-12 13:52:26 +10:00
Maxime Coste
ef1fd3acb9
Prevent conversion to client on suspend from disconnecting other clients
...
clear the client manager in the to be converted process without
sending exit messages as the forked server will still be there.
Fixes #2847
2019-04-12 13:23:38 +10:00
Justin Frank
c40bb6fc00
Evaluate modules in an empty context
2019-04-08 17:06:56 -07:00
Justin Frank
7866d88131
Added ModuleLoad hook that uses the module name as the parameter
2019-04-08 17:05:55 -07:00
Justin Frank
6092852640
Added 'provide-module' and 'require-module' commands
2019-04-08 17:02:44 -07:00
Justin Frank
670f8192c8
Set up command boilerplate for provide-module and require-module
2019-04-08 17:02:44 -07:00
Maxime Coste
f732ea4efb
Refactor ClientManager::clear
2019-04-08 22:32:30 +10:00
Maxime Coste
675dbfbe8b
Auto generate buffer name when using edit -scratch with no name
...
This will make it easier to create a temporary scratch buffer to
work in without having troubles with name collisions.
Fixes #849
2019-04-08 22:16:44 +10:00
Maxime Coste
c8839e7904
Add a ClientCreate and ClientClose hook
...
As discussed in #2830 .
Closes #2500 .
2019-04-08 21:59:32 +10:00
Maxime Coste
d0df1ffe71
update version notes and changelog
2019-04-07 09:51:27 +10:00
Maxime Coste
41f19f8dc9
Add support for %file{...} expansions
...
This should make the use case exposed in #2836 implementable.
2019-04-07 09:43:40 +10:00
Maxime Coste
744778be30
Add a -to-file <filename> switch to the echo command
...
As discussed in #2836
2019-04-07 09:32:17 +10:00
Maxime Coste
835f2239a7
Run WinClose hook when clearing all free windows
...
Fixes #2830
2019-04-04 22:06:17 +11:00
Maxime Coste
cc788c888e
Fix detection of client ungraceful disconnection
2019-04-04 13:10:38 +11:00
Maxime Coste
d91e017803
Buffer writes in blocks of 4Kb when writing buffers to files
...
Could make kakoune more compatible with tools looking for file
modifications by reducing the amount of writes done.
As discussed in #2812
2019-04-01 22:57:55 +11:00
Maxime Coste
baae0c899b
Add -timestamp switch support to the select command
...
Fixes #2829
2019-04-01 22:11:18 +11:00
Maxime Coste
b8cf457e82
Add Optional::map and Optional::cast methods
...
Cool kids call that monadic interface if I understood correctly.
2019-04-01 22:09:32 +11:00
Delapouite
0fe8e59abc
Add missing flags to debug buffers output
2019-03-27 19:30:41 +01:00
Maxime Coste
688afee41b
Only pass ncurses compilation flags to ncurses_ui.cc
2019-03-26 13:04:08 +11:00
Maxime Coste
b531bab1ce
Add support for -shell-script-* completion in :prompt
...
Fixes #2754
2019-03-24 19:28:46 +11:00
Maxime Coste
045efdc49e
Extract shell script completion code into structs
2019-03-24 13:01:43 +11:00
Maxime Coste
cf0458e734
Add cursor_display_column expansion
...
Fixes #2788
2019-03-23 11:32:32 +11:00
Vladimir Bauer
247e8b4a19
find $(sharedir)/rc ...
2019-03-22 22:21:00 +03:00
Vladimir Bauer
b839e45573
undo clean section
2019-03-22 19:23:50 +03:00
Vladimir Bauer
a5897fe1b6
call find in BSD compatible way
2019-03-22 13:28:52 +03:00
Maxime Coste
ad882c3370
Limit WordDB word length to 50 bytes
...
Should improve both performance and relevancy of the word completions.
2019-03-22 18:03:49 +11:00
Justin Frank
4c26a03a61
Fixed makefile so properly installs new rc structure
2019-03-21 18:49:04 -07:00
Maxime Coste
ef0c183ed7
Do not copy environment strings, just refer to them
2019-03-21 20:43:24 +11:00
Maxime Coste
31d67f51dd
Track more memory statistics
2019-03-21 20:35:22 +11:00
Maxime Coste
56611604b2
Make String able to reference external data without copying
...
Sometimes we really need to have a String instead of a StringView,
but some of those strings might not need to own their data. Make
it possible to explicitely construct a String that does not own
the underlying buffer.
Use it when parsing balanced strings.
2019-03-19 22:00:57 +11:00
Maxime Coste
c2be661785
Fix typo in scratch buffer default content
2019-03-19 21:44:30 +11:00
Maxime Coste
f87e844244
Add a text in scratch buffer to make it explicit it wont be saved
...
Fixes #2759
2019-03-17 10:41:11 +11:00
Maxime Coste
a8ea599372
Remove another unnecessary ; in palete reset escape sequence
...
Should fix #2779 for real.
2019-03-16 11:57:31 +11:00
Maxime Coste
525684f4da
Make keymap fully constexpr
2019-03-16 11:54:56 +11:00
Maxime Coste
47be98f1fc
Remove unnecessary ; from palette reset escape sequence
...
Fixes #2779
2019-03-13 07:19:20 +11:00
Maxime Coste
21fa4dcb13
Re-introduce -MP in the C++ compilation rule
...
It turns out it is important to avoid having to clean when a header
is deleted.
2019-03-05 20:56:44 +11:00
Maxime Coste
8a0e89f326
Merge remote-tracking branch 'laelath/compilation-warnings'
2019-03-05 20:54:14 +11:00
Maxime Coste
ffb1813759
Merge remote-tracking branch 'krobelus/write-all-note-modified'
2019-03-05 20:50:15 +11:00
Maxime Coste
4843149b6a
Make error description available as "%val{error}" during catch blocks
...
Fixes #2761
2019-03-05 20:46:23 +11:00
Maxime Coste
f9d421130f
Fix use of invalidated iterators in highlight_range
...
Fixes #2755
2019-03-05 20:31:40 +11:00
Justin Frank
6a3c3a3f82
-MP compile option isn't needed since header files aren't globbed
2019-02-27 22:46:04 -08:00
Justin Frank
8178400f8d
Fixed all reorder warnings
2019-02-27 22:45:31 -08:00
Justin Frank
29342836a6
Fixed Selection being defined as a struct and class
2019-02-27 22:45:31 -08:00
Johannes Altmanninger
b849099472
Document that write-all only writes modified buffers
2019-02-25 10:59:45 +01:00
Jason Felice
7cf6eddc30
Add object mode expansions
2019-02-17 20:18:19 -05:00
Maxime Coste
e169a1893b
Merge remote-tracking branch 'eraserhd/object-command-submode'
2019-02-17 11:22:02 +11:00
Maxime Coste
1ad3b87302
Collapse jumps based on current index change
...
The previous method, while likely more correct, could restore jump
lists containing references to already removed buffers.
2019-02-17 11:21:26 +11:00
Maxime Coste
924f30840b
Fix uses of std::remove_if
...
std::remove_if is not std::partition, it makes no guarantees on
the state of the objects past the new end (they usually are in a
moved-from state).
2019-02-17 11:21:26 +11:00
Maxime Coste
8135a44c6c
Run WinClose hook before putting the window into trash
2019-02-17 11:21:26 +11:00
Jason Felice
000aa2282c
Add object command
2019-02-14 09:32:04 -05:00
Maxime Coste
89cd68d8af
Check the return value of the rename call
2019-02-12 21:05:47 +11:00
Maxime Coste
4dae2c875b
Introduce a writemethod option to either overwrite or replace files
...
This permit to choose if files should be written by overwriting their
content (the default), or by writing to a separate temporary file
and rename it to the current file.
As discussed in #2036
2019-02-12 21:01:19 +11:00
Maxime Coste
e8f26cbae7
Refactor write_buffer_to_file to use a flags param
...
That is clearer than two boolean parameters.
2019-02-12 20:18:34 +11:00
Maxime Coste
94796509a0
Fix bug in 'itersel' handling that could result in unsorted selections
2019-02-11 21:48:09 +11:00
Maxime Coste
5c0175d90a
Remove peephole regex optimization pass
...
The current implementation is wrong as it crosses basic blocks
boundaries. Doing basic block decomposition of regex is probably
a tad too complex for this single optimization.
Fixes #2711
2019-02-04 22:10:19 +11:00
Maxime Coste
d9d2140ea2
Fix regex not always selecting the leftmost longest match
...
(Actually the rightmost longest match when searching backwards)
Fixes #2710
2019-02-04 17:33:29 +11:00
Maxime Coste
4cb402ac1a
Remove references to SelectionList from selectors
2019-02-04 12:52:55 +11:00
Maxime Coste
7f9fe32f2d
Remove target_eol and small code cleanups
2019-02-04 12:52:48 +11:00
Maxime Coste
7b1af1c32c
Merge remote-tracking branch 'JJK96/documentation'
2019-02-03 09:53:09 +11:00
Jan-Jaap Korpershoek
b171824d8b
Add missing [<switches>] argument to declare-option
2019-01-25 00:03:20 +01:00
Maxime Coste
b91367f8a3
Replace std::mem_fn with custom lambda in ranges
2019-01-24 23:24:50 +11:00
Maxime Coste
3e89148d74
Fix missing errno include
2019-01-24 23:24:50 +11:00
Maxime Coste
aa4885fd65
Add missing locale include to main.cc
2019-01-24 23:04:31 +11:00
Maxime Coste
c7f4d4dd27
Fix array_view dependency on std::min
2019-01-24 22:55:20 +11:00
Maxime Coste
346c78f5e0
Header and dependency cleanup
2019-01-24 21:22:20 +11:00
Maxime Coste
4b72cfe530
Replace std::tie with structured bindings
2019-01-24 21:21:59 +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
36e9e7eaf9
Change pipe diffing to work linewise
...
This should greatly improve performances as we only need to diff
lines instead of individual characters.
Closes #2678
Fixes #2037
2019-01-23 20:20:54 +11:00
Maxime Coste
370d10ccc7
Always select inserted text after piping
...
Relying on general selection update code is error prone due to
diffing.
Fixes #2394
2019-01-23 20:14:08 +11:00
Maxime Coste
c07f052de7
Default to release build
...
Fixes #2701
2019-01-22 19:41:58 +11:00
Maxime Coste
eb8f785e91
Try to bypass clang crash
2019-01-20 22:59:28 +11:00
Maxime Coste
77b1216ace
Add a peephole optimization pass to the regex compiler
2019-01-20 22:59:28 +11:00
Maxime Coste
0364a99827
Refactor regex find next start not to be an instruction anymore
...
The same logic can be hard coded, avoiding one thread and 3
instructions, improving the regex matching speed.
2019-01-20 22:59:28 +11:00
Maxime Coste
fd043435e5
Split compile time regex flags from runtime ones
2019-01-20 22:59:28 +11:00
Maxime Coste
8c2603ab3c
Support re-using the same ThreadedRegexVM for multiple iterations
...
This should reduce the number of allocations as the memory allocated
for the thread stack and the saves can be re-used between runs instead
of being cleared every time.
2019-01-20 22:59:28 +11:00
Maxime Coste
30897fd820
Fix warning on gcc 8
2019-01-20 22:59:28 +11:00
Maxime Coste
7b29192c24
Fix use of removed std::random_shuffle
2019-01-20 22:59:28 +11:00
Maxime Coste
2afc147b2c
Refactor parsed regex children iteration to use regular range-for loops
2019-01-20 22:59:28 +11:00
Maxime Coste
566268d7bc
Refactor RegexIterator to use a Sentinel
2019-01-20 22:59:28 +11:00
Maxime Coste
3babd0685c
Switch to compilation standard to C++17
2019-01-20 22:59:28 +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
445da8d7bf
Use an InvalidPolicy in utf8::dump and utf8::codepoint_size
...
Do not throw on invalid codepoints by default, ignore them.
Fixes #2686
2019-01-13 18:29:20 +11:00
Maxime Coste
328c497be2
Add support for named captures to the regex impl and regex highlighter
...
ECMAScript is adding support for it, and it is a pretty isolated
change to do.
Fixes #2293
2019-01-03 22:55:50 +11:00
Maxime Coste
56ee329d79
Add Optional::value_or_compute for lazy computation of default value
2019-01-03 22:49:40 +11:00
Maxime Coste
09e6518545
Remove DurationMs and slight code refactor
2018-12-28 06:27:35 +11:00
Maxime Coste
ef8fdd664f
Merge remote-tracking branch 'lenormf/unit-tests-timing'
2018-12-28 06:16:50 +11:00