Maxime Coste
f788333778
Formatting fix
2017-06-26 12:18:02 +01:00
Maxime Coste
4864c8cecb
Disable -Wunknown-attributes
2017-06-26 11:27:35 +01:00
Maxime Coste
4e7a357a47
Fix various undefined behaviours detected by UBSan
2017-06-26 11:27:18 +01:00
Maxime Coste
8a2ece78b7
Remember count when repeating last insert
...
Fixes #1465
2017-06-25 07:25:31 +01:00
Maxime Coste
c6eddefb0d
Slight code refactoring and perf improvement in vector option to string
2017-06-24 12:24:24 +01:00
Maxime Coste
dc1b039282
Add ctags command renaming info in the startup message
2017-06-23 10:23:26 +01:00
Maxime Coste
430e4495f0
Merge remote-tracking branch 'nuao/autoshowcompl_opt'
2017-06-23 10:20:34 +01:00
Maxime Coste
9d4f5a49e0
Merge remote-tracking branch 'lenormf/debug-commands'
2017-06-23 10:19:45 +01:00
Maxime Coste
806d885eaf
Do not set idle timers when running in a transient context
2017-06-23 10:01:24 +01:00
Maxime Coste
7ceb768a2e
Use an HashMap to store options in option manager
...
Turns out looking for options can get pretty slow, so O(1) lookup
seems better.
This should improve the performance of the #1460 issue
2017-06-23 09:54:21 +01:00
nuao
ddc846cf89
Use user-supplied autoshowcompl option's value.
2017-06-17 18:07:45 +01:00
Maxime Coste
657e30db1c
Use already stored coordinates in show_whitespaces
2017-06-17 14:48:59 +01:00
Maxime Coste
400f52c438
Merge remote-tracking branch 'EliteTK/fix-show_whitespaces-tab'
2017-06-17 14:47:18 +01:00
Tomasz Kramkowski
bd65719698
Correctly handle tabs when show_whitespaces is added
...
Tabs now align to tab stops instead of always spanning 8 spaces when
show_whitespaces is added as a highlighter.
This fixes issue #1453 .
A regression test is also provided.
2017-06-17 11:46:39 +01:00
Frank LENORMAND
dbabb19d81
src: Add profile-hash-maps
to the debug
command's docstring
2017-06-17 11:29:09 +03:00
Frank LENORMAND
8d24768d5d
src: Add a commands
debug flag
...
This commit allows setting the `commands` flag to the `debug` option, in
order to have the engine write on the *debug* buffer the commands that are
being executed, along with their arguments.
2017-06-17 11:27:07 +03:00
Maxime Coste
5fbaa2c955
Update startup info message
...
Remove some old breaking changes, add the lint/make/grep command
changes.
2017-06-17 08:47:14 +01:00
Maxime Coste
0aeb2cd64f
Disable -Wnoexcept-type warning
...
We dont really care that the mangled name will change, Kakoune is
not built as a library.
Fixes #1436
2017-06-17 08:15:32 +01:00
Maxime Coste
f0f2b1c383
Trim whitespaces surrounding docstrings
...
Closes #1439
2017-06-16 10:48:14 +01:00
Maxime Coste
ea105b9942
Add fallthrough comment to silence gcc-7 warning
...
Until we switch to C++17 and can use the proper attributes there.
Fixes #1437
2017-06-16 10:28:40 +01:00
Maxime Coste
42d7b66b92
Support hitting escape to cancel a selection combine operation
...
Fixes #1443
2017-06-16 10:23:03 +01:00
Maxime Coste
42f03fb71f
Hide info/menu when they are anchored to an invisible buffer coord
...
Fixes #1444
2017-06-16 10:19:08 +01:00
Maxime Coste
2992d5bb0b
Fix some remaining uses of invalid atom coordinates
2017-06-16 08:06:24 +01:00
Maxime Coste
4ed790632d
Fix some other uses of invalid buffer coordinates in display code
2017-06-15 18:12:21 +01:00
Maxime Coste
fa4b88c2f8
Move tolerance for one past end of line coordinates to highlighter code
...
The rest of Kakoune's code now requires coord passed to Buffer::iterator_at
to be valid.
2017-06-15 17:43:18 +01:00
Maxime Coste
01a1e92b79
Fix crash recently introduced when deleting at buffer start in insert mode
2017-06-15 17:35:48 +01:00
Maxime Coste
e6c4bed42b
Go back to window lines ending at one past the end of the buffer line
...
Change Buffer::iterator_at so that this case is tolerated, and fixes
the coord to next line start instead of clamping to last line char.
2017-06-15 17:25:37 +01:00
Maxime Coste
724b4198b0
Change window display to not use invalid buffer coordinates
...
Fixes #1435
2017-06-15 16:48:16 +01:00
Maxime Coste
40f845d77e
Respect scroll offset even when wrapping lines
...
Fixes #1433 although in a slightly different way than requested:
We ensure that scrolloff *displayed* lines are visible below the
cursor, not scrolloff *buffer* lines.
2017-06-15 12:29:34 +01:00
Maxime Coste
98627726cf
Always store InclusiveBufferRange with first < second
...
Closes #1434
2017-06-13 09:00:55 +01:00
Maxime Coste
ab56be090a
minor style tweak
2017-06-12 06:12:10 +01:00
Maxime Coste
208b28cbe7
Simplify a bit buffer iteration functions
...
Dont try to ensure the returned value is valid, incrementing past
the end/decrementing before begin is the caller's error.
2017-06-12 06:10:18 +01:00
Maxime Coste
250886a9e1
Use read_fd to get pipe command from stdin instead of ad-hoc code
...
read_fd will also now throw on read error instead of just returning
the data read so far as if nothing failed.
2017-06-12 05:21:34 +01:00
Maxime Coste
7bcfbd055c
Fix corner case in compute_modified_ranges
2017-06-11 12:25:12 +01:00
Maxime Coste
63a791d651
Fix the Buffer::end() madness
...
Until now, buffer had multiple recognized end coordinates, either
{ line_count, 0 } or { line_count - 1, line[line_count - 1].length }.
Now the only correct end coord is { line_count, 0 }, removing the need
for various special cases.
2017-06-11 12:01:40 +01:00
Maxime Coste
d86a612774
Fix wrapping support
2017-06-09 16:00:22 +01:00
Maxime Coste
0dec1e3a91
Remove unused only_buffer mode for DisplayLine::trim
2017-06-09 15:30:13 +01:00
Maxime Coste
7b9d8d39b1
Simplify column highlighter and make it more robust
...
Fixes #1382
2017-06-09 15:24:07 +01:00
Maxime Coste
3612eb50e5
Fix bug in word completer
...
A bug could be triggered in the word completer when a multiselection
would trigger word completion with one selection being at buffer first
character.
2017-06-09 14:21:18 +01:00
Maxime Coste
64aa6f3fb4
Proper linear time insert completion insertion
...
The previous solution, ad9b090ddf
, was
failing when completion was not replacing any text, as going through
SelectionList was not permitting to replace empty ranges.
Handle replacement as first a deletion then an insert to get fast
update, as having a list of forward deletions and then a list
for forwad insertion is much faster to update than a list of
interleaved delete/insert.
2017-06-09 14:13:43 +01:00
Maxime Coste
f310db639c
Rework partial line display logic
...
Instead of highlighting full lines and then trim them to make them
fit in the window, highlight only the visible portion, and rely on
the compute_display_setup system introduced for wrapping to setup
our buffer range correctly
2017-06-09 13:22:32 +01:00
Maxime Coste
242f951c84
More explicit and simpler code
2017-06-09 09:54:18 +01:00
Maxime Coste
fe46c05685
Remove spurious double underscore
2017-06-08 10:37:48 +01:00
Maxime Coste
2b5fafa909
Do not show startup info when piping into kak
...
Fixes #1340
2017-06-08 10:03:07 +01:00
Maxime Coste
ad9b090ddf
Fix quadratic behaviour in when selecting an insert completion
...
Use the fast, linear time SelectionList::insert algorithm instead of
an ad-hoc one that needs to call SelectionList::update after each
modification of the buffer.
Fixes #1417
2017-06-08 09:55:34 +01:00
Maxime Coste
4ab40af3a9
Disable idle timers on all transient contexts
2017-06-08 09:53:23 +01:00
Maxime Coste
609b0bbbac
Merge remote-tracking branch 'Delapouite/rotate-forward'
2017-06-08 07:14:20 +01:00
Maxime Coste
eadf8930fb
Add -width <max_width>
support in the wrap highlighter
...
Will always wrap at the minimum between max_width and actual window
width.
Fixes #1424
2017-06-08 07:05:44 +01:00
Maxime Coste
acc2dbf79c
Move variable closer to its point of use
2017-06-07 20:33:34 +01:00
Maxime Coste
56b52bdb3d
Filter debug buffers before creating the SafePtr vector in -buffer *
2017-06-07 20:25:39 +01:00