Maxime Coste
64183b1e4c
Make Token a simple aggregate
2017-09-01 17:09:34 +07:00
Maxime Coste
44fb375c81
Make InsertCompletion an aggregate
2017-09-01 17:03:34 +07:00
Maxime Coste
6d0016f89c
Remove unneeded ParameterDesc constructor
...
With C++14, we can use aggregate initialization and default values
together.
2017-09-01 16:58:52 +07:00
Maxime Coste
9672e9219d
Code style tweak in optional.hh
2017-09-01 16:54:06 +07:00
Maxime Coste
ab6a999431
Rename containers.hh to ranges.hh (and Container to Range)
2017-08-29 15:23:03 +07:00
Maxime Coste
c0a0ba3c0a
Rework containers.hh to get rid of the Factory structures
...
Replace them with polymorphic lambdas
2017-08-29 15:19:08 +07:00
Maxime Coste
1709886873
avoid literal eol in status lines, replace them with another symbol
2017-08-29 10:01:43 +07:00
Maxime Coste
24234dffa3
Do less implicit parse_filename calls
2017-08-29 09:42:04 +07:00
Maxime Coste
9001580c9b
Do not expand env vars in parse_filename
...
We have far enough ways to provide that feature, through the shell
or through regular expands.
Fixes #1545
2017-08-29 08:33:00 +07:00
Maxime Coste
5b43c46b75
Fix naming in fd_writable
2017-08-29 08:32:47 +07:00
Maxime Coste
e80b36b495
Expose client pid as $kak_client_pid
...
As requested in #1414
2017-08-28 13:12:45 +07:00
Maxime Coste
da227e48e9
Fix String::Data copying/moving from self
2017-08-23 18:13:42 +07:00
Maxime Coste
f7bed9eb18
Support specifying an exit status on quit
commands
...
The current client exit status can be specified as an optional
parameter, is nothing is given the exit status will be 0.
Fixes #1230
2017-08-23 13:33:13 +07:00
Maxime Coste
3efc406d57
Optimize DisplayBuffer::optimize()
...
Previous implementation was erasing in the middle of the atoms
vector each time two atoms were merged, leading to a move of
all following atoms.
2017-08-23 08:42:00 +07:00
Maxime Coste
6176a19520
Update startup info
...
Remove old breaking changes, add selection extending behaviour change.
2017-08-23 07:00:37 +07:00
Maxime Coste
2050167d98
Add build type (debug/release) in ":debug info" output
2017-08-22 15:12:17 +07:00
Maxime Coste
82d23bc400
Remove now trivial Selection::merge_with method
2017-08-18 08:52:40 +07:00
Maxime Coste
609a8ee8c7
Change selection extension code to be simpler
...
Selection extension now just keeps the anchor in place insead of
trying to be smart depending on the direction of selections.
2017-08-18 08:49:37 +07:00
Maxime Coste
1688332d12
Revert "Change HashCompatible trait to a variable template"
...
This reverts commit b58f72315c
.
Unfortunately gcc-5.1 handling of variable template partial
specializations is bugged.
2017-08-18 08:17:02 +07:00
Maxime Coste
65bac9c027
Respecify EnumDescs array sizes manually to workaround clang-3.6 bug
2017-08-18 08:15:18 +07:00
Maxime Coste
e0e9b8bae4
Try to get make_array to compile with older compiler version
2017-08-18 07:45:38 +07:00
Maxime Coste
8a2b8a9498
Do not consider the 8th bit to mean Alt on keys that are mouse events
...
Fix handling of mouse events for columns 128 to 223, we are still limited
by ncurses for columns > 223.
Fixes #1532
2017-08-16 00:40:45 +07:00
Maxime Coste
b58f72315c
Change HashCompatible trait to a variable template
2017-08-14 11:54:38 +07:00
Maxime Coste
9329fc99d2
Style tweak for regex code
2017-08-14 11:41:12 +07:00
Maxime Coste
6aa2388700
Use decltype(auto) return type for some to_string functions
...
Remove explicit return type thats just duplicating the return
expression.
2017-08-14 11:29:55 +07:00
Maxime Coste
1b1239b25a
Remove size redundancy in enum_desc function declaration
...
The need to have the array size in the return type was redundant with
the actual list of elements.
2017-08-12 22:11:58 +07:00
Maxime Coste
407c84666c
Remove redundant types inside Kakoune::Allocator
2017-08-12 15:49:38 +07:00
Maxime Coste
a61c51dfc6
Merge remote-tracking branch 'Delapouite/single_param'
2017-08-07 21:48:10 +07:00
Maxime Coste
fc64369f9d
Purge history on buffer reload when NoUndo flag is on
...
We were preserving the history in that case, so on fifo buffers
(that set the NoUndo flag until the fifo is closed), we still had
the history from the "previous life" of the buffer, leading crashes
when trying to apply it.
Fixes #1518
2017-08-04 11:39:28 +07:00
Maxime Coste
45a7496f54
Fix SafeCountable and RefCountable copy/move logic
...
The safe and ref counts should not get copied around.
2017-08-04 11:38:04 +07:00
Maxime Coste
420c6aca23
Change documentation directory towards $kak_runtime/doc
2017-08-03 15:00:02 +07:00
Maxime Coste
53e1d2f0de
Slight formatting tweak
2017-08-01 14:48:45 +07:00
Delapouite
233a459dee
Use single_param for ParameterDesc when relevant in command descs
2017-07-28 20:43:42 +02:00
Maxime Coste
d0dfcd2b78
Support values starting with -
for in set-register command
...
Fixes #1220
2017-07-25 11:38:13 +02:00
Maxime Coste
5eb63a32e5
Do not reject switch parameters starting with -
...
Closes #1193
2017-07-23 23:21:51 +02:00
Maxime Coste
d75a835ca1
Merge remote-tracking branch 'Delapouite/main_index'
2017-07-23 23:15:51 +02:00
Maxime Coste
d1c005dd8c
Limit diff algorithm complexity
...
Return a non-optimal, but valid, diff when we detect too many
iterations
Fixes #1509
2017-07-23 21:33:12 +02:00
Maxime Coste
d43e2ac843
More cleanups in diff code
2017-07-20 17:47:50 +02:00
Maxime Coste
d7c0bfddd0
Merge remote-tracking branch 'Delapouite/rmhl'
2017-07-20 12:47:49 +02:00
Delapouite
720ff62f03
Fix wrong autoinfo for remove-highlighter
2017-07-20 12:08:06 +02:00
Maxime Coste
ec1824d3c3
Make non smart case full match better than smart case full match
2017-07-19 20:18:47 +02:00
Maxime Coste
016a50f213
Use smart case matching for contiguous/prefix/fullmatch detection
...
Fixes #1498
2017-07-19 20:16:28 +02:00
Maxime Coste
f87afbcb65
Detect overflow using a long long for the computation result.
...
Closes #1306
2017-07-19 17:55:48 +02:00
Maxime Coste
d3f438810e
Fix main selection handling in keep pipe ($)
...
$kak_reg_hash will properly contain the current selection index when
executing the shell command, fixing its use.
Fixes #1503
2017-07-19 17:42:41 +02:00
Maxime Coste
9c4448ac41
Remove echo -color
support, superseeded by echo -markup
...
`echo -color Error "blah"` is the same as `echo -markup '{Error}blah'`
Fixes #1512
2017-07-19 17:18:52 +02:00
Maxime Coste
5ccf18d772
More use of std::enable_if_t alias
2017-07-19 08:55:24 +02:00
Maxime Coste
d37c3d175d
More uses of standard type traits aliases
2017-07-19 08:49:44 +02:00
Maxime Coste
609bc24f67
Remove unused function
2017-07-19 08:49:44 +02:00
Maxime Coste
ba83cbee0e
Use c++14 function deduction and decltype(auto) to cleanup some code
2017-07-19 08:49:43 +02:00
Maxime Coste
5bf401948a
Cleanup some code with C++14 features
2017-07-19 08:47:14 +02:00
Maxime Coste
bbaa98c46d
Fix travis configuration for C++14 support
2017-07-19 08:47:14 +02:00
Maxime Coste
7a79cbbc81
Migrate code to c++14
2017-07-19 08:47:14 +02:00
Maxime Coste
fbffd86f85
Add an assert to try to get more info on #1506
2017-07-19 08:40:17 +02:00
Maxime Coste
7b96d56996
Use the provided equal functor for prefix/suffix detection in diff
...
We were wrongly using the `==` operator.
2017-07-18 17:53:30 +02:00
Maxime Coste
9197dd393c
More refactoring of the diff code in order to make it cleaner
2017-07-18 16:11:24 +02:00
Maxime Coste
50fec86749
Change diff Implementation to use end indices instead of length
...
Having absolute begin and relative lenght was a bit strange to
work with. Rename middle_snake to snake.
2017-07-18 12:14:52 +02:00
Maxime Coste
793c2ed9cf
Slight style change
2017-07-17 19:29:57 +02:00
Maxime Coste
d90cd6de77
Refactor find_diff_rec and detect kept prefix/suffixes early
...
Certain cases, like diffing an empty buffer with a big buffer, were
very slow, now this should get better as we will directly detect the
matching eol at the end of both buffers, end then immediatly detect
we need to add the rest of the big buffer.
We still are too slow on some general diff when there is a lot of
differences.
2017-07-17 13:30:11 +02:00
Maxime Coste
388ada8142
Remove MirroredArray for diff implementation
...
We can index native arrays negatively, so just setup V1 and V2 to
point in the middle of the work arrays and remove the need for
creating MirroredArray.
2017-07-17 19:28:52 +09:00
Maxime Coste
da9794e272
Fix xmessage handling in assert.cc
...
The return value of the system call is not directly the exit value
of the process, but a status that needs to be inspected with some
macros.
2017-07-17 18:13:20 +09:00
Maxime Coste
a9455bf132
Tolerate that the cursor might not be visible
...
Sometimes, like if the window is not high enough, we might not be
able to display any buffer lines, hence not have the cursor visible.
Fixes #1502
2017-07-16 13:12:17 +09:00
Maxime Coste
5eae7aacc7
Small code cleanup in diff implementation
2017-07-15 17:17:27 +09:00
Maxime Coste
6e40e57ed4
Fix replacing reducing selections to their cursor
...
Broken by 8650c99f13
2017-07-14 16:16:43 +09:00
Maxime Coste
580eae0388
|
now applies the diff of the modification instead of plain replace
...
Fixes #312
Fixes #1501
2017-07-14 16:16:40 +09:00
Maxime Coste
8650c99f13
Fix assertion when replacing with empty strings
...
Replacing with empty strings is essentially a deletion, which means
it can end up push some selections out of the buffer (imagine 3 a
2 empty line buffer, and deleting the second one). We are fixing
the selections in SelectionList::erase, but we were not doing that
in SelectionList::insert.
Fixes #1504
2017-07-14 13:08:29 +09:00
Maxime Coste
53f5b3d709
Fix an assert in compute modified ranges when merging single char ranges
...
Due to the way Selection::min/max worked, we were creating backward
selections, with cursor < anchor, which was triggering an assert when
trying to move cursor back one char when it was already on the first
char of the buffer.
2017-07-14 12:42:43 +09:00
Maxime Coste
26cc8b3ee0
Fix undo handling in <a-o>/<a-O>
2017-07-13 08:24:55 +09:00
Delapouite
287a20c485
Add main selection index in mode_info
2017-07-12 19:08:13 +02:00
Maxime Coste
7389e37b4b
Small startup message formatting tweak
2017-07-13 00:31:17 +09:00
Maxime Coste
74076ef9b7
Alternative, and hopefully safer implementation of <a-o>/<a-O>
...
Fixes #1495
2017-07-11 22:35:42 +09:00
Maxime Coste
81b5de6fd8
Add <a-c> and <a-d> for changing/deleting without yanking
...
As asked for in #1175
2017-07-11 22:25:15 +09:00
Maxime Coste
42e5d95cd8
Preserve order of definition of mappings when listing them
...
Fixes #1479
Closes #1494
2017-07-11 09:51:56 +09:00
Maxime Coste
ebc1e054fc
Merge remote-tracking branch 'Delapouite/last-command-reg'
2017-07-11 09:11:10 +09:00
Maxime Coste
b575067317
Add <a-o> and <a-O> to add lines below/above selections
...
Fixes #1480
2017-07-11 09:03:45 +09:00
Delapouite
0d2b303f62
Docs: add missing colon register (last entered command)
2017-07-10 22:05:21 +02:00
Maxime Coste
c38dc9a37b
Merge remote-tracking branch 'Delapouite/alt-r'
2017-07-09 22:29:05 +09:00
Delapouite
f917402f89
Docs: add missing <a-R> key and fix info message
2017-07-09 12:00:28 +02:00
Maxime Coste
50e26a2bac
Remove assert in String::String(Codepoint, ColumnCount)
...
codepoint_width is locale dependent, and we could end up with it
returning a different value depending on the locale. It is better
to return a string of the wrong column length than fail on assert
in this case as we cannot fix it anyway.
Fixes #1489
2017-07-09 11:03:04 +09:00
Maxime Coste
dbba047a8a
Merge remote-tracking branch 'Delapouite/prompt-idle'
2017-07-08 13:33:44 +09:00
Maxime Coste
ad1dad9d04
Merge remote-tracking branch 'Delapouite/extend'
2017-07-08 13:32:11 +09:00
Maxime Coste
8cad40a0c9
Merge remote-tracking branch 'Delapouite/stars-less'
2017-07-08 13:31:17 +09:00
Maxime Coste
b51d19bfaa
Formatting fixes
2017-07-07 13:59:53 +09:00
Maxime Coste
6604aa66f7
Treat non printable characters as zero-width instead of -1 width
...
This fix a bug when opening a file where a line has a lot of unprintable
chars (like a binary file) which was confusing Kakoune into considering
that the line length in column was negative.
2017-07-07 10:57:32 +09:00
Delapouite
9254363673
Make register and completion autoinfo lists uniform with all the other ones
2017-07-06 18:47:02 +02:00
Delapouite
b3f2a7e46e
Refine info titles to distinguish f/t (select) and F/T (extend)
2017-07-05 20:23:02 +02:00
Delapouite
8ed29dbd7a
Docs: add missing PromptIdle hook mentions
2017-07-05 13:45:45 +02:00
Maxime Coste
620e718087
Formatting tweak
2017-06-29 09:31:02 +01:00
Maxime Coste
eb2984807c
Remove some dead code
2017-06-29 07:43:20 +01:00
Maxime Coste
e95fab0e7a
Code style tweak
2017-06-29 07:36:07 +01:00
Maxime Coste
14958a7c94
Validating an empty command in prompt reruns the last command
...
This is more consistent with other prompts like regexes or shells,
and has proven useful from time to time.
2017-06-29 07:33:16 +01:00
Maxime Coste
9bbab690ba
Merge remote-tracking branch 'danr/Expose-last-entered-command-in-register'
2017-06-29 07:29:32 +01:00
Maxime Coste
cc946764ed
Consider non-files buffers as never modified
2017-06-28 06:48:24 +01:00
Maxime Coste
641acc5943
Do not allow repeating last insert when we are not in normal mode
...
<a-;>. is not accepted anymore. Note that <a-;> are not repeatable
currently anyway (That could be fixed, athough not trivial).
Fixes #1469
2017-06-27 09:57:10 +01:00
Maxime Coste
ce8078ad73
Ensure cursor stays visible with wrapped line bigger than window
...
Fixes #1459
2017-06-27 09:29:25 +01:00
Maxime Coste
e9c0c05548
Fix reference highlighter not forwarding compute_display_setup
2017-06-26 16:50:12 +01:00
Maxime Coste
475e8849a1
Fix replacing last eol with a single eol
2017-06-26 16:16:46 +01:00
Maxime Coste
f41d78083a
Use the extra_word_chars option in word based normal commands
...
the completion_extra_word_chars is now gone, superseeded by
extra_word_chars that gets used both for completion and for normal mode.
Fixes #1304
2017-06-26 15:28:41 +01:00
Maxime Coste
dc378aed72
Pass a context instead of just the buffer to selector functions
2017-06-26 14:56:50 +01:00
Maxime Coste
477f0700f0
Remove useless Vector, use a ConstArrayView instead
2017-06-26 14:40:01 +01:00
Maxime Coste
268c214f56
Change completion_extra_word_char to be a list of codepoints instead of a string
2017-06-26 14:39:17 +01:00