Maxime Coste
565d835d57
Fix option name in haskell.kak
2017-01-29 16:10:48 +00:00
Maxime Coste
0051a4f896
Remove unneeded assignment to null in RefPtr::release
2017-01-29 14:26:41 +00:00
Maxime Coste
2052b225d9
Detect too deep command call stack
...
Fixes #1163
2017-01-29 13:56:05 +00:00
Maxime Coste
753f3a50d1
Make StringView and unit types trivial types
2017-01-29 13:49:45 +00:00
Maxime Coste
0cb192921a
Remove unused WindowAndSelections timestamp field
...
The SelectionList already has a timestamp.
2017-01-29 12:50:16 +00:00
Maxime Coste
2b6fc6beb7
Remove unused Diff::posA field
2017-01-29 12:49:52 +00:00
Maxime Coste
68b92b9ac1
Make BufferIterator only a bidirectional iterator
...
Distance computation is too expensive on BufferIterators to
treat them as random access.
2017-01-28 13:06:03 +00:00
Maxime Coste
072064407a
Remove hash from StringData
...
Maintaining the hash value of strings is not worth it as we only
use it for buffer reload, but pay for it on any buffer modifications.
2017-01-28 13:04:55 +00:00
Maxime Coste
125c8b7e80
Fix fifo reading not handling potential errors from the read call
...
Fixes #1153
2017-01-25 13:55:20 +00:00
Maxime Coste
aa7241067e
Only restore cursor position after an append if we still have cursor > anchor
...
Fixes #1158
2017-01-25 13:36:06 +00:00
Maxime Coste
ebcfba12f6
Add a RawKey
hook for raw user input hooking
...
Fixes #1132
2017-01-24 23:57:36 +00:00
Maxime Coste
8a62ec12af
Fix shell context capture that was accessing dead parameters
...
Fixes #1156
2017-01-24 20:20:50 +00:00
Maxime Coste
bbbb513990
Fix crash when clearing a regex prompt with multiple selections
...
Fixes #1124
2017-01-24 19:18:29 +00:00
Maxime Coste
7ba24c043a
Add gi
to go to first non-blank character on line
...
Fixes #407
2017-01-22 23:53:08 +00:00
Maxime Coste
66e422e397
Fix client destruction when there is an InsertMode mode still alive
2017-01-22 12:19:23 +00:00
Maxime Coste
e8ee8c23d8
Support the +line syntax for clients as well.
...
Fix a crash on daemon quit as well.
2017-01-21 12:17:49 +00:00
Maxime Coste
c6a7924b80
Fix SafeCountable callstack tracking
2017-01-21 12:10:24 +00:00
Maxime Coste
6f4515f005
Only touch new clients selections when target coord are explicit
...
Do not implicitely change new clients selections to target coordinates
when the user did not specify them, so that we can re-use the selections
from the found free window, which is the generally desired behaviour.
2017-01-19 18:44:26 +00:00
Maxime Coste
7316afd17b
Use ints instead of unsigned for capture count
2017-01-16 18:49:27 +00:00
Maxime Coste
c24a636cb9
Fix regex search/select not restoring initial selections on abort
...
And incrementally set the search register for select/split as well
2017-01-16 13:57:14 +00:00
Frank LENORMAND
0b22938bce
Remove the option that excludes the -pedantic
flag from CXXFLAGS
...
Allowing compilation without the `-pedantic` flag was a temporary trick
to work around a bug involving `libstdc++` and `musl`. A fix has been
pushed for the issue in the appropriate repositories, we no longer need
the optional non-pedantic compilation option.
2017-01-14 11:55:20 +03:00
Maxime Coste
e7e72747ed
Update ranges highlighter options according to buffer changes
2017-01-13 13:52:55 +00:00
Maxime Coste
ffc362cf9e
Propagate ShellContext custom env-vars through custom commands
...
Fixes #1131
2017-01-13 00:26:43 +00:00
Maxime Coste
4916ea1766
Fix capture group handling
...
Fixes #1129
2017-01-13 00:17:31 +00:00
Maxime Coste
8c55acb076
Detect empty selection lists when restoring selections from registers
...
Fixes #1123
2017-01-11 13:43:41 +00:00
Maxime Coste
343df600cb
Merge remote-tracking branch 'alexherbo2/command-names'
2017-01-10 13:44:11 +00:00
Maxime Coste
fb773367e7
Merge remote-tracking branch 'Delapouite/pipe-register'
2017-01-10 13:35:44 +00:00
Maxime Coste
37fbe6c6eb
Treat <c-h> as backspace in ncurses ui
...
Fixes #1030
2017-01-10 13:35:10 +00:00
Delapouite
f51d03b0d8
Fix: add missing pipe register in info
2017-01-10 12:34:37 +01:00
Maxime Coste
9f0bca53c4
Small code cleanups
2017-01-08 23:26:15 +00:00
Maxime Coste
dcd8f6ef01
Apply clang-tidy modernize to the codebase
2017-01-08 22:39:01 +00:00
Maxime Coste
f9f11aa762
Make the currently sourced file path available through $kak_source
...
The :source command sets an 'source' value to the real path of the
file getting sourced while its commands are executed.
Fixes #1112
2017-01-06 19:46:47 +00:00
Maxime Coste
3123dbf4c2
Merge branch 'master' of git://github.com/hoop33/kakoune
2017-01-05 14:36:55 +00:00
Rob Warner
48d5e5b5a9
Use PREFIX to locate ncurses and boost on macOS
2017-01-05 09:30:58 -05:00
Maxime Coste
d991420140
Higher level implementation of attributes to json formatting
2017-01-04 23:19:18 +00:00
Rob Warner
a680d419e7
Allow non-standard homebrew location for boost and ncurses linking
2017-01-04 15:38:37 -05:00
Alex Leferry 2
671b50bb52
update command names
2017-01-04 13:04:27 +01:00
Maxime Coste
b3674a2f03
Add Modal
InfoStyle used for bufer reload info box
...
Modal info style wont be replaced by other info boxes.
NCursesUI will center that info box.
Fixes #1060
2017-01-04 11:39:51 +00:00
Maxime Coste
1b9f363225
Fix bug relying on undefined arg evaluation order.
2017-01-03 23:17:08 +00:00
Maxime Coste
4295736c97
Fix handling of main selection when copying selection to next/previous lines
...
Fixes #1095
2017-01-03 18:41:45 +00:00
Maxime Coste
fc4dc93209
Merge remote-tracking branch 'casimir/makefile-osx'
2017-01-02 11:13:24 +00:00
Maxime Coste
20c47b8d61
better support for plain pointer iterators in containers.hh
...
use std::iterator_traits<T>::value_type instead of T::value_type
that will fail when T is not of class type.
2017-01-02 05:13:58 +00:00
Maxime Coste
ac1192f58a
Ensure <esc> cancels in replace with char
...
After recent changes that associated <esc> with the 0x1b codepoint
r<esc> would replace each char with 0x1b instead of canceling the
replace command.
2017-01-02 04:03:02 +00:00
Maxime Coste
3c1f606a22
Move some template code out of selectors.hh into selectors.cc
2017-01-01 19:30:02 +00:00
Maxime Coste
cd89531bd9
Better handling of linewise inserting when we have multiple selections per line
...
Fixes #1053
2017-01-01 18:08:43 +00:00
Maxime Coste
cdb2c766a5
Refactor SelectionList::insert a bit
2017-01-01 17:31:47 +00:00
Maxime Coste
69789d4793
When inserting at the end, store the next line as end pos in the change
2017-01-01 16:32:04 +00:00
Maxime Coste
e42881fa38
Fix remaining uses of hardcoded /tmp to get the socket paths
...
Fixes #1097
2017-01-01 13:10:08 +00:00
Maxime Coste
968e573d80
Slight code refactor for paste handling
2017-01-01 12:58:04 +00:00
Martin Chaine
7b60ae0b5a
use explicit flags for homebrew's boost on osx
2016-12-30 19:32:18 +01:00
Maxime Coste
76c58aa022
Dont use constexpr to fix OSX compilation
2016-12-30 13:29:57 +00:00
Maxime Coste
190a04d6c8
Add a ncurses_change_colors option that can disable color palette change
...
Closes #1057
2016-12-30 07:01:13 +00:00
Maxime Coste
ea6994dd3b
Use a struct WorstMatch instead of varargs for the fallback option_add
...
varargs cannot handle non pod types.
2016-12-30 06:43:32 +00:00
Maxime Coste
4f98677642
Use 'not empty' in place of 'length > 0'
2016-12-27 22:01:11 +00:00
Maxime Coste
84c2ca1cdc
Merge remote-tracking branch 'leira/empty_param_crash'
2016-12-27 22:00:32 +00:00
Maxime Coste
923665fab4
Merge remote-tracking branch 'kballard/readonly_warning_msg'
2016-12-27 21:54:26 +00:00
Maxime Coste
243bcf6a6d
Support set -add on flag types
...
Fixes #1082
2016-12-27 21:52:53 +00:00
Kevin Ballard
b0c2444466
Change the message when entering insert mode while readonly
2016-12-27 12:23:15 -08:00
Maxime Coste
6beb9b6f02
Fix unmap 4th argument not being optional
...
Fixes #1078
2016-12-27 06:49:35 +00:00
Maxime Coste
fcd99d9c22
Use absolute distance for relative line numbering
...
Closes #1068
2016-12-26 22:10:25 +00:00
Leira Hua
f79018cffd
Added string length check when checking switch params
...
Fixes #1051
2016-12-24 17:42:31 -08:00
Maxime Coste
25451ac112
Set the register incrementally as well during incremental search
...
Fixes #1054
2016-12-23 20:46:50 +00:00
Maxime Coste
33eb93b619
Skip debug buffer when cycling through the buffer list
...
Fixes #1059
2016-12-23 16:37:54 +00:00
Maxime Coste
d17bed9b80
Display the command prompt in error face when the command is not found
...
Fixes #1021
2016-12-23 16:23:31 +00:00
Maxime Coste
62df6dbb46
Display a message when entering insert mode while readonly
...
Fixes #1050
2016-12-21 06:39:58 +00:00
Maxime Coste
3a6167ae62
Merge branch 'master' of git://github.com/akkartik/kakoune
2016-12-20 20:15:54 +00:00
Maxime Coste
0daf7af493
Fix getting path confstr, the returned size includes the zero terminator
...
Closes #1047
2016-12-20 20:14:35 +00:00
Kartik K. Agaram
0a21426d58
Remain silent on exit without error.
2016-12-20 10:11:13 -08:00
Maxime Coste
c2305e03b3
Small formatting tweak
2016-12-20 12:57:48 +00:00
Maxime Coste
fdb2d83ea1
Ensure we have an EOL after error messages
2016-12-20 12:49:05 +00:00
Maxime Coste
b7a0aa7546
Ensure we return 0 on exit from graceful disconnection
...
Fixes #1042
2016-12-20 10:34:48 +00:00
Maxime Coste
4b696836d1
Fix hardcoded uses of "/tmp"
...
Closes #1032
2016-12-20 04:04:47 +00:00
Maxime Coste
cf10f3f0a0
Fix join, we dont have a StringView from char array constructor
2016-12-17 06:06:07 +00:00
Maxime Coste
2bdd361948
Escape the backslash chars as well when joining strings
...
Fixes #1014
2016-12-17 05:48:42 +00:00
Maxime Coste
dc84cdd538
Add more diagnostic information when failing to bind/listen to socket
2016-12-17 05:46:04 +00:00
Maxime Coste
28ddb3cb1f
Ignore eventual / suffix in TMPDIR
2016-12-17 05:25:43 +00:00
Maxime Coste
831887cd3a
Improve general security of the unix sockets
...
* Use the stricky bit on the shared kakoune folder
* Do not allow read/write access to user folder
* Respect $TMPDIR when set
Fixes #1007
2016-12-15 23:47:34 +00:00
Maxime Coste
9a879262a2
Use a POSIX guaranteed way of getting the shell path
2016-12-15 23:04:53 +00:00
Maxime Coste
4fd12164dd
Merge remote-tracking branch 'Delapouite/prompt'
2016-12-15 13:50:12 +00:00
Delapouite
99f38c99ec
Fix :prompt command description
2016-12-15 14:42:46 +01:00
Maxime Coste
71cc9f1011
Fix reentrancy in InputeModes::Normal::on_key
2016-12-15 09:46:10 +00:00
Maxime Coste
9ad1c19f69
Validate user text object desc more thorougly
...
Fixes #992
Fixes #993
Fixes #994
2016-12-15 09:29:38 +00:00
Maxime Coste
430ff37bd6
Fix regex.hh compilation
...
Repeat after me: I will not blindly push commits that I havent
compiled.
Fixes #990
2016-12-14 23:50:29 +00:00
Maxime Coste
fd82d3e258
Make Regex a class rather than a struct to avoid mismatched tags warnings
2016-12-14 20:59:39 +00:00
Maxime Coste
377046e315
Handle correctly cases where codepoint_width returns -1
...
Fixes #972
2016-12-14 13:53:30 +00:00
Maxime Coste
dfb030da6e
Make container wrapper callback functions mutable
...
It seems at least std::mem_fn callable wrapper type call operator
is not guaranteed to be const, so we need to be able to call on
a non const object. This should do for now.
Fixes #978
2016-12-14 13:25:55 +00:00
Maxime Coste
85a534fb8a
Support inserting esc characters through <c-v>
...
As requested in #960
2016-12-14 00:34:53 +00:00
Maxime Coste
735b1e1dc5
Add support for readline like <c-k> and <c-u> in prompts
2016-12-14 00:28:46 +00:00
Maxime Coste
e44129577a
Fix one definition rule violation in ncurses_ui.hh
...
The memory domain of Vector<DisplayBuffer> was different depending
on if display_buffer.hh has been included or not.
2016-12-10 13:43:41 +00:00
Maxime Coste
5d9f3b7f3f
Ensure the line is correctly clamped in scroll_window
...
Seems like the previous implementation was not always doing that
correctly, so just use an obviously correct method.
Fixes #951
2016-12-10 13:33:42 +00:00
Maxime Coste
03eb128536
Ensure content of expanded strings in modelinefmt is not interpreted as markup
2016-12-07 20:07:32 +00:00
Maxime Coste
bc8b30c988
Replace some string concatenations with a format call
2016-12-07 13:57:16 +00:00
Maxime Coste
1383614a5f
Fix markup parsing handling of antislash escapes
...
Antislashes did not need to immediately precede a face spec to
escape it, it could be in any characters before it.
2016-12-07 13:43:27 +00:00
Maxime Coste
2f704eab16
Small command parsing refactoring
2016-12-07 13:26:11 +00:00
Maxime Coste
d9679db9b6
Fix scrolling generating invalid buffer coordinates
2016-12-07 00:08:41 +00:00
Maxime Coste
a320dcec28
Small formating fix
2016-12-06 23:08:18 +00:00
Maxime Coste
e9349cdc92
Ensure timers are still alive when trying to run them
2016-12-06 13:55:53 +00:00
Maxime Coste
b3ac733f33
Fix buffer reload info box not being shown anymore
2016-12-05 23:40:23 +00:00
Maxime Coste
9a986b8d47
Hide eventual info box when returning to normal mode
2016-12-04 23:27:04 +00:00
Maxime Coste
4d538fb423
Only hide menu/info if the insert completer did display it
...
Avoid hiding info boxes opened by other places in the code.
2016-12-04 13:37:33 +00:00
Maxime Coste
e2fae522e5
Small include fix
2016-12-03 13:18:11 +00:00
Maxime Coste
bc8c5522e2
Change ValueId to just be an enum class, it does not need any operators
2016-12-03 13:17:42 +00:00
Maxime Coste
8a74ef9804
Read as much as possible data from shell processes on each read event
...
We were reading at most 1024 bytes every time, going back to the event
loop.
2016-12-03 12:41:36 +00:00
Maxime Coste
75986911f8
Refactor RefPtr handling to use a policy class
...
THe previous overload based system was pretty complex for no good
reason.
2016-12-03 12:32:16 +00:00
Maxime Coste
5ff8245cc8
Display non breaking spaces with ⍽ in show_whitespaces hihglighter
...
Fixes #167
2016-12-02 13:59:34 +00:00
Maxime Coste
089ee8ac0a
Fix crash when quitting the first client while another client is connected
2016-12-01 20:55:28 +00:00
Maxime Coste
a65e8142f3
Rework handling of initial coordinates so that init commands can change them
...
Fixes #944
2016-12-01 20:55:20 +00:00
Maxime Coste
8c862c4eea
Only write to remote socket when we know they are writable
...
Buffer data (in an horribly innefficient way for now), and use the
event manager to watch for the socket being ready for a write.
Fixes #945
2016-12-01 20:11:09 +00:00
Maxime Coste
95c1528342
Fix crash when a client sends a packet advertising a wrong size
...
If the given size is less than the header size, the message is
clearly invalid, disconnect the client in that case.
2016-12-01 19:45:23 +00:00
Maxime Coste
7defdd3039
Make FDWatcher support Read, Write and Except events, instead of just Read
2016-12-01 19:44:07 +00:00
Maxime Coste
99a3388e41
Hide the waiting for shell message once the shell returns
2016-11-30 13:46:20 +00:00
Maxime Coste
61b3dfd184
Use a Timer for Shell waiting notification
...
Without a timer we were relying on other event sources to wake us
up to display the information, which was usually a NormalIdle or
a filesystem check timer.
2016-11-30 09:55:05 +00:00
Maxime Coste
540e504e68
Ensure all available input is handled before going back to main loop
...
We were not handling keys that could have been generated while handling
other keys (like during a shell evaluation).
2016-11-30 09:47:38 +00:00
Maxime Coste
3a81260917
Simplify greatly UI input handling
...
This round trip through an input callback expected to call
is_key_available and get_key was overcomplicated, just send the
keys as they arrive, the client is already buffering due to urgent
event mode.
2016-11-29 21:59:36 +00:00
Maxime Coste
2fd1414b05
Clean up includes of user_interface.hh
2016-11-29 19:53:11 +00:00
Maxime Coste
0dff8a7d3f
Small remote code cleanup
2016-11-29 19:52:57 +00:00
Maxime Coste
db86c6cbc9
Small cleanup in BufferManager code
2016-11-29 19:12:10 +00:00
Maxime Coste
12856066b1
Cleanup include dependencies a bit
2016-11-28 23:58:08 +00:00
Maxime Coste
da6d7f4530
Always consider end of selection is not and eol for keep
...
Fixes #921
2016-11-28 21:07:24 +00:00
Maxime Coste
719eb16a5e
Fix matching flags not being forwarded to regex_search
...
Still does not fully fix #921
2016-11-28 20:02:40 +00:00
Maxime Coste
2f3a7112ea
Add more memory domains to certain data
2016-11-28 13:59:55 +00:00
Maxime Coste
54d540021c
Add support for mouse in insert mode
...
Fixes #940
2016-11-28 13:15:12 +00:00
Maxime Coste
a4738ace5f
:prompt and :onkey (renamed :on-key) now use values instead of registers
...
:prompt provides the entered text in the `text` value, :on-key provides
the entered key in the `key` value.
Closes #938
2016-11-27 20:57:04 +00:00
Maxime Coste
b337f99ca7
Add a 'keys' debug flag, showing the keystrokes comming to clients
2016-11-26 13:29:17 +00:00
Maxime Coste
e340e0ed39
Forward client name to contexts created for write-all
...
Fixes #937
2016-11-24 13:35:42 +00:00
Maxime Coste
8f2c6eb586
Fix write_all_buffers when BufWrite... hooks create/delete buffers
...
The buffer list can be mutated during iteration, so it is no safe
to directly iterate on the BufferManager, we need to first create
our own copy of the buffer list.
Fixes #935
2016-11-23 23:51:16 +00:00
Maxime Coste
b884b499dd
Rework ensure_all_buffers_are_saved to remove an unneeded Vector
2016-11-23 23:39:42 +00:00
Maxime Coste
1ccccbce04
Fix horrible leak in String::Data::operator=(String::Data&&)
...
And that, my friends, is why we recommend using standard containers
instead of rolling your own.
2016-11-23 01:09:09 +00:00
Maxime Coste
03dcfb2574
Small code tweak
2016-11-23 00:22:37 +00:00
Maxime Coste
ca0606017f
Small code refactoring
2016-11-22 23:51:09 +00:00
Maxime Coste
3f3ed0b333
Fix literal type that must be 64 bits
2016-11-22 22:20:30 +00:00
Maxime Coste
d15cc02c01
Remove some unneeded headers from ncurses_ui.cc
2016-11-22 09:49:55 +00:00
Maxime Coste
0b806cd4f1
Add missing hooks to completion list and validate hook name in hook cmd
2016-11-21 09:51:47 +00:00
Maxime Coste
be03fdce2a
Support completing hook names
...
Fixes #879
2016-11-20 11:17:13 +00:00
Maxime Coste
cd8d51af34
Fix PerArgumentCommandCompleter when completing the non first arg
...
The actualy query passed was always the first argument.
2016-11-20 11:16:34 +00:00
Maxime Coste
47a82b9855
Make ArrayView::subrange size arguement optional
2016-11-20 11:15:15 +00:00
Maxime Coste
67eb19c6d2
Only rely on ignored_files
option to remove hidden files, no built in logic
...
Fixes #929
2016-11-18 09:38:48 +00:00
Maxime Coste
4a2fea8c9e
Continue command renaming to improve consistency
2016-11-15 13:49:06 +00:00
Maxime Coste
6d79ade019
Tweak RankedMatch behaviour and fix bug in its comparison function
...
casting TestableFlag<T> to UnderlyingType<T> was going through bool
conversion... Not sure how things worked earlier.
2016-11-14 19:39:35 +00:00
Maxime Coste
b3ba769220
Propagate the hooks disabled state through prompt, menu, and command execution
...
Maintain it as well during buffer creation even if the hooks are not executed
in client context.
Fixes #818
2016-11-14 19:39:35 +00:00
Maxime Coste
c2989704d5
More correct handling of SIGHUP while suspended
...
Fixes #833
2016-11-14 00:49:34 +00:00
Maxime Coste
5249df78d4
Do not include aliases in command completion candidates anymore
...
Fuzzy matching makes it redundant.
Closes #817
2016-11-14 00:29:43 +00:00
Maxime Coste
dcd733e5fa
Do a first phase of command renaming
2016-11-14 00:27:14 +00:00
Maxime Coste
9d9beb7e3a
Pass regex flags on keep matching/not matching
...
Related to #921
2016-11-12 18:03:54 +00:00
Maxime Coste
8490caa0d7
Add support for <a-Z> appending current selections to the given register
2016-11-09 13:57:05 +00:00
Maxime Coste
9153663dfa
Add -save-regs defaults in the context wrap docstring
2016-11-08 09:49:48 +00:00
Maxime Coste
6889494869
Emit an OSC 104 on quit to reset color palette on supporting terminals
...
xterm and vte based terminals support it, unfortunately rxvt-unicode
does not yet.
Fixes #914
2016-11-05 11:43:25 +00:00
Maxime Coste
8e5f491d3f
Support deleting a buffer even if another client is in insert mode on it
2016-11-05 11:29:47 +00:00
Maxime Coste
bc2d79d302
Run WinDisplay hook on creation of clients
...
Fixes #913
2016-11-03 19:09:52 +00:00
Maxime Coste
6347787cf2
Propagate NormalParams to user mappings
...
Closes #896
2016-11-02 23:12:57 +00:00
Maxime Coste
4d222bbb33
Add experimental static linking support to the makefile
2016-11-02 22:28:05 +00:00
Nikolaus Wittenstein
e7970232d3
Fix typo in write_cmd's desc
...
Should be possessive "its".
2016-10-31 12:42:10 -04:00
Maxime Coste
650a989c1e
Add to_string(long long int) overload to fix OSX compilation
2016-10-31 10:19:06 +00:00
Maxime Coste
a7cac87753
Display a status line message when Kakoune is waiting on a shell to complete
...
If a shell commands takes more than 1s to execute, a message will appear
on the status line notifying the user, along with the time Kakoune has
been waiting for.
2016-10-29 11:25:58 +01:00
Maxime Coste
965cd8e0c3
Fix align support with aligntab = true
2016-10-28 09:50:25 +01:00
Maxime Coste
7c6c6871ce
BufferRange option syntax support <line>.<column>+<len> and is inclusive
...
Fixes #864
2016-10-26 22:58:12 +01:00
Maxime Coste
dc18963875
Make o/O open multiple lines when a count is given
...
Fixes #873
2016-10-24 20:45:12 +01:00
Maxime Coste
7a04efb6d9
Force wrapping when searching from buffer end
...
Fixes #868
2016-10-23 21:03:15 +01:00
Maxime Coste
2809ce00de
Set main selection index to the current sel when piping different selections
...
Fixes #884
2016-10-23 19:54:40 +01:00
Maxime Coste
d2aa292c17
Change handling of OpenLineAbove to fix first line edge cases
...
Fixes #877
2016-10-23 19:48:16 +01:00
Maxime Coste
28db6f04f1
Re-enable undo support on fifo buffers when the fifo closes
...
Fixes #881
2016-10-23 18:22:42 +01:00
Maxime Coste
e318190a59
Small formatting tweak
2016-10-17 18:37:05 +01:00
Maxime Coste
e8dcdb6072
Support Ctrl + mouse dragging to add a new selection
...
Fixes #838
2016-10-13 22:59:02 +01:00
Maxime Coste
cc2affea11
Always allow to delete a buffer, just recreate a scratch buffer if needed
...
Fixes #850
2016-10-13 21:37:44 +01:00
Maxime Coste
6bfc68d4f3
Rename DisplayAtom::Types to avoid conflicts with struct BufferRange
2016-10-13 19:55:15 +01:00
Maxime Coste
1f3e424047
Do not expand filenames when doing insert filename completion
...
Fixes #855
2016-10-13 19:46:09 +01:00
Maxime Coste
e384e7263c
Use CPPFLAGS instead of CXXFLAGS for the _XOPEN_SOURCE define
2016-10-13 00:19:27 +01:00
Frank LENORMAND
f7e2bfd76f
Document the optional parameter of the cd
command
2016-10-11 10:39:20 +03:00
Maxime Coste
5440d31f99
Only create a default *scratch* when we dont have any non debug buffers
...
Fixes #852
Closes #856
2016-10-11 00:45:05 +01:00
Maxime Coste
780a4605fa
More transform(...) filter cleanup using mem_fn when possible
2016-10-11 00:32:40 +01:00
Maxime Coste
8b6eba8208
Add support for repeating the last object/char find command
...
This is a potential solution for #794 .
2016-10-11 00:20:36 +01:00
Maxime Coste
f6cdc2eee5
Use std::begin/std::end in containers.hh instead of the method version
2016-10-11 00:17:00 +01:00
Maxime Coste
025b91baca
Convert some uses of lambda to more concise std::mem_fn
2016-10-10 23:44:18 +01:00
Maxime Coste
bc9d1b4dac
Small formatting fixup
2016-10-10 23:20:05 +01:00
Maxime Coste
0d2bb4756b
Fix register alternate name doc and dash -> hash for '#'
2016-10-10 23:19:57 +01:00
Maxime Coste
10681f4809
Merge remote-tracking branch 'Delapouite/typo'
2016-10-09 23:30:00 +01:00
Maxime Coste
314108e539
Document register alternate names and add some missing ones
...
Fixes #853
2016-10-09 23:27:52 +01:00
Maxime Coste
f904402486
Handle all available keys when a RemoteClient input is available
...
We were just treating the next key. Which led to <esc> byte
remaining after suspend, that led that <esc> being interpretted
as <alt> when the following key got available.
Fixes #739
2016-10-06 23:47:44 +01:00
Maxime Coste
006be63a32
Ensure local client is destroyed before we fork the server to background
...
The recent change that introduced defered client deletion made the local
client destruction happens too late, putting the terminal in a bad state
when we resumed the process as client only.
2016-10-06 23:35:32 +01:00
Maxime Coste
5dd47e9c33
Preserve shell context through eval command
...
Fixes #835
2016-10-06 23:22:39 +01:00
Delapouite
acafe5f0b9
Fix typo horzontally → horizontally
2016-10-06 16:13:40 +02:00
Maxime Coste
9078039326
Fix select_to_previous_word with spaces at buffer start
...
Fixes #844
2016-10-05 23:42:36 +01:00
Maxime Coste
8579e299da
Fix custom text object
2016-10-05 09:36:39 +01:00
Maxime Coste
f81b8c137b
Replace non ascii chars with ? in xterm title, and limit to 511 chars
...
Closes #839
2016-10-04 20:13:15 +01:00
Maxime Coste
d2a324d3c4
Treat '\n' as 1 column wide
...
Fixes #842
2016-10-04 19:37:43 +01:00
Maxime Coste
40fb56c87a
Small code cleanup
2016-10-04 19:37:17 +01:00
Maxime Coste
620fc28ea6
Add "(extend)" to search prompts when we are extending the selection
...
Fixes #832
2016-10-04 13:18:03 +01:00
Maxime Coste
9e12ac327b
Refactor hook disabling in normal mode
...
Normal mode takes care of keeping hooks disabled until nested modes
finishes.
Requiered form #818 , not sufficient yet.
2016-10-03 20:02:37 +01:00
Maxime Coste
a51d5a1046
Do not select the next word for inner word.
2016-10-03 20:01:37 +01:00
Maxime Coste
c7356c8e9c
Close write buffer file descriptor before getting the new fs timestamp
2016-10-03 20:00:36 +01:00
Maxime Coste
d50087eabe
Change BufWritePre/BufWritePost logic
...
Run them in client context if possible, and give them the target
filename instead of the buffer name.
Fixes #823
2016-10-01 23:51:53 +01:00
Maxime Coste
4b6d4ec8eb
Small refactoring in highlighters.cc
2016-10-01 14:12:21 +01:00
Maxime Coste
8cc30a8ca0
Enable _XOPEN_SOURCE=700 on cygwin to get the wcwidth function
2016-10-01 13:46:55 +01:00
Maxime Coste
249ec4835e
Rename get_width to codepoint_width
2016-10-01 13:45:00 +01:00
Maxime Coste
28cfd0bb61
Fix get_column function and add some unit tests for fullwidth text
2016-10-01 13:45:00 +01:00
Maxime Coste
35559b65dd
Support codepoints of variable width
...
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes #811
2016-10-01 13:45:00 +01:00
Maxime Coste
dc735450a8
Tweak ranked match comparison, give contiguous matches an edge
2016-09-30 22:13:01 +01:00
Maxime Coste
e701254b02
Fix String::Data::reserve on big endian platforms, and document String::Data
...
reserve was not ensuring the capacity would be pair, which is needed
on big endian machines, as we use its least significant bit to flag
short string optimizations. On little endian the bit we use is the
8th most significant (the least significant bit of the last byte),
so we were not hitting any problems.
Fixes #828
2016-09-28 19:06:25 +01:00
Maxime Coste
1b9eb2c6ba
Validate option names to be in [a-zA-Z0-9_]
...
Closes #824
2016-09-27 09:54:55 +01:00
Maxime Coste
e3c4bddd3b
Make hook disabling work for all hooks, not only user hooks
...
Fixes #823
2016-09-26 23:43:05 +01:00
Maxime Coste
696db111e2
Selecting 'around' word when on spaces after word now selects next word
2016-09-26 23:33:28 +01:00
Maxime Coste
fcb37cc754
Pass count to all object selectors
2016-09-26 23:32:07 +01:00
Maxime Coste
1e0ec182c1
Assert substr from parameter is within the string
...
Should catch #756 earlier if it happens again.
2016-09-26 23:24:09 +01:00
Maxime Coste
a0c20a924a
OptionDescs are const in OptionRegistry
2016-09-26 22:59:02 +01:00
Maxime Coste
5e3effc1f0
Merge remote-tracking branch 'lenormf/fix-src-makefile'
2016-09-26 22:04:34 +01:00
Maxime Coste
b5450aa375
Tweak RankedMatch logic, prioritize matches that are in a single word
2016-09-26 21:54:39 +01:00
Frank LENORMAND
b9d21a9e9e
Add some standard GNU targets to the Makefile
...
Closes #813
2016-09-25 09:40:24 +03:00
Maxime Coste
532e3758fe
Add InsertCompletionShow/InsertCompletionHide hooks
2016-09-21 13:43:06 +01:00
Maxime Coste
12f2815159
Tweak Buffer::offset_coord implementation
2016-09-21 13:36:11 +01:00
Maxime Coste
4f874a3679
Code cleanup in make_completer, use std::decay
2016-09-19 23:26:52 +01:00
Maxime Coste
fafde8655b
Fix select_to_reverse to correctly handle the first character of the buffer
...
Fixes #809
2016-09-19 09:20:55 +01:00
Maxime Coste
396b71ecc2
Add an unmap command to remove key mappings
2016-09-19 09:10:41 +01:00
Maxime Coste
44e9da3bee
More command completer code cleanup
2016-09-18 16:27:34 +01:00
Maxime Coste
d14c39ebdd
Rewrite PerArgumentCommandCompleter to use compile time dispatching
...
No need to store these vectors of std::functions around anymore.
2016-09-18 16:07:00 +01:00
Maxime Coste
c152fbe3b6
Make idle timeout and filesystem check timeout configurable
2016-09-18 13:47:22 +01:00
Maxime Coste
c63c92cbf7
Support kill session inside init command
2016-09-06 22:46:27 +01:00
Maxime Coste
c1d7f79a52
Do not let boost regex errors propagate, convert them to Kakoune errors.
2016-09-06 13:55:14 +01:00
Maxime Coste
da0fe5d0bd
Small code tweak in generate_switches_doc
2016-09-05 23:34:03 +01:00
Maxime Coste
21a76d135c
Fix handling of remote errors in the accepter
2016-09-05 13:47:56 +01:00
Maxime Coste
4fc20b8d7d
Rework client quitting and handling of remote errors
...
Client quitting no longer immediately unwinds, client is just pushed
for deletion until we get back to the main loop, similarly to what
happens for buffer and window deletion.
2016-09-04 17:56:07 +01:00
Maxime Coste
563497ade7
Use proper buffering when reading remote messages
...
Messages now have their size in a header, along with their type
and are only executed once fully received. We dont block anymore
while trying to read a full message.
2016-09-04 11:17:35 +01:00
Maxime Coste
044a6ce860
Rework binary network protocol to be more message based
...
We cannot just write to Kakoune socket from any application anymore,
use of kak -p is mandatory, as we now have an introduction to write.
2016-09-04 11:17:34 +01:00
Maxime Coste
4d13e6fb88
Do not crash whenever S matches the whole selection and hence does not select anything
...
Fixes #787
2016-09-04 11:17:34 +01:00
Maxime Coste
97e36233fb
Remove the to_string(unsigned) (it conflicts with to_string(size_t) on x86)
...
Just cast to int when we pass an unsigned.
2016-08-31 09:07:33 +01:00
Maxime Coste
3831117bc7
style tweak
2016-08-30 23:23:07 +01:00
Maxime Coste
8b02bb749d
Add a fd_readable(int fd) helper function
...
Use it instead of direct calls to select scatered around the code
base.
2016-08-30 22:56:47 +01:00
Maxime Coste
b6cab458ed
Use a heap instead of sorting to gather the best shell-candidates matches
...
O(n + k * log n) (with k = 100 here) instead of O(n log n), much faster
with many candidates.
2016-08-30 13:42:29 +01:00
Maxime Coste
f6cb6319d6
Enable shell-candidates update in fast completion mode
2016-08-30 00:55:01 +01:00
Maxime Coste
f52f5f7c53
Only decode utf8 when strictly necessary in RankedMatch::operator<
2016-08-30 00:51:21 +01:00
Maxime Coste
2b631837d8
Tweak RankedMatch, compare max match index instead of match indices sum
2016-08-30 00:30:15 +01:00
Maxime Coste
cbe38b2f96
Use flags and bit operations instead of bools in RankedMatch
...
full match is now the most important flag for comparison.
2016-08-29 23:56:22 +01:00
Maxime Coste
95c21a4ebd
Merge remote-tracking branch 'doppioandante/json-fix'
2016-08-28 18:51:19 +01:00
Enrico Lumetti
c6da163cb3
Fix menu_select in the JSON ui
2016-08-27 17:57:48 +02:00
Maxime Coste
b934bcd4e1
Support merging consecutive selections with <a-m>
...
Fixes #773
2016-08-27 11:20:38 +01:00
Maxime Coste
093d3bd0df
Map tab to jump forward until we can distinguish <c-i> from it
...
Fixes #769
2016-08-27 11:07:24 +01:00
Maxime Coste
85f54a77ac
Display the capture used in select/split prompt
...
Fixes #770
2016-08-27 10:55:07 +01:00
Maxime Coste
2bf100bdd0
Add a to_string overload for unsigned int
2016-08-27 10:46:49 +01:00
Maxime Coste
7ac54b0b0f
Fix another bug in wrap_lines
2016-08-26 00:08:34 +01:00
Maxime Coste
9124851029
JsonUi: try to handle all available requests, on input event, not just the first one
2016-08-24 23:47:09 +01:00
Maxime Coste
3f0415c765
Introduce the 'completion_extra_word_chars' option
...
This string option is used to get all the additional characters
that should be considered as "word" character for the purpose of
insert mode completion.
Fixes #758
2016-08-24 23:47:09 +01:00
Maxime Coste
911a32a992
Only drop blank prefixed history entries in command/shell prompts
...
For regex prompts we actually want to save them, as a leading space
is significant
Fixes #767
2016-08-22 20:37:14 +01:00
Maxime Coste
ac81d0f39c
Cleanup history_push function
2016-08-22 20:37:14 +01:00
Maxime Coste
56a7c6e594
Rework buggy number selection function
...
Fixes #765
Fixes #766
2016-08-22 13:54:22 +01:00
Maxime Coste
0de4fc75d0
Dont consider OptionManager watcher list as part of the state of the option manager
2016-08-21 20:24:18 +01:00
Maxime Coste
1d1f27248f
Try to fix travis ci
2016-08-18 22:42:31 +01:00
Maxime Coste
8803bf7c46
Fix comment missing a closing parenthesis
2016-08-14 20:05:57 +01:00
Maxime Coste
bedf2f703c
Small code cleanups
2016-08-09 21:45:06 +01:00
Maxime Coste
ac0c746072
Tweak format of option docstrings
2016-08-07 10:47:26 +01:00
Maxime Coste
f73e89a716
Add information of types of options
2016-08-06 09:05:50 +01:00
Maxime Coste
f1a93a0e61
Replace some const String& with StringView in option_manager.hh
2016-08-06 06:52:11 +01:00
Maxime Coste
5b7b6eebaf
Regenerate shell-candidates for each completion sessions
...
That should allow fixing the #665 issue while still avoiding to
run a potentially long shell command on each keystroke.
2016-08-05 13:53:19 +01:00
Maxime Coste
38d372567b
Do not force exec to run in normal mode anymore, run in the current mode
2016-08-05 09:43:33 +01:00
Maxime Coste
373c21e875
Preserve selections when converting to client mode
...
Fixes #742
2016-08-05 08:16:43 +01:00
Maxime Coste
8cc27354e8
Support sorting and merging overlapping separately, fix bug in move
...
Fixes #754
2016-07-30 15:32:47 +01:00
Maxime Coste
d28e503150
Use the same logic for mouse wheel and (half) page up/down
...
Fixes #749
2016-07-28 09:51:49 +01:00
Maxime Coste
a7005ec74b
Add a char_length(Buffer&, const ByteCoord&, const ByteCoord&) util
2016-07-28 09:41:47 +01:00
Maxime Coste
74c3f101cd
Use -1 for invalid codepoint, not 0
2016-07-28 09:24:51 +01:00
Maxime Coste
2425f4a781
Tweak session renaming code
2016-07-28 00:16:41 +01:00
Maxime Coste
62fa133efd
Merge remote-tracking branch 'doppioandante/set_session'
2016-07-28 00:12:09 +01:00
Maxime Coste
623fcd88ea
Do not avoid end of lines after selecting modified ranges in undo
...
Fixes #751
2016-07-27 23:53:16 +01:00
Maxime Coste
14198fadb4
BufferIterator is random access, not just bidirectional
2016-07-27 21:36:52 +01:00
Maxime Coste
14f59d415d
Avoid underlying iterator copies in utf8_iterator
2016-07-27 21:36:32 +01:00
Maxime Coste
df0773feeb
Ensure we cannot call StringView::StringView{Codepoint}
2016-07-27 09:08:08 +01:00
Maxime Coste
a09b094f2b
Avoid repeated calls to context.selections() in highlight_selections
2016-07-27 09:03:01 +01:00
Maxime Coste
0d2c5072b0
Merge remote-tracking branch 'lenormf/fix-timespec-conversion'
2016-07-27 00:37:04 +01:00
Maxime Coste
09188a2bc1
Revert "Try to disambiguate timespec as a struct"
...
This reverts commit 17d2dc9477
.
2016-07-27 00:36:53 +01:00
Maxime Coste
17d2dc9477
Try to disambiguate timespec as a struct
2016-07-27 00:34:20 +01:00
Maxime Coste
f30bd4c540
Fix use of dead string memory and quick cleanup
2016-07-27 00:25:05 +01:00
Maxime Coste
35f1ad100e
Merge remote-tracking branch 'lenormf/select-arbitrary-punctuation'
2016-07-27 00:14:49 +01:00
Maxime Coste
dffb1dff7c
Add missing <time.h> header so that timespec is well defined
2016-07-27 00:14:11 +01:00
Maxime Coste
80c3405a20
Rework SelectionList::check_invariant
2016-07-27 00:04:06 +01:00
Maxime Coste
13ed87410f
Rework compute_modified_ranges
...
Fixes #743
2016-07-26 23:31:23 +01:00
Frank LENORMAND
f04a7a0ed3
Allow selection primitives to use arbitrary punctuation signs
2016-07-26 10:39:18 +03:00
Frank LENORMAND
f8224b1384
Use explicit initialization of the timespec
object to fix compilation on older compilers
2016-07-26 09:43:41 +03:00
Maxime Coste
78fc88ae6d
Display some information when moving in history
2016-07-24 22:55:37 +01:00
Enrico Lumetti
1a7cd707aa
Add 'session' command to change remote session name
2016-07-24 22:46:33 +02:00
Maxime Coste
087a17eb24
Support for going backward/forward in buffer history with <a-u>/<a-U>
2016-07-24 21:25:05 +01:00
Maxime Coste
03a4b3c73f
Support counts for undo/redo
2016-07-24 21:25:05 +01:00
Maxime Coste
3edd2c127c
Support moving between arbitrary history nodes
2016-07-24 21:25:05 +01:00
Maxime Coste
b9c77e2f09
Store creation timepoint in HistoryNode
2016-07-24 21:25:05 +01:00
Maxime Coste
46a15534c5
Introduce chrono.hh
2016-07-24 21:25:05 +01:00
Maxime Coste
e391f93a9e
Set memory domains for Buffer::HistoryNode
2016-07-24 21:25:05 +01:00
Maxime Coste
2296b43299
Store buffer undo/redo information in a tree instead of a vector
2016-07-24 21:25:05 +01:00
Maxime Coste
003cb8dfea
Merge remote-tracking branch 'lenormf/readonly-mode'
2016-07-24 21:21:49 +01:00
Frank LENORMAND
e3bf01d1f9
Replace C-style operators with their alphabetical equivalent
2016-07-24 08:34:49 +03:00
Frank LENORMAND
ef82c496eb
Use a more appropriate error message with unlogical flag combinations
2016-07-23 10:03:25 +03:00
Frank LENORMAND
3c91f711fc
Warn the user when flag combinations don't make sense
2016-07-23 10:03:25 +03:00
Frank LENORMAND
8a4596bea9
Implement a readonly
mode
...
This commit introduces the `readonly` variable as well as the `-ro`
command line option which prevent buffers from being overwritten on
disk when the `write` command is used without arguments. Some buffers
can selectively be put in readonly mode by setting the `readonly`
variable on the `buffer` scope, the `global` mode will affect all
buffers (even those who will be open subsequently), using the `window`
scope will have no effect.
Closes #685
2016-07-23 10:03:21 +03:00
Maxime Coste
3ddc6eccda
Add sanity check
2016-07-15 20:26:58 +01:00
Maxime Coste
1401c55531
Faster implementation of utf8::advance not copying iterators at each step
2016-07-15 20:26:33 +01:00
Maxime Coste
73fdc726fb
Avoid postfix increment in utf8::distance
2016-07-15 20:07:47 +01:00
Maxime Coste
4ecdbea5c4
Make buffer iterator iteration/dereference faster
2016-07-15 19:48:13 +01:00
Maxime Coste
b988871df6
Ensure selections are sorted and non overlapping in selections_list_from_string
2016-07-14 21:14:17 +01:00
Maxime Coste
52d3b60aaa
Clamp selection generated in selection_list_from_string
...
Fixes #733
2016-07-13 19:25:32 +01:00
Maxime Coste
bb688cf42d
Do not throw when recursive hook calls are detected
...
Running hooks is non critical, and should never `fail` as far as
caller is concerned.
2016-07-11 19:44:29 +01:00
Maxime Coste
530ecf212e
Ensure buffer create/close hooks are run at appropriate times
...
They used to be ran before the buffer was added to the buffer list
we now run them afterwards.
2016-07-10 16:34:16 +01:00
Maxime Coste
88a9607552
Keep modified selections in non-draft exec/eval -itersel
...
Fixes #727
2016-07-08 09:52:10 +01:00
Maxime Coste
439f168928
Use named keys for Return and Tab instead of <c-m> and <c-i>
...
Fixes #722
2016-07-05 20:08:13 +01:00
Maxime Coste
8270f9299f
Improve robustness of json parsing and execution
...
Fixes #720
2016-07-04 19:31:09 +01:00
Maxime Coste
469eb6ec44
Avoid possible access to an invalid, being deleted buffer list.
2016-07-04 19:20:22 +01:00
Maxime Coste
ca7f647562
Refactor Optional::operator==
2016-07-04 19:19:40 +01:00
Maxime Coste
e262dc1257
Support Resize modifiers in key_to_str
...
As seen in #715 , that was not supported correctly
2016-06-30 23:49:21 +01:00
Maxime Coste
c8f5204202
Try to make the json ui more tolerant with the json input
...
Should improve the issues raised #714
2016-06-29 21:08:16 +01:00
Maxime Coste
511367f977
Change end of line format detection logic to match vims
...
Only consider a buffer to be Crlf if *all* of its lines use it, else
consider it as Lf with embedded Cr chars.
Fixes #686
2016-06-28 20:46:20 +01:00
Frank LENORMAND
eca7850203
Fix a warning about the forward declaration of SelectionList
2016-06-27 20:59:46 +01:00
Maxime Coste
e07ff0c669
Use tparm instead of tiparm as built in OSX ncurses does not support it
2016-06-27 20:59:02 +01:00
Maxime Coste
089eaa52e0
Detect recursive hook run and abort in that case
...
Fixes #709
2016-06-27 20:55:07 +01:00
Maxime Coste
fcf73c2293
Refactor context_wrap to share more code between draft/non draft case
...
Fixes #706
2016-06-22 22:27:43 +01:00
Maxime Coste
a8cf2a84c4
Add an Optional::emplace method
2016-06-22 22:17:13 +01:00
Maxime Coste
5cb9cf4cc3
Go back to saving built-in registers by default in non draft :exec/:eval
2016-06-22 19:57:21 +01:00
Maxime Coste
532ae5a1a6
Do not go backward to when selecting to end of line from the end of line
...
Fixes #699
2016-06-22 19:56:40 +01:00
Maxime Coste
c032306e04
Merge remote-tracking branch 'doppioandante/fix-json'
2016-06-21 23:51:15 +01:00
Maxime Coste
b77eff1b72
Fix parameter order in fputs
2016-06-21 00:47:46 +01:00
Maxime Coste
2edea2e0f6
Use fputs and fflush in ncurses_ui direct stdout access to respect buffering
...
Ncurses will write using the FILE* interface, using the fd based one is error
prone.
Fixes #703
2016-06-20 23:43:21 +01:00
Maxime Coste
91bf0d4622
Make window scope available to draft contexts
...
We do want window options/aliases/keymaps/hooks to be available in
draft context, dont we ?
Fixes #702
2016-06-20 19:45:15 +01:00
Maxime Coste
fef37e6a92
Do not preserve registers by default when exec/eval in a non draft context
...
Fixes #700
2016-06-20 19:40:49 +01:00
Enrico Lumetti
97680827b8
Fix JSON integer parsing
2016-06-20 16:59:32 +02:00
Maxime Coste
471c75d738
Trim trailing end of lines in %sh outputs
...
Fixes #698
2016-06-19 17:01:56 +01:00
Maxime Coste
b8908f2dc6
Add a String::resize method
2016-06-19 17:01:27 +01:00
Maxime Coste
f2ba54b2d4
Keep prompt displayed on <c-r> and <c-v> in prompt mode
2016-06-18 11:07:18 +01:00
Maxime Coste
34c8e6a9cf
Clear up info/menus and eventual prompts when reseting to normal mode
...
Fixes #697
2016-06-16 19:35:43 +01:00
Maxime Coste
04d24b22bd
Fix parsing of empty json objects/arrays and recover parse errors
...
Fixes #694
2016-06-11 13:42:25 +01:00
Maxime Coste
3059b3a253
Extract ui type parsing to its own function
2016-06-11 13:22:24 +01:00
Maxime Coste
c73e64882c
Check session valididty on kak -l and support kak -clear for clearing the dead ones
...
Fixes #689
2016-06-06 19:28:56 +01:00
Maxime Coste
e2bfd9e3b2
Diagnose empty selection desc string
...
Fixes #690
2016-06-06 17:17:18 +01:00
Maxime Coste
5cab2078f8
Fix string view created from a temporary string
...
This is clearly a case where rust style lifetime analysis would
have been nice, hopefully it comes with GSL lifetime extensions...
Fixes #680
2016-05-24 22:36:20 +01:00
Maxime Coste
fa35330b42
Fix RankedMatch ordering where 'a < a' was true
...
Fixes #679
2016-05-20 18:42:01 +01:00
Maxime Coste
7280525672
Dont overwrite registers with empty macros
...
Fixes #674
2016-05-20 09:44:05 +01:00
Maxime Coste
6181781f3d
Change dir to $HOME when no parameters are given to cd
...
Fixes #678
2016-05-20 09:41:29 +01:00
Maxime Coste
365887539b
Reject '//' as a file completion prefix to avoid cygwin network hosts listing
2016-05-19 21:46:27 +01:00
Maxime Coste
1834a67b87
Go back to libc locale and use c_regex_traits
...
Unfortunately, cygwin does not support c++ locales.
2016-05-19 21:45:23 +01:00
Maxime Coste
e1703204f8
fix bug in utf8_iterator
2016-05-19 20:20:42 +01:00
Maxime Coste
fb01c8c377
Do not force recreate scratch buffers by default, require edit! for that
2016-05-17 19:41:24 +01:00
Maxime Coste
49e674fe55
Fix RankedMatch::operator< with matching prefix candidates
2016-05-17 19:40:36 +01:00
Maxime Coste
f51ba6089c
Use variadic macros for kak_assert to remove the need for COMMA
2016-05-17 19:39:55 +01:00
Maxime Coste
3b6d6956e2
We do need a force redraw on resize for menu, info and status bar
2016-05-16 10:23:47 +01:00
Maxime Coste
8c6849bb04
Make HookManager safe counted
2016-05-15 10:37:42 +01:00
Maxime Coste
baf219ee2f
Fix duplicate buffer problem, fix real_path beahviour
2016-05-15 10:37:01 +01:00
Maxime Coste
1788126f38
BufferManager now owns the Buffers instead of registering them
2016-05-14 08:33:50 +01:00
Maxime Coste
ba421e45f7
Delay window deletion until we get back to main loop
...
Avoid WinResize hooks while redrawing, ensure window resize only
take place while handling user input.
Fixes #672
2016-05-14 08:17:52 +01:00
Maxime Coste
4c8089009d
Tolerate failure in setting current locale
2016-05-12 00:00:03 +01:00
Maxime Coste
84f62e6ff2
Use C++ locale based functions instead of the libc ones
2016-05-11 09:49:45 +01:00
Maxime Coste
6b1bd84e8e
Allow access to end of line with horizontal moves (h and l)
...
Lets enable that for some time, get some feedback on that behaviour
change, and see if we keep it.
2016-05-11 00:03:45 +01:00
Maxime Coste
dd41a46c4c
Correctly set c++ locale on startup
...
Fixes #595
2016-05-10 22:06:02 +01:00
Maxime Coste
abac6a9436
Use boost::wregex implementation and manually utf8 decode into it
...
That way we get proper unicode support in regular expressions as long
as the current locale treats wchar_t as unicode codepoints.
Fixes #638
Fixes #595
Fixes #162
2016-05-10 09:38:21 +01:00
Maxime Coste
bff9d45bdb
Make utf8_iterator codepoint type and difference type configurable
2016-05-09 21:56:08 +01:00
Maxime Coste
e3cddf3783
Fix use of potentially null local_client
...
Fixes #667
2016-05-09 13:56:15 +01:00
Maxime Coste
d3aff03062
Keep a pointer to current client in windows so that window hooks can access it
2016-05-09 13:48:48 +01:00
Maxime Coste
457e11bdc9
time window display buffer update in debug profile mode
2016-05-06 00:24:54 +01:00
Maxime Coste
a132eb6b5b
Expose a WinResize hook when a window changes size
...
Fixes #661
2016-05-04 23:27:28 +01:00
Maxime Coste
d4e9f30e5f
Merge branch 'master' of git://github.com/pierroelmito/kakoune
2016-05-04 23:20:49 +01:00
pierroelmito
3044eff356
fix whitespace label
...
The author of this work hereby waives all claim of copyright (economic and moral) in this work and immediately places it in the public domain; it may be used, distorted or destroyed in any manner whatsoever without further attribution or notice to the creator
2016-04-30 11:59:53 +02:00
Maxime Coste
25a31534ec
Fix splitting selecting the first buffer char when there is a match at buffer begin
2016-04-30 10:37:31 +01:00
pierroelmito
d4b8e28d0a
add face to change whitespace colors
2016-04-30 10:35:25 +02:00
Maxime Coste
da40828801
Check all buffer are saved in :kill, and add :kill! to avoid that
2016-04-29 21:58:04 +01:00
Maxime Coste
61c155fc40
Fix wrap_lines
2016-04-27 13:55:32 +01:00
Maxime Coste
75d22a8da7
Add another missing include in shell_manager.cc
2016-04-27 09:46:53 +01:00
Maxime Coste
cf142872dc
Add missing include in file.cc
2016-04-27 09:46:53 +01:00
Maxime Coste
e01a658cea
Make use of strongly typed number to size_t conversion
2016-04-27 09:46:53 +01:00
Maxime Coste
717e37f2f3
Add checked, explicit conversion from strongly typed number for size_t
2016-04-27 09:46:53 +01:00
Maxime Coste
21644d17d6
Fix comparison operators in utf8_iterator and tag it as bidirectional
2016-04-27 09:46:53 +01:00
Maxime Coste
e4b9e30b31
Fix missing include in json_ui.cc
2016-04-21 20:46:41 +01:00
Maxime Coste
de033d2915
Allow equality comparison between buffer iterators from differnt buffers
2016-04-21 20:42:23 +01:00
Maxime Coste
a22b1b6bc8
Fix BufferIterator::difference_type, it should be signed
2016-04-21 20:42:16 +01:00
Maxime Coste
66a40a37cd
prompt: zero password memory after running the command to be slightly more secure
2016-04-20 13:31:34 +01:00
Maxime Coste
199ccb4021
Add a -password switch to :prompt to allow for more secure password entering
...
Fixes #660
2016-04-19 09:51:09 +01:00
Maxime Coste
2435949fae
Add support for env var name completion
...
Fixes #659
2016-04-17 19:21:43 +01:00
Maxime Coste
e784db4ad6
Use common completion system for OptionManager::complete_option_name
2016-04-17 19:21:08 +01:00
Maxime Coste
013519b3cb
Remove iterator based regex constructor
2016-04-16 21:41:04 +01:00
Maxime Coste
f877c388fe
Fix mistake in input_handler.cc
2016-04-13 23:50:49 +01:00
Maxime Coste
7833b53272
Fix support for macro being recorded and replay during :exec (non draft)
2016-04-13 21:21:49 +01:00
Maxime Coste
b0060ed79e
Fix modified range computation when erasing multiple times past current buffer end
...
Fixes #654
2016-04-13 21:21:00 +01:00
Maxime Coste
d1b693270e
ShellManager: do not open child stdin if there is no data to write to it
...
Fixes #383
2016-04-12 13:41:21 +01:00
Maxime Coste
a2d426abba
Use padding face on the whole line
2016-04-11 21:12:27 +01:00
Maxime Coste
064e965500
Remove padding control options from ncurses ui
2016-04-11 13:54:47 +01:00
Maxime Coste
815924e4da
Merge remote-tracking branch 'lenormf/buffer-padding'
2016-04-11 13:44:10 +01:00
Maxime Coste
d4b1138e2f
Use a specific startup_error exception type to get a nicer message
...
Fixes #424
2016-04-09 09:13:35 +01:00
Maxime Coste
c51ca6b3fa
Fix is_word ambiguous overload
2016-04-09 07:57:55 +01:00
Maxime Coste
c768ff9b6f
Small style tweak, we know buffer begin coord is always {0,0}
2016-04-09 01:08:38 +01:00
Maxime Coste
a12475d88c
Merge branch 'expose-cursor-byte-offset' of git://github.com/pauldub/kakoune
2016-04-09 01:05:18 +01:00
Maxime Coste
0a863c21e4
fix word completion taking the words being edited as candidates
2016-04-09 01:03:24 +01:00
Maxime Coste
a36ee22760
Pass the selection list to insert mode completer functions
2016-04-09 01:03:24 +01:00
Paul d'Hubert
eb8ad56c87
expose cursor_byte_offset env variable
...
Update README.asciidoc
2016-04-08 13:29:31 +02:00
Maxime Coste
3eca90f2b1
Only offer directories when completing :cd arguments
...
Refactor code in file.cc, avoid many double stat when searching
commands
Fixes #646
2016-04-07 22:47:41 +01:00
Maxime Coste
989d64abd4
Tweak RankedMatch behaviour
2016-04-04 13:42:58 +01:00
Maxime Coste
0478a8f11a
Give priority to lower case in RankedMatch
2016-04-04 13:42:58 +01:00
Maxime Coste
ab5daeb365
Refactor wrap_lines and add some unit tests
2016-04-04 13:42:58 +01:00
Maxime Coste
15e82518d3
Tweak categorize(Codepoint) implementation
2016-04-04 13:42:58 +01:00
Maxime Coste
b5a68307ba
Use a specific option type completions for insert completion
...
Fix escaping in jedi.kak as well
2016-04-04 13:42:58 +01:00
Maxime Coste
d1732673ce
Document the null register
2016-03-31 09:21:09 +01:00
Maxime Coste
8badcdc0d5
Make DynamicRegister statically dispatch to its function
2016-03-31 09:17:02 +01:00
Maxime Coste
9b4bd611ef
Replace menu and info when they actually moved
...
Previous logic worked only when the buffer moved in the window, but
not if some highlighter (like line numbering or flag lines) moved
the text around.
2016-03-30 19:46:43 +01:00
Maxime Coste
5332378419
Fix spaces_to_tabs implementation accessing past end
...
Fixes #643
2016-03-30 19:27:36 +01:00
Maxime Coste
7dd05d675c
RankedMatch constructor handles empty query just fine
2016-03-29 13:48:01 +01:00
Maxime Coste
94f4531bc8
Tweak subsequence_match_smart_case
2016-03-28 15:18:15 +01:00
Maxime Coste
2a9875bd58
Use manual lexicographic comparison in RankedMatch::operator<
2016-03-28 14:44:49 +01:00
Maxime Coste
75e9bbfa43
Uniquify candidates in -shell-candidates mode
2016-03-28 14:16:45 +01:00
Maxime Coste
1bd356473b
Use UsedLetters for shell-candidates filtering
2016-03-25 20:38:27 +00:00
Maxime Coste
c756f8f124
Move UsedLetters with RankedMatch
2016-03-25 20:38:27 +00:00
Maxime Coste
d3ef2d36ea
Add a SplitView container view
2016-03-25 20:38:26 +00:00
Maxime Coste
87704227ad
Tweak implementation of subsequence_match_smart_case
...
Remove use of utf8 iterators and use directly utf8 functions
2016-03-24 23:45:56 +00:00
Maxime Coste
e5afacba70
Optimize split implementation, avoid growing strings char by char
2016-03-24 23:25:58 +00:00
Maxime Coste
7b52b00b94
Small code tweak
2016-03-24 22:15:11 +00:00
Maxime Coste
50a64a0544
Correctly handle temporaries in container views
...
Move temporaries into the view itself and keep a reference on
non temporaries
2016-03-24 22:14:18 +00:00
Maxime Coste
ccb53eca42
Fix uninitialized value in RankedMatch
2016-03-24 22:04:56 +00:00
Maxime Coste
840b7658fd
Add an alternative -shell-candidates shell completion support
...
-shell-candidates use a shell script that returns all the candidates
and then sort them using Kakoune ranked matches system instead of
delegating the whole completion to the shell script (as shell-completion does)
2016-03-24 14:01:59 +00:00
Maxime Coste
b0d72ebce0
Support getting back to original prefix with tab/shift-tab in prompts
...
Fixes #124
2016-03-24 13:39:27 +00:00
Maxime Coste
b02883a112
Remove forced redraw in ncurses ui
2016-03-24 13:19:36 +00:00
Maxime Coste
1d646c03f5
Add completion support for alias/unalias commands
2016-03-24 00:05:40 +00:00
Maxime Coste
abd5afe012
Support mosue event in key_to_str
2016-03-23 13:39:52 +00:00
Maxime Coste
5bf9243006
User mappings and :exec are always executed in normal mode
...
Fix #551
2016-03-22 22:54:29 +00:00
Maxime Coste
38f146d849
Fix another bug in Buffer::replace implementation
2016-03-17 12:38:09 +00:00
Maxime Coste
d277ef6d6c
Slight code tweaks in normal mode pipe function
2016-03-17 12:08:11 +00:00
Maxime Coste
c6ca3af9b4
Fix bug introduced in Buffer::do_insert
2016-03-17 12:07:20 +00:00
Maxime Coste
55ee6f970e
Write the hook parameter in the debug buffer on error in hook
2016-03-17 11:45:22 +00:00
Maxime Coste
131b0a8298
Use ByteCoords directly for buffer insert/erase/replace
2016-03-16 13:59:30 +00:00
Maxime Coste
ad5da15cfa
Use replace in Buffer unit test
2016-03-16 13:52:39 +00:00
Maxime Coste
de1433d30a
Avoid the spurious newline insertion when replacing at end of buffer
...
Add a Buffer::replace method to handle the replacements properly
Fixes #633
2016-03-16 13:48:11 +00:00
Maxime Coste
c5b24e2a8a
More cleanups in Buffer::do_insert
2016-03-16 13:22:11 +00:00
Maxime Coste
338462e94f
Refactor Buffer::do_insert
2016-03-15 23:37:18 +00:00
Maxime Coste
d2dfb9ecb1
Slight cleanup in Buffer::do_insert
2016-03-15 23:15:57 +00:00
Maxime Coste
5fe2872904
Reset line editor display pos when the text is reset
2016-03-15 13:55:01 +00:00
Maxime Coste
e82c3410a5
Redisplay prompt on Prompt mode enabled
...
Fixes #603
2016-03-15 13:51:47 +00:00
Maxime Coste
6739c5047e
Support an optional column param with the +<line>[:<column>] syntax
2016-03-15 13:21:28 +00:00
Maxime Coste
b014093c97
Quit on SIGINT when using a DummyUI
2016-03-15 00:24:42 +00:00
Maxime Coste
dca9bccc6a
Disable key mapping handling when executing a user mapping
...
Fixes #629
2016-03-14 20:58:55 +00:00
Maxime Coste
b53f1271a2
Support ~/ in insert mode filename completion
2016-03-14 13:59:54 +00:00
Maxime Coste
7ecd65e1af
Code cleanups
2016-03-14 13:41:20 +00:00
Maxime Coste
3a699c8ac3
Include tweak
2016-03-14 13:41:20 +00:00
Maxime Coste
06c1c5f28b
Do not include the debug buffer in word completion
2016-03-12 16:44:55 +00:00
Maxime Coste
92f96f9455
Change custom object syntax, use a single prompt
...
Take a description of the object, in <open>,<close> format
2016-03-11 00:14:42 +00:00
Maxime Coste
428b18c0c1
Formatting fix
2016-03-11 00:09:13 +00:00
Robert J. Ennis
7f648bcd06
Update Makefile for OSX build with homebrew ncurses
...
This adds compilation flags to include the homebrew installed ncurses 6.0 library during compilation.
2016-03-10 15:07:50 +01:00
Maxime Coste
517abf5e74
Redisplay info when menu appears so that info adapts its position
2016-03-09 23:28:23 +00:00
Maxime Coste
99ca7ead37
Only select a completion when the menu was visible (or its the only one)
2016-03-09 23:24:20 +00:00
Maxime Coste
90d446b2f4
It can happen during an undo/redo that the buffer be temporarily empty
...
Fix is_end in that case.
2016-03-09 23:16:14 +00:00
Maxime Coste
84a1796a48
Try to please gcc 4.8 with parenthesis instead of curly braces
2016-03-08 23:36:54 +00:00
Maxime Coste
eea75c6daf
Add missing curly braces in containers helpers
2016-03-08 23:22:32 +00:00
Maxime Coste
9e15181dc9
Rework container helpers, use pipe syntax and cleanup implementation
...
use 'container | filter(func) | reverse() | transform(func)' instead
of 'transform(reverse(filter(container), func), func)' to express
container transformations.
2016-03-08 21:35:56 +00:00
Maxime Coste
21ae662151
Use ranked match based completion for command names
2016-03-08 13:56:37 +00:00
Maxime Coste
3cbc0d0b39
Force redraw everything, not just refresh
2016-03-08 13:42:00 +00:00
Maxime Coste
23f52d591c
Support parsing booleans in json
2016-03-08 00:28:53 +00:00
Maxime Coste
6f78c7f910
Fix handling of bool when writing json
2016-03-07 23:14:28 +00:00
Maxime Coste
6c8f8fe691
Rework client redrawing, delay menu/info methods until next refresh
...
That avoid sending lots of spurious info_hide/menu_hide, just set
a flag and wait until the client is asked to redraw.
2016-03-07 23:11:59 +00:00
Maxime Coste
a15cdeae6e
Fix json escaping of strings
2016-03-07 22:38:37 +00:00
Maxime Coste
2626ce858f
Move <c-l> handling to normal mode from client
...
Client handling prevents :exec from triggering a redraw
2016-03-07 22:14:03 +00:00
Maxime Coste
4d4f18a78a
Select ui at launch through the -ui <ui_name> switch
2016-03-07 21:44:50 +00:00
Maxime Coste
f1fb2114da
Handle <c-l> redrawing on the server side
...
That way we can force a redraw at any moment, including during
batch execution.
2016-03-07 21:44:50 +00:00
Maxime Coste
b832a61193
Cleanup JsonUI and add support for a resize method
2016-03-07 21:44:50 +00:00
Maxime Coste
433940485f
Initial, WIP json ui implementation
...
The JsonUI writes json rpc user interface commands on stdout and
reads json rpc requests on stdin.
2016-03-07 21:44:50 +00:00
Maxime Coste
52525a156f
Remove complete_prefix option and behaviour
...
Now that we use subsequence based completion almost everywhere,
completing the common prefix does not make sense anymore.
2016-03-07 20:17:41 +00:00
Maxime Coste
cdbd81523a
Fix Value constructor, we never want to create reference values
2016-03-06 15:12:36 +00:00
Maxime Coste
fb2fb3811f
Tweak useage of skip_while and move the functions in utils.hh
2016-03-06 15:12:36 +00:00
Maxime Coste
72b6340b35
Only call UserInterface::refresh when the UI has been modified
2016-03-06 15:12:36 +00:00
Maxime Coste
134be9a1f6
Just write to stderr when exceptions are uncaught
2016-03-03 14:05:07 +00:00
Maxime Coste
b5b5b82c70
destroy buffer manager first but clear clients before destroying buffers.
...
Fixes #612
2016-03-03 14:05:07 +00:00
Maxime Coste
67849f2db7
BufferManager should outlive ClientManager in the end
...
If not, clients end up keeping references on a buffer while
it it being deleted.
2016-03-02 20:27:47 +00:00
Maxime Coste
2df7b1f6da
In buffer name completion, give priority to filename (not dirname) matches
...
First list filename matches, then full path matches to allow fast selection
of buffers in deep hierarchies where queries match the path of every buffers
2016-03-02 13:51:50 +00:00
Maxime Coste
6d5900af16
Use RankedMatch for filename based completion (file and command completion)
2016-03-02 13:51:16 +00:00
Maxime Coste
1fd7e80f04
Rename prefix to query in complete helper function and tweak static_assert
2016-03-02 13:33:11 +00:00
Maxime Coste
761d316af6
Tweak RankedMatch ordering, give priority to prefix matches
2016-03-02 13:30:54 +00:00
Maxime Coste
72dc8e6774
Ensure ClientManager is always outliving the BufferManager
2016-03-02 13:30:11 +00:00
Maxime Coste
068ca08b4c
Use the general code path for reload info box handling in Client
2016-03-02 13:14:21 +00:00
Maxime Coste
13d039c228
Ensure the BufferManager is destroyed first so that buffer hooks can access other managers
...
Fixes #612
2016-03-02 13:12:14 +00:00
Maxime Coste
7906704e3b
Remove code that should not have been commited
2016-02-29 22:16:59 +00:00
Maxime Coste
2214421df5
Use a StringView in notify_fatal_error
2016-02-29 22:15:36 +00:00
Maxime Coste
92b56cbda0
Avoid a gcc warning in enum option_to_string impl
2016-02-29 20:15:23 +00:00
Maxime Coste
b0e12f2bcb
Add <C-d> and <C-u> for scroll down/up half a page
...
Fixes #606
2016-02-29 14:00:09 +00:00
Maxime Coste
1138264a83
Notify when searching for next match wraps around buffer
...
Fixes #215
2016-02-29 13:50:18 +00:00
Maxime Coste
9b70346a00
Take subsequence matches index when sorting RankedMatch
2016-02-28 23:05:51 +00:00
Maxime Coste
548e10597c
Code cleanup
2016-02-28 18:30:35 +00:00
Maxime Coste
3987463e75
Remove direct access to ui, go through client
...
Client can now update menu/info positions when the window move
around.
2016-02-27 17:23:13 +00:00
Maxime Coste
f0edf40543
Slight refactor in ncurses_ui, group info and menu data in structs
2016-02-27 17:22:31 +00:00
Maxime Coste
53821be7cc
Tweak RankedMatch::operator<
2016-02-22 23:07:29 +00:00
Maxime Coste
ab20e2e5eb
Merge remote-tracking branch 'lenormf/manpage'
2016-02-18 19:24:22 +00:00
Frank LENORMAND
d317448407
Disable interactive mode when moving documentation manpages
2016-02-18 14:53:14 +02:00
Maxime Coste
fbb326173a
Tweak utils.hh, remove unused index sequence
2016-02-18 09:53:01 +00:00
Maxime Coste
47df1374fe
Refactor use selection as search pattern implementation
2016-02-17 23:40:14 +00:00
Maxime Coste
85a8a0c26d
Fix count_word_boundaries_match
2016-02-17 23:05:08 +00:00
Maxime Coste
c9f01e2168
Hide info box when selecting empty insert completion
2016-02-17 23:03:22 +00:00
Frank LENORMAND
e74878c299
Cleanup/fix some code
2016-02-17 16:09:34 +02:00
Frank LENORMAND
ac08a1fa75
Format the options' documentation properly
2016-02-17 16:02:05 +02:00
Frank LENORMAND
f408cf7ed3
Allow users to chose how the buffers are padded
2016-02-17 15:48:09 +02:00
Maxime Coste
8bd3395d4d
Do not allow / in highlighter names as it is used for hierachies
...
/ are replaced with <slash> in the highlighter names.
Fixes #553
2016-02-13 12:59:27 +00:00
Maxime Coste
318f1ae781
Give more precise titles to assistant for object and next char selection
...
Fixes #584
2016-02-13 11:38:24 +00:00
Maxime Coste
6f65f4b3a5
Fix face completion, avoid a spurious temporary
2016-02-12 19:14:06 +00:00
Maxime Coste
0fc0702983
indentwidth can actually take 0 as a parameter
2016-02-12 13:53:54 +00:00
Maxime Coste
dfe3098b18
Fix buffer deletion logic
...
'eval -buffer * db' was failing in certain cases
2016-02-11 23:07:42 +00:00
Maxime Coste
b365ee3bc3
Merge remote-tracking branch 'jjthrash/osx-asciidoc-fixes'
2016-02-11 22:09:52 +00:00
Maxime Coste
986c91a835
Support validating some options values before setting them
...
Fixes #583
2016-02-11 22:07:18 +00:00
Jimmy Thrasher
3485de717e
Remove A2X variable from Makefile since it doesn't fix the OSX homebrew problem
...
Per suggestion by @lenormf
2016-02-11 13:26:11 -05:00
Jimmy Thrasher
311d7852a6
Convert GNU sed extension into more general expression to work with BSD/OSX
2016-02-11 08:50:33 -05:00
Jimmy Thrasher
4c355488aa
Turn off xmllint for a2x.py
...
The docbook DTD is not locally available in OSX, and the a2x.py
command calls xmllint with `--nonet` so it can't fetch the DTD.
Easier to just turn off linting.
2016-02-11 08:50:06 -05:00
Maxime Coste
8701a53252
Fix use of dead temporary strings in completions
2016-02-10 13:33:49 +00:00
Maxime Coste
8d37a716fb
Use a custom SSO aware string backend
2016-02-10 09:44:42 +00:00
Maxime Coste
87769c9b03
Migrate most completion to ranked match
2016-02-09 22:50:10 +00:00
Maxime Coste
c8dedf458d
Use the ranked word completion logic for buffer name completion
2016-02-09 20:04:23 +00:00
Maxime Coste
3030775414
Cleanup doc manpages generation
2016-02-06 00:01:42 +00:00
Maxime Coste
51c9a1563a
Merge remote-tracking branch 'lenormf/manpage'
2016-02-05 09:39:40 +00:00
Maxime Coste
263ef0b149
Get rid of SharedString
2016-02-05 09:38:33 +00:00
Maxime Coste
94cbd5a837
More string usage cleanup
2016-02-05 09:13:07 +00:00
Maxime Coste
ff6eacffa3
dont intern SharedStrings but StringDataPtr
2016-02-05 00:20:45 +00:00
Maxime Coste
a8eddd03f0
String usage cleanups
2016-02-04 23:54:22 +00:00
Frank LENORMAND
8d0988d541
Prevent unconditional generation of the man pages, fix the executable name for a2x
on Mac OS X
2016-02-04 15:10:04 +02:00
Frank LENORMAND
eb62327a4c
Rename the man page to kak
2016-02-04 12:58:59 +02:00
Frank LENORMAND
9d6d2b767f
Properly install the man page when using a custom prefix
2016-02-04 11:58:18 +02:00
Frank LENORMAND
80f7a350e4
Fix the installation of documentation pages
2016-02-04 11:46:12 +02:00
Maxime Coste
eb99c0f39e
Merge remote-tracking branch 'occivink/master'
2016-02-04 09:30:25 +00:00
O. Perret
92ddbac1e8
Adapt 'make install' to rc/ reorganization
2016-02-03 23:31:35 +01:00
Maxime Coste
b59714bf2a
Merge remote-tracking branch 'lenormf/manpage'
2016-02-03 22:16:40 +00:00
Frank LENORMAND
985b7a188a
Generate the documentation pages in the troff format
...
This commit introduces the `doc` target in the Makefile, which
generates man pages from the `asciidoc`-formatted documentation in the
`doc/manpages` directory.
Before being installed into the `$(sharedir)/doc` directory, the
generated raw man pages have to be striped of a few sections without
which `a2x` won't convert the `asciidoc` data: the shady block of shell
script in the `doc` target does just that, along with compressing the
resulting man page.
New dependency hereby introduced: `asciidoc`.
2016-02-03 21:09:41 +02:00
Frank LENORMAND
b6e930a57d
Migrate the raw troff kakoune
man page to the asciidoc format
2016-02-03 14:51:32 +02:00
Maxime Coste
dc3c7d593c
Do not use a hash to determine if a window must be redrawn
...
Collision happens
Fixes #569
2016-02-03 09:51:56 +00:00
Frank LENORMAND
043f742ec3
Add a basic man page
2016-02-02 21:13:25 +02:00
Maxime Coste
f2dac6ca15
Small cleanup
2016-01-28 20:29:10 +00:00
Maxime Coste
f3ec218a1c
Support user given text objects
2016-01-28 19:30:34 +00:00
Maxime Coste
b7530b021a
StringView based surround selection
2016-01-27 19:36:31 +00:00
Maxime Coste
f8106690b1
Make BufferIterator::operator* return a const ref to be more compatible
2016-01-27 08:27:23 +00:00
Maxime Coste
04119d6207
Make find_surrounding more reusable and add unit tests
2016-01-26 07:23:18 +00:00
Maxime Coste
99b4dc9929
Support connecting to other users sessions by using <user>/<session>
2016-01-20 22:58:39 +00:00
Frank LENORMAND
ffde7e4787
Fix the name of ranges highlighters upon initialization
2016-01-16 21:12:01 +02:00
Maxime Coste
032219b119
Rename set_signal_wrapper to set_signal_handler and tweak SignalHandler def
2016-01-10 20:46:15 +00:00
Maxime Coste
2f8612f8e7
Merge remote-tracking branch 'danlrobertson/safe_signal'
2016-01-10 03:00:25 +00:00
Maxime Coste
f358579e42
Merge remote-tracking branch 'occivink/master'
2015-12-29 23:06:35 +00:00
Maxime Coste
e938040e35
Cleanup InsertCompleter get rid of unneeded candidate vector copy
2015-12-28 00:18:38 +00:00
Maxime Coste
5217089902
Fix uses of non-keyword logical operators (replace &&, || and ! with and, or and not)
2015-12-27 23:28:34 +00:00
Maxime Coste
11652ce230
Remove the exec_keys function
2015-12-27 23:15:09 +00:00
Maxime Coste
43f1fcf616
Slight refactor
2015-12-27 23:09:32 +00:00
Maxime Coste
a5dcca6f78
Formatting fix
2015-12-27 23:07:06 +00:00
O. Perret
6a8507ce40
Keep match whose end is closest to the selection in reverse regex
...
search.
2015-12-27 16:53:52 +01:00
Maxime Coste
c39a4d5879
Add a static_words str-list option always considered for word completion
...
Fixes #313
2015-12-27 08:53:31 +00:00
Maxime Coste
978e8d18b9
Center the initial target line
2015-12-25 07:17:54 +00:00
Maxime Coste
c16b9a2ec4
Set window dimensions when setting it in a context
2015-12-25 07:17:36 +00:00
Maxime Coste
a051250204
Do not try to access the local client if it was not succesfully created
2015-12-24 04:09:30 +00:00
Maxime Coste
4d230e4051
Support passing +<line number> parameter to specify the first buffer target line on open
...
Fixes #336
2015-12-23 22:56:33 +00:00
Maxime Coste
1d748a4017
Pass flags to the regex engine to correct anchors
...
Current behaviour was matching ^ $ for the current search start/end
(and \b was always matching begin/end as well).
Fixes #536
2015-12-23 22:20:25 +00:00
Daniel Robertson
f5f7bc80e8
Add a signal function using sigaction
...
Use a wrapper for sigaction in place of signal to ensure that the
SA_RESTART flag is set for all signals used.
Signed-off-by: Daniel Robertson <danlrobertson89@gmail.com>
2015-12-23 14:03:31 -05:00
Maxime Coste
669fccc5e9
Remove drop jump (c-d)
2015-12-23 02:47:32 +00:00
Maxime Coste
1288a1d385
Support collapsing jumps in eval and exec
...
Fixes #535
2015-12-23 02:46:13 +00:00
Maxime Coste
aa92ca96c8
Use an index for jump list current rather than an iterator
2015-12-23 02:31:03 +00:00
Maxime Coste
411e5a9486
Extract jump list handling in a JumpList struct
2015-12-23 01:56:54 +00:00
Maxime Coste
9e664318af
Tweak Context::push_jump implementation, simplify code
2015-12-22 22:18:25 +00:00
Maxime Coste
24411569fc
Slight refactor in selection update code
2015-12-17 04:56:44 +00:00
Maxime Coste
8dcffd8f5a
Initial, WIP spelling implementation
...
Add a ranges highlighter that takes a timestamped list of ranges and
associated face. Add a spell.kak file that uses aspell pipe interface
to fill a range-faces option.
2015-12-17 04:07:49 +00:00
Maxime Coste
ac5bc7e95d
Add missing erasing of invalid line flags
2015-12-15 02:22:29 +00:00
Maxime Coste
d2b0dba39d
Support quitting while executing RuntimeError hooks
...
Fixes #529
2015-12-14 19:06:30 +00:00
Maxime Coste
515231e824
Fix input mode keep alive handling, use a refcount for input modes
...
Fixes #528
2015-12-12 23:51:51 +00:00
Maxime Coste
80b1d88bb0
Fix Buffer::changes_since if we get passed an invalid timestamp
2015-12-12 23:50:01 +00:00
Maxime Coste
b6105fa106
Use markup for line-flags instead of a single face
2015-12-12 23:16:07 +00:00
Maxime Coste
8d7e16a8e6
Merge remote-tracking branch 'doppioandante/safer-autoload'
2015-12-12 17:03:38 +00:00
Maxime Coste
37210218fd
Merge remote-tracking branch 'lenormf/fix-face-format-check'
2015-12-12 16:53:18 +00:00
Maxime Coste
4cb74623bb
Store the buffer timestamp in line flags options respect it for highlighting
...
Option content is auto updated to match current buffer, so that line flags
are updated according to buffer modifications.
2015-12-12 11:45:45 +00:00
Maxime Coste
70250fc1e3
Pass directly the StringView to option_add and let it do the option parsing
2015-12-12 11:26:34 +00:00
Frank LENORMAND
bd56ed5fad
Avoid instanciation of a String
object everytime the parse_color
...
function is called.
2015-12-12 12:00:52 +03:00
Maxime Coste
5b9d30c088
Optimize the dynregex case where the expression refers directly to a regex option
2015-12-12 06:50:58 +00:00
Enrico Lumetti
f9d1ef830f
Remove deprecated userconfig rule
2015-12-12 01:00:32 +01:00
Frank LENORMAND
49a5bbf3ca
Ensure that at least one character follows a ',' or a '+' sign in a face
...
description (respectively a background color and attributes).
2015-12-11 22:58:28 +03:00
Frank LENORMAND
df31b88187
Fix "unused result" warnings for several system calls.
2015-12-10 11:00:10 +03:00
Maxime Coste
bde0975d9b
Filter mode require an event manager
...
Fixes #519
2015-12-08 00:12:56 +00:00
Maxime Coste
89821e9471
Move grench.rc in the correct directory
2015-12-08 00:10:26 +00:00
Maxime Coste
888ff33683
Merge remote-tracking branch 'alexherbo2/grench-rc'
2015-12-07 13:52:24 +00:00
Maxime Coste
937bef69d9
Add support for adding saved selections to current ones with <a-z>
2015-12-07 13:43:09 +00:00
Maxime Coste
966ac90fe7
Change eolformat and BOM options to be enums instead of strings
2015-12-06 12:51:55 +00:00
Maxime Coste
39fffec104
Improve info box placement behaviour in some corner cases
2015-12-05 10:51:46 +00:00
Maxime Coste
eac6d63371
Small code refactor
2015-12-05 10:14:04 +00:00
Maxime Coste
9799f34f78
Refactor some code in shell_manager.cc
2015-12-05 10:00:11 +00:00
Maxime Coste
84fc4bd6cb
Support -e in filter mode to give commands to execute (executed before keys)
2015-12-03 13:48:30 +00:00
Maxime Coste
c4a9f059dc
Fix unset option when using the current scope and it points to global
2015-12-02 19:25:40 +00:00
Maxime Coste
9a6347d6aa
Another try to fix csr problems ( #469 )
2015-12-02 01:12:24 +00:00
Maxime Coste
2a8a329b83
Remove support for %arg{#}, can be added back if we got a use case
...
It is very unlikely we need %arg{#} without needing a %sh anyway.
2015-12-02 01:08:41 +00:00
Maxime Coste
a02ad38fb4
Forward each params in %arg{@} separately
2015-12-02 01:01:48 +00:00
Maxime Coste
b2648053f9
Add argument expansion support
2015-12-01 20:07:14 +00:00
Maxime Coste
550a95a3d7
Change def -shell-params to def -params and take the counts as parameters
2015-12-01 14:00:55 +00:00
Maxime Coste
7335065d20
Update buffer display names after changing working directory
...
Fixes #501
2015-12-01 13:42:42 +00:00
Maxime Coste
1745344869
Run InsertIdle after reseting completer to permit InsertIdle to display an info box
2015-11-30 13:54:59 +00:00
Maxime Coste
e91da2bd43
Try to just reset the scroll region to workaround #469
2015-11-30 13:35:15 +00:00
Maxime Coste
a8d81e395b
Support dropping last jump and use it to fix :tag double jump push
...
Fixes #492
2015-11-27 13:57:46 +00:00
Maxime Coste
516e999a28
Disable history in all non interactive contexts
2015-11-27 13:50:40 +00:00
Maxime Coste
b4df57d369
Small cleanups
2015-11-27 13:50:40 +00:00
Maxime Coste
a81dbd90a1
Consolidate writing to fd
2015-11-27 13:50:40 +00:00
Maxime Coste
0b57103c72
Remind user hooks disable when replaying last insert
...
Fixes #495
2015-11-26 23:02:59 +00:00
Maxime Coste
de72c7d5d3
Add missing <cstdio> include
...
Fixes #498
2015-11-26 22:51:39 +00:00
Alex Leferry 2
5da00a0f14
add rc/grench.kak
2015-11-26 15:23:02 +01:00
Maxime Coste
f66bbdf209
select/split interpret count parameter as the capture group to use
...
count being 0 by default, we use the whole match, but we can now
specify to use capture 1 with 1s<regex><ret>.
2015-11-26 13:36:26 +00:00
Maxime Coste
9e08cf8ea4
Preserve default registers in exec/eval by default
2015-11-26 13:34:46 +00:00
Maxime Coste
001da44e11
Add -save-regs <regs> option to exec and eval to preserve registers
...
Fixes #279
2015-11-25 23:40:38 +00:00
Maxime Coste
3644f2a056
Refactor registers to initialize all of them at startup and add null register
...
Fixes #497
2015-11-25 21:48:17 +00:00
Maxime Coste
ec91ea17fe
Add a static const String::ms_empty empty string
2015-11-25 21:07:41 +00:00
Maxime Coste
3b5b781c5d
Reject non ascii register names
...
Fixes #493
2015-11-25 20:12:11 +00:00
Maxime Coste
e45b0c3ffc
Add StatusLine{Mode,Info,Value} built in faces
...
Fixes #491
2015-11-24 13:53:15 +00:00
Maxime Coste
ad5c8db7a8
Add support for various completions in :prompt
...
Fixes #489
2015-11-23 13:57:36 +00:00
Maxime Coste
36bf145b02
Support opening new files on kak -c command line
...
Fixes #485
2015-11-22 11:48:02 +00:00
Maxime Coste
7cf7f121e8
Fix onkey autoinfo
2015-11-21 17:21:21 +00:00
Maxime Coste
b0d696d994
Merge remote-tracking branch 'somasis/master'
2015-11-21 15:39:27 +00:00
Maxime Coste
a8d2c93ac8
Add a profiling debug flag to get timings for hooks/shell eval
2015-11-21 12:11:19 +00:00
Maxime Coste
5e4f5cd2a0
Move enum option handling in enum.hh and refactor enum options
2015-11-20 09:06:53 +00:00
Kylie McClain
77ba471020
Makefile: Allow for passing include/ncursesw path
2015-11-19 20:09:24 -05:00
Maxime Coste
c0f1b7b99f
Introduce a debug flags option to control some tracing
...
Support shell|hooks and write traces in debug buffer
2015-11-19 21:58:26 +00:00
Maxime Coste
2977cc97b3
Merge branch 'ws' of git://github.com/jubalh/kakoune
2015-11-19 21:56:45 +00:00
Maxime Coste
bf213b01dd
Keep an empty last line in debug buffer to provide auto scrolling
2015-11-19 21:33:50 +00:00
Kylie McClain
1ed66e9b6a
Fix building with musl libc
2015-11-19 20:23:55 +00:00
Maxime Coste
788c358720
Fix some cases where menu items are truncated needlessly
2015-11-19 20:23:27 +00:00
Michael Vetter
71f6ee3234
Remove trailing whitespaces
2015-11-19 16:31:00 +01:00
Maxime Coste
daf041e839
Implement some generic utilities to convert flags to/from strings
2015-11-19 00:17:52 +00:00
Maxime Coste
784ab635ee
Splitting an empty string now returns an empty vector
2015-11-19 00:17:18 +00:00
Maxime Coste
9656f088e7
Change autoinfo option to be a flags option, document flags options
...
Support the value1|value2|value3 syntax for flag options.
2015-11-18 23:47:28 +00:00
Maxime Coste
5c37f0dd5e
Propagate shell context through prompt/onkey/menu commands
2015-11-18 20:15:51 +00:00
Maxime Coste
5743ea7384
Respect count argument on search
2015-11-18 20:13:03 +00:00
Maxime Coste
8d47cf0674
Fix correctly ncurses menu size computations and avoid divide by 0
2015-11-18 20:12:16 +00:00
Maxime Coste
6925ff33b1
Send client dimensions on connection, avoid a race condition.
...
Fixes #429
2015-11-18 13:43:43 +00:00
Maxime Coste
a37858ece7
Put count and register normal mode params in the shell context
...
'10:echo %val{count}' will display 10
Fixes #10
2015-11-17 23:47:59 +00:00
Maxime Coste
6bd71c68e5
NCurses: Fix max menu item width computation
2015-11-17 23:34:03 +00:00
Maxime Coste
cb108b248a
Fix alias completion and overwritting
2015-11-17 13:55:27 +00:00
Maxime Coste
97cc166885
Try to restore the previously opened buffer when converting to client mode
...
Fixes #483
2015-11-16 13:52:33 +00:00
Maxime Coste
1bf0a964ce
Move is_basic_alpha to unicode.hh
2015-11-15 13:24:39 +00:00
Maxime Coste
111732005a
Support <c-v> to insert raw value in insert/prompt mode
2015-11-13 13:52:54 +00:00
Maxime Coste
67d1b7dcd1
Faster BufferIterator::operator++/--
2015-11-12 13:59:36 +00:00
Maxime Coste
2113b829df
Show an info box explaining that spaces disable history recording in command prompt
...
Fixes #477
2015-11-12 13:57:14 +00:00
Maxime Coste
d6168a90fc
Fix access to dead temporary
2015-11-11 19:14:35 +00:00
Maxime Coste
b73a890f8c
Document i attribute in face command info
2015-11-11 19:05:47 +00:00
Maxime Coste
a5c8437873
Remove unneeded conversion
2015-11-11 19:05:32 +00:00
Maxime Coste
892c3647e4
Fix to_lower/to_upper handling to correctly support non unicode chars
...
require a proper unicode locale setup on the system
Fixes #94
2015-11-11 00:21:20 +00:00
Maxime Coste
7bd3f4306d
Remove useless checks, buffer has always at list one line
2015-11-10 23:06:57 +00:00
Maxime Coste
217dd6a1de
Disable history when executing maps
...
Fixes #476
2015-11-10 21:24:47 +00:00
Maxime Coste
a0bcdd83df
Document default registers
2015-11-10 20:39:17 +00:00
Maxime Coste
9134066e85
Try to switch to last buffer when removing the current one
2015-11-10 13:52:48 +00:00
Maxime Coste
53184829ee
Avoid unneeded inc/dec rec in RefPtr::operator=
2015-11-10 13:50:15 +00:00
Maxime Coste
6e08716899
Refactor Normal input mode on_key method
2015-11-09 21:30:07 +00:00
Maxime Coste
6ecccf4119
Regex based normal mode command honor the selected register
...
They default to the '/' register for the default regex, but can
use another if specified with "<reg>
2015-11-09 21:28:18 +00:00
Maxime Coste
9b8e2526f9
Merge search hihglighter and regex option highlighter in dynregex
2015-11-09 09:34:03 +00:00
Maxime Coste
62c981fe2d
Small tweak in DynamicRegexHighlighter
2015-11-09 08:50:17 +00:00
Maxime Coste
a2d78941ba
Catch expression evaluation errors in line/column highlighters
2015-11-09 08:42:40 +00:00
Maxime Coste
12abb54a88
Slightly more performant regex capture gathering in select_all_matches
2015-11-09 08:42:12 +00:00
Maxime Coste
6840f7ce9c
Store the last used buffer in clients
...
Fixes #474
2015-11-07 18:25:49 +00:00
Maxime Coste
6bb775241c
Optimize BufferIterator to avoid a lot of pointer chasing
2015-11-07 16:55:48 +00:00
Maxime Coste
04c8334c98
Avoid useless StringDataPtr copy
2015-11-07 16:55:20 +00:00
Maxime Coste
28d451b844
Support 'current' scope in set/unset command
2015-11-06 13:56:48 +00:00
Maxime Coste
65e67b0656
Remove unused _ss UDL
2015-11-06 13:37:51 +00:00
Maxime Coste
33253a8fd5
Support 'V' for locked view control
...
Fixes #343
2015-11-05 13:40:40 +00:00
Maxime Coste
05f7337eb0
Change ncurses wheel down default button to 5
2015-11-05 13:28:58 +00:00
Maxime Coste
48a296dc71
Avoid an unneeded call to ensure_char_start
2015-11-04 20:10:12 +00:00
Maxime Coste
d6a2d77857
Fix double check_invariant in SelectionList construction, and set main selection to last
2015-11-04 19:53:47 +00:00
Maxime Coste
2ce0a5a8a8
Merge https://github.com/alpha123/kakoune
2015-11-04 19:49:21 +00:00
Maxime Coste
1c831b41da
always_inline a few RefPtr operators
2015-11-04 19:47:26 +00:00
Maxime Coste
e82ca36117
Avoid unneeded sort_and_merge_ovelapping call in select_all_matches
2015-11-04 19:43:25 +00:00
Maxime Coste
719997f0ab
Do not tag BufferIterator as random access
...
Boost regex considers that random access means fast distance
computation, which is not the case for BufferIterator where
Buffer::distance is O(num lines between them) which can get
big on large files.
Fixes #462
2015-11-04 01:01:52 +00:00
Maxime Coste
6273aa9443
Rework Buffer::distance implementation
2015-11-04 01:01:52 +00:00
alpha123
97c92368bc
Build on FreeBSD
2015-11-03 11:51:27 -07:00
Maxime Coste
e8239feddf
Minor cleanup in normal.cc
2015-11-03 13:59:05 +00:00
sinetek
4b8c03afe6
Adding support for DragonFlyBSD.
2015-11-03 01:14:34 +07:00
Maxime Coste
c8d2417646
Support horizontal centering in view commands (using m)
...
Fixes #442
2015-11-02 19:51:59 +00:00
Maxime Coste
17eef4a7dc
Use explicit lambda captures
2015-11-02 13:44:03 +00:00
Maxime Coste
2bf44b6b49
Make word insert completion work better with unicode char
2015-10-30 13:57:46 +00:00
Maxime Coste
f556ef12c4
Fix preservation of entered text in option insert completer
2015-10-30 13:08:07 +00:00
Maxime Coste
34d7bdbc01
Minor code cleanup in insert_completer.cc
2015-10-30 13:07:48 +00:00
Maxime Coste
32b51e2cc3
Use ranked matches for option completion as well
2015-10-29 13:57:50 +00:00
Maxime Coste
8030897708
Merge branch 'master' into ranked-word-completion
2015-10-29 13:44:55 +00:00
Maxime Coste
24043bbffe
Use an heuristic based match ranking algorithm inspired by what YouCompleteMe does
2015-10-29 13:36:30 +00:00
Maxime Coste
4b7b04bf59
Fix mouse scrolling up stopping at line 2
...
Fixes #448
2015-10-28 00:01:25 +00:00
Maxime Coste
89d22f3335
Move more logic into RankedMatch
2015-10-27 21:25:18 +00:00
Maxime Coste
2eba789610
Merge branch 'master' into ranked-word-completion
2015-10-27 13:33:15 +00:00
Maxime Coste
40c6edf243
Document exclusive attribute
2015-10-23 13:49:02 +01:00
Maxime Coste
5118e13aee
Remove useless std::move
2015-10-23 13:46:55 +01:00
Maxime Coste
e7152bad56
Add an exclusive attribute that overrides existing face
2015-10-23 13:46:41 +01:00
Maxime Coste
1ba37bacd8
Fix optimized linkage
2015-10-23 09:49:06 +01:00
Maxime Coste
c77cb7c777
Extract WordDB::RankedWord as RankedMatch in its own file
2015-10-22 19:49:08 +01:00
Maxime Coste
da7fc3311f
Pass ShellContext to commands
...
Fix #427
2015-10-22 13:59:23 +01:00
Maxime Coste
e51ef6c3c2
Wrap the shell params en env vars in a ShellContext struct
2015-10-22 13:48:57 +01:00
Maxime Coste
7346220e38
Fix :set completion when -add switch is given
2015-10-22 13:29:34 +01:00
Maxime Coste
5938712d1f
Support :set -add on strings, using concatenation
2015-10-22 13:21:59 +01:00
Maxime Coste
019b3235b0
Remove legacy WordDB::find_matching method
2015-10-21 20:16:36 +01:00
Maxime Coste
2bf391f36d
Sort insert completer words by name favoring lower case and then stable sort by rank
2015-10-20 13:50:55 +01:00
Maxime Coste
9449f763e0
Fix removal of duplicated words in insert completion
2015-10-19 19:39:05 +01:00
Maxime Coste
73e438be07
Fix handling of explicit insert completers
2015-10-19 13:43:23 +01:00
Maxime Coste
364914afbd
Do not filter completions in InsertCompleter anymore
...
Just rerun the actual completers
2015-10-18 17:51:13 +01:00
Maxime Coste
4f2584a091
Experiment with ranked word completion depending on word boundaries
2015-10-18 16:55:21 +01:00
Maxime Coste
944d8f53fb
Fix OSX compilation
2015-10-18 12:45:27 +01:00
Maxime Coste
2cd0ce41ac
Do not try to extend last match when updating regex matches
...
It does not work well with regexes starting with a lookbehind, as
we would need to reparse from further away, leading to the last
match just being removed. It seems safer not to remove it, as
the motivating use case (multiline macros) is better left to
regions anyway.
Fixes #440
2015-10-18 11:37:04 +01:00
Maxime Coste
76fadd8108
More cleanups in the buffer open/reload code
2015-10-17 11:33:09 +01:00
Maxime Coste
fe704b9b84
Move line parsing and to Buffer.cc directly
2015-10-17 11:33:09 +01:00
Maxime Coste
3795ff735a
Refactor buffer creation and reloading to be more explicit
...
Reloading used to be implicit in the buffer creation function,
which is not always nice, as code that explicitely wanted to
reload a buffer could not say so.
2015-10-17 11:33:09 +01:00
Maxime Coste
776059a4c3
Fix double destruction of local ui
2015-10-14 13:21:27 +01:00
Maxime Coste
43fb216772
Remove unneeded constructor
2015-10-14 08:49:13 +01:00
Maxime Coste
572cf9d6b2
Fix file change detection not working in certain cases
...
Files opened from the command line where not handled correctly.
2015-10-13 19:31:24 +01:00
Maxime Coste
49557f5b17
Restore info box after a resize as well
...
Fixes #425
2015-10-13 13:58:39 +01:00
Maxime Coste
9f78f9bfd5
Try to restore menu after a resize
2015-10-13 13:52:02 +01:00
Maxime Coste
e5240ba4ff
Fix NCursesUI::m_items not being empty after a resize
...
Fixes #435
2015-10-13 13:40:04 +01:00
Maxime Coste
2d7e99da98
Tweak file change checking timeout handling
2015-10-10 14:18:43 +01:00
Maxime Coste
50f5140cbd
When displaying a prompt content with line break char, replace them with their unicode control picture
2015-10-09 13:55:55 +01:00
Maxime Coste
256e4d7862
NCursesUI: Remove color restoring support
2015-10-09 13:43:13 +01:00
Maxime Coste
a4447819e5
Fix OSX compilation
2015-10-09 13:41:28 +01:00
Maxime Coste
0d8b9c6677
Tweak handling of SIGINT
2015-10-08 20:23:32 +01:00
Maxime Coste
473196e18d
Store color/color pairs mapping in the ncurses ui instance
2015-10-08 20:23:32 +01:00
Maxime Coste
bd01171861
Auto fork server when suspending the local client
...
That way, other clients can still be serviced by the server.
2015-10-08 20:05:47 +01:00
Maxime Coste
7776c38755
Detect ungraceful exits, and backup modified buffers in these cases
2015-10-08 13:43:39 +01:00
Maxime Coste
3098cd12f8
Check for terminal resize on SIGCONT
...
Fixes #423
2015-10-08 13:24:58 +01:00
Maxime Coste
5e4443812c
Fix warning in ncurses_ui.cc
2015-10-06 21:15:13 +01:00
Maxime Coste
67646cd45a
Cleanup insert_completer code and use markup for option completion menu entry
2015-10-06 13:37:16 +01:00
Maxime Coste
c41a7eed09
Fix display of path insert completion for absolute paths
2015-10-05 23:30:20 +01:00
Maxime Coste
31cc61b6fc
Allow parsing empty strings as default color in face descs
2015-10-05 20:32:51 +01:00
Maxime Coste
db2fa6f5cb
Support markup in menu command
2015-10-05 13:51:13 +01:00
Maxime Coste
69b16d814b
Display word insert completion buffer name in a different color
2015-10-05 01:48:00 +01:00
Maxime Coste
c54e6738b9
Use DisplayLine for menu choices
2015-10-05 01:25:23 +01:00
Maxime Coste
38e9bf4f96
Fix OSX compilation
2015-10-03 11:21:35 +01:00
Maxime Coste
f7ba2a896c
Tweak ui_options docstring
2015-10-02 13:56:19 +01:00
Eike Plack
faa3b3b173
Add self documentation to ui_options
...
* For now the non ui code will hold this information. Ideally the UI would
be able to describe its options in some way.
2015-10-02 13:54:08 +01:00
Maxime Coste
a6cd764042
Add ncurses_enable_mouse ui option
2015-10-02 13:52:41 +01:00
Maxime Coste
bb96ad44b2
Refactor ShellManager process spawning
2015-10-02 13:37:06 +01:00
Maxime Coste
1cb4d2965f
Fix '*' word boundary detection at begin/end of buffer
2015-10-01 19:35:42 +01:00
Maxime Coste
77408becbd
Fix removing shared highlighters
2015-09-30 00:18:37 +01:00
Maxime Coste
6913d5427c
Try to fix OSX compilation
2015-09-27 18:48:01 +01:00
Maxime Coste
9fdb822c27
Add support for italic text attribute
2015-09-27 14:24:42 +01:00
Maxime Coste
e2720f1fbe
Store timespec for buffer fs timestamps, not just time_t
...
time_t has a resolution of one second, which cause troubles when
a file changes multiple time during that same second.
2015-09-27 11:55:34 +01:00
Maxime Coste
3262a6902c
Allow custom separator for line numbers
...
the number_lines highlighter accepts a -separator <arg> switch
to change the default '│' separator.
Fixes #295
2015-09-25 13:47:57 +01:00
Maxime Coste
4ea89def3b
Avoid (*it++) pattern in utf8.hh
2015-09-25 13:19:21 +01:00
Maxime Coste
48a7448b11
Merge remote-tracking branch 'freefull/master'
2015-09-24 23:01:20 +01:00
Filip Szczepański
47e6eed7c9
Add Haiku support.
2015-09-24 22:36:29 +00:00
Maxime Coste
aa4b98af7c
Add utf8::read_codepoint that both gets the codepoint and advance iterator
2015-09-24 23:00:47 +01:00
Maxime Coste
12ef466f3a
Avoid redundant calls to get_face in highlight_selections
2015-09-24 13:55:06 +01:00
Maxime Coste
e601bd5fe8
Minor additional cleanup in utf8.hh
2015-09-23 22:09:37 +01:00
Maxime Coste
ceafa5459a
Avoid unneeded iterator copies in utf8.hh
2015-09-23 19:48:15 +01:00
Maxime Coste
27571a7716
Refactor utf8::iterator to be on the safe side
...
utf8::iterator now knows the iterator valid range, and pass
it to utf8 functions.
2015-09-23 19:39:21 +01:00
Maxime Coste
b5972cd647
Tweak utf8::iterator::distance implementation, remove unused advance method
2015-09-23 19:30:47 +01:00
Maxime Coste
6ec693d598
Cleanup compute_needed_size implementation
2015-09-23 00:43:40 +01:00
Maxime Coste
eed3e5459d
Cleanup ncurses string writing code
2015-09-23 00:40:09 +01:00
Maxime Coste
3c000cbd0d
Error when trying to run an empty register as a macro
2015-09-22 19:01:24 +01:00
Maxime Coste
8529720aef
Fix some redrawing problems after resize
2015-09-21 22:12:23 +01:00
Maxime Coste
8b9452680a
Use different object filenames between debug/non-debug builds
2015-09-21 13:39:11 +01:00
Maxime Coste
459d0baf79
Tweak string unit tests
2015-09-20 17:18:43 +01:00
Maxime Coste
22f3881cad
Fix prompt history handling when pressing the down key
2015-09-20 17:02:37 +01:00
Maxime Coste
01152d7cd9
Improve escaping of % in command parsing
2015-09-20 11:48:11 +01:00
Maxime Coste
ca2043d9f2
Fix unescape implementation
2015-09-20 11:47:20 +01:00
Maxime Coste
2b4b73ae8e
Remove the default_face parameter of parse_display_line
...
No need to define a default face there, we will pass a default face
to UserInterface::draw_status later.
2015-09-20 11:34:13 +01:00
Maxime Coste
b3e0e27d1f
Do not allow '\n' in display lines, replace with a space
2015-09-20 11:23:10 +01:00
Maxime Coste
574e337132
Improve command completion by taking into account quoting of arguments
2015-09-20 11:19:10 +01:00
Maxime Coste
f59108072f
Initial support for user configurable modeline with the modelinefmt option
...
modelinefmt is first sent through a command line expander (so %sh{...},
%val{...} et al. are expanded), then through markup expand (so that
{face} are interpreted as well)
2015-09-19 12:43:39 +01:00
Maxime Coste
6bc5f8c3a3
Add simple markup support to generate display lines from strings
...
The syntax is simply {face} to enable the given face, use \{ to
escape a {, and \\ to escape a \.
2015-09-19 12:19:17 +01:00
Maxime Coste
db8c12fd2a
Be tolerant to modifiers in <c-x> bindings
...
<c-x><c-f> should be accepted, as it is cumbersome to unpress
control before hitting f in that case.
2015-09-19 11:55:55 +01:00
Maxime Coste
96b6b1b647
Tweak NCursesUI behaviour to reduce flickering on resize
2015-09-19 11:30:17 +01:00
Maxime Coste
d2c4d22d1f
Keep it simple, remove all that sorted id map thing
2015-09-18 13:52:32 +01:00
Maxime Coste
6a6b22d92c
Fix libstdc++ 4.8 compatibility
2015-09-17 20:03:58 +01:00
Maxime Coste
e7a8f64722
Use a sorted IdMap for aliases
2015-09-16 22:32:02 +01:00
Maxime Coste
bab95491c8
Keep sorted state when transmitting id maps
2015-09-16 22:29:19 +01:00
Maxime Coste
36828e6059
IdMaps can be sorted, in which case the find method uses a binary search
2015-09-16 22:22:51 +01:00
Maxime Coste
c859e8ab5f
Create directory with 0777 mode in make_directory
...
Fixes #408
2015-09-16 20:17:31 +01:00
Maxime Coste
693d9a4861
Store key hash in IdMap
2015-09-16 20:02:12 +01:00
Maxime Coste
afad50514b
Simpler IdMap::operator==
2015-09-16 19:25:12 +01:00
Maxime Coste
73c0fa175e
Use IdMap instead of UnorderedMap for ui options and env vars
2015-09-16 19:04:19 +01:00
Maxime Coste
85918d9f15
use getpwuid(geteuid())->pw_name rather than getlogin()
...
getlogin() can fail when stdin is not a tty on certain configuration
as it needs to find a controling terminal.
2015-09-15 13:32:26 +01:00
Maxime Coste
0338c0f437
Fix compilation with std regex
2015-09-15 13:28:36 +01:00
Maxime Coste
fd0567c730
Do not touch the first 16 colors in ncurses UI
2015-09-14 14:47:37 +01:00
Maxime Coste
a4804afa42
Restore redraw on <c-l> in ncurses ui
2015-09-14 14:30:01 +01:00
Maxime Coste
e0049bb587
Fix backward search searching from on char before the corret one.
...
Fixes #406
2015-09-14 14:28:45 +01:00
Maxime Coste
a2b4bf09fd
Fix color restoring
2015-09-12 10:54:55 +01:00
Maxime Coste
ad2aa35546
Fix ncurses info box avoiding dead menus
2015-09-12 10:51:46 +01:00
Maxime Coste
5173dad470
Add some missing memory domains
2015-09-12 10:51:16 +01:00
Maxime Coste
8aca7622bf
Restore keypad support in ncurses ui
2015-09-11 13:54:37 +01:00
Maxime Coste
2334a57970
Reduce allocation count in file.cc
2015-09-11 13:49:08 +01:00
Maxime Coste
afbe2f10d5
Slight refactor of NCursesUI ui_options handling
2015-09-11 13:20:37 +01:00
Maxime Coste
6ac1ae56fb
Small code style tweak in insert_completer.cc
2015-09-11 13:07:51 +01:00
Maxime Coste
6292d451cf
Small code cleanup in ncurses_ui.cc
2015-09-11 13:07:51 +01:00
Maxime Coste
5a5a78c608
Improve redraw behaviour on resize
2015-09-11 11:46:39 +01:00
Maxime Coste
34d0f63fd9
Use wgetch rather than getch to avoid unwanted redraws
2015-09-11 00:05:31 +01:00
Maxime Coste
80726a789b
Refactor NCursesUI implementation, use pads instead of windows
2015-09-10 23:39:19 +01:00
Maxime Coste
a685a928f7
Try to restore colors to hard coded xterm palette on ncurses quit
...
Fixes #327
2015-09-10 23:38:05 +01:00
Maxime Coste
182cc368a0
Tweak BufferManager::delete_buffer implementation
2015-09-08 13:10:22 +01:00
Maxime Coste
fede8da14b
Delete all existig window before resizing
2015-09-07 23:52:34 +01:00
Maxime Coste
29b508a894
Avoid wrapping lines with negative max width
2015-09-07 23:29:01 +01:00
Maxime Coste
53b65401f8
Small info box handling in cleanup in ncurses
2015-09-07 23:15:21 +01:00
Maxime Coste
30ad9a0475
Complete aliases in command prompt
2015-09-06 18:09:32 +01:00
Maxime Coste
a45876124b
Avoid restoring selections in regex_prompt when they cannot have been modified
2015-09-04 19:00:42 +01:00
Maxime Coste
ae720b90b1
Small code tweak in show_whitespaces highlighter
2015-09-04 13:47:16 +01:00
Maxime Coste
ededc84c8c
Remove some useless code in remote.cc
2015-09-03 23:17:57 +01:00
Maxime Coste
f81e5593db
Tweak headers in shell_manager.hh, no need for regex.hh
2015-09-03 13:54:21 +01:00
Maxime Coste
e69db0f671
Regex are overkill for shell manager env vars, we just need exact match or prefix match
2015-09-03 13:21:35 +01:00
Maxime Coste
ea7f76f7f2
Change ncurses title logic, use hard coded \033]2;<title>\007 sequence
...
And add a ncurses_set_title ui option defaulting to true.
2015-09-03 00:03:07 +01:00
Maxime Coste
995a094471
Fallback on /usr/share/kak if the relative runtime path does not exists
2015-09-02 22:28:41 +01:00
Maxime Coste
a7d93fa11e
std::accumulate is in <numeric> not <algorithm>
2015-09-02 21:15:16 +01:00
Maxime Coste
da5e662cf8
Add missing include
2015-09-02 20:59:45 +01:00
Maxime Coste
64a5948e1c
comparison ops for MatchAndBuffer should be const
2015-09-02 13:54:17 +01:00
Maxime Coste
455cca19db
Add support for a separate menu text in insert completions
...
Display buffer of origin in word completion menu
2015-09-02 13:43:07 +01:00
Maxime Coste
1295bc95cc
Fix clang compilation
2015-09-02 13:35:50 +01:00
Maxime Coste
adcd0a03b1
Fix forward declare struct/class mismatch
2015-09-02 13:34:18 +01:00
Maxime Coste
e9d7d70e47
Cache buffer display name
2015-09-01 20:49:47 +01:00
Maxime Coste
ae7dc3c576
Simplify runtime_directory
2015-09-01 13:51:57 +01:00
Maxime Coste
b512f3220f
Detect normal mode count overflow
2015-08-31 20:34:45 +01:00
Maxime Coste
c603d39a20
Merge remote-tracking branch 'elegios/master'
2015-08-31 00:02:59 +01:00
Maxime Coste
6071e636a2
Use a named struct for insert completion candidates
2015-08-30 23:02:20 +01:00
Maxime Coste
f666cd9c69
Merge remote-tracking branch 'Maroniemann/master'
2015-08-30 15:48:45 +01:00
Clemens Stadlbauer
3db95ce50c
Prevented incorrect softlink from being created
...
If the "autoload" directory softlink has already been created,
"make install" would place a recursive softlink inside it on the
next install, which made future installs fail.
2015-08-30 13:30:15 +02:00
Maxime Coste
64c21b93a5
Additional code tweak in command_manager.cc
2015-08-29 21:39:23 +01:00
Maxime Coste
ac78cfa11c
Add missing std::move, avoid a needless string copy
2015-08-28 13:54:12 +01:00
Maxime Coste
1249df9c76
Avoid using an UnorderedMap for 4 elements...
2015-08-27 21:36:49 +01:00
Maxime Coste
36b82c42e5
Refactor command parsing, maintain coordinates while reading the string
2015-08-27 21:32:04 +01:00
Maxime Coste
b529288176
Small code cleanup in command_manager.cc
2015-08-27 13:57:56 +01:00
Maxime Coste
04536657d1
Add a kill command that kills the current session
...
Fixes #331
A given session can be killed with 'echo kill | kak -p <session>'
2015-08-26 19:34:19 +01:00
Maxime Coste
0c41c14187
Reorganize slightly local client creation
2015-08-26 19:33:52 +01:00
Viktor Palmkvist
b53d9e282e
Fix segfault in edge case when jumping backwards in jumplist
...
Closes #380
2015-08-26 11:54:51 +02:00
Viktor Palmkvist
1bdaf0675d
Argument text object no longer handles <>
2015-08-25 15:56:49 +02:00
Maxime Coste
0755366cb1
Rework resize handling
...
Fixes #383
2015-08-23 15:18:18 +01:00
Maxime Coste
a2e90c2c25
Add support for listing existing sessions with kak -l
...
Fixes #381
2015-08-23 14:22:23 +01:00
Maxime Coste
71e362e2f9
Move session socket to /tmp/kakoune/<user name>/<session>
2015-08-23 14:13:46 +01:00
Maxime Coste
ae839fc471
Remove Client::window() method, use a force_redraw() one
...
We cannot assume Client::m_window is always non-null, as when
changing current buffer its temporarily null, at the point
where WinCreate hook might get called.
Fixes #382
2015-08-23 13:29:24 +01:00
Maxime Coste
dc504284c3
Change flag lines highlighter to use faces instead of colors
...
Fixes #130
2015-08-23 12:13:14 +01:00
Maxime Coste
504862fce7
Avoid double session closing
2015-08-22 11:27:48 +01:00
Maxime Coste
47ab4038ec
Format session socket name in place into the sockaddr_un
2015-08-22 11:27:04 +01:00
Maxime Coste
564ab7d942
Merge remote-tracking branch 'zakgreant/reference-sheet-scripts'
2015-08-20 20:13:48 +01:00
Maxime Coste
689494fb2f
Fix reentrency in Normal::handle_key
2015-08-20 19:16:14 +01:00
Maxime Coste
3834a967f8
No reason for NestedBool operator bool to be explicit
2015-08-19 21:20:34 +01:00
Maxime Coste
8af3b52bfa
Add alternative names to ^ (caret) and @ (arobase) registers
2015-08-19 21:20:01 +01:00
Maxime Coste
7ee027b125
Use the "<reg> syntax along with a default register for marks and macros
...
Marks use the '^' register by default, macros the '@' register.
2015-08-19 13:58:37 +01:00
Maxime Coste
baf0203b9d
Default register is not handled by the Normal input mode.
...
Normal input mode will just pass 0 as the reg if it was not specified
by the user, its yank/paste functions that should determine 0 means
use '"' register.
2015-08-19 13:41:16 +01:00
Maxime Coste
3f493fa186
Rename Disableable to more general NestedBool
...
A NestedBool can be set multiple times, and will be considered false
only when unset the same number.
2015-08-18 23:17:56 +01:00
Maxime Coste
a33c8d9677
Smaller sizeof for in place strings
2015-08-18 21:06:53 +01:00
Maxime Coste
386f41e1c5
Be more explicit about paramater parsing error
2015-08-18 00:28:04 +01:00
Maxime Coste
f2580a366d
Cleanup key to codepoint conversion
...
Fixes #378
Fixes #365
2015-08-18 00:19:14 +01:00
Maxime Coste
043ca99983
Cleanup mouse handling a little
2015-08-16 14:06:07 +01:00
Zak Greant
dc2d12a124
Fixing minor typo
...
s/prevous/previous/
2015-08-15 16:46:57 +02:00
Maxime Coste
97b871d49e
Tweak notify_fatal_error message box title, might not be an assert failed
2015-08-14 13:16:06 +01:00
Maxime Coste
92d3178305
Clamp m_anchor in mouse handler, nothing garantees that it is still valid
...
Fixes #350
2015-08-14 13:12:44 +01:00
Maxime Coste
d2b82f507f
More performant escape/unescape
2015-08-13 22:04:21 +01:00
Maxime Coste
7a36a4644e
Detect face being aliased to itself
...
Fixes #374
2015-08-12 21:49:29 +01:00
Maxime Coste
d2762e6a1a
Try to fix compilation on travis
2015-08-12 19:16:52 +01:00
Maxime Coste
7086135fa6
Display auto info on register insertion/explicit insert completion
2015-08-11 20:36:07 +01:00
Maxime Coste
8d9c402f52
Handle registers insert/explicit completion with a nested on_next_key mode
2015-08-11 13:55:56 +01:00
Maxime Coste
d7744308f6
Ensure the command exist before adding an alias
...
Fixes #371
2015-08-11 13:37:38 +01:00
Maxime Coste
94ec1cdde7
Add an unset command to remove an option value (falling back to parent)
...
unset is not applicable to global scope.
2015-08-10 13:54:52 +01:00
Maxime Coste
10d8cf64cf
Move option docstring obtention to OptionRegistry
2015-08-10 13:53:30 +01:00
Maxime Coste
bfb116b8b4
Move option name completion to the OptionRegistry
...
Option names are the same for every option manager.
2015-08-10 13:38:06 +01:00
Maxime Coste
2eced81753
clamp coordinates find_buffer_coord
2015-08-09 23:18:26 +01:00
Maxime Coste
9d50dd3886
Use a struct rather than a std::pair for InputHandler::Insertion
2015-08-08 22:46:11 +01:00
Maxime Coste
7a59a6d758
ensure a buffer is not referenced a second time, just before actually deleting it
...
It can happen in certain case that a buffer gets referenced after it
gets moved to the trash, for example when it gets deleted during its
construction (due to BufCreate hook for example).
2015-08-06 21:51:44 +01:00
Maxime Coste
e7b4217762
Support flags getting modified by hooks at buffer creation
...
Fixes #361
2015-08-04 23:02:40 +01:00
Maxime Coste
d19df5d5de
Enable more invariant checking in selection lists
2015-08-03 11:23:40 +01:00
Maxime Coste
19c52c3d61
Fix command parsing bug
...
Fixes #347
2015-07-30 09:41:23 +01:00
Maxime Coste
3da9458b5e
Merge remote-tracking branch 'lenormf/autoinfo_number'
2015-07-29 10:44:39 +01:00
Frank LENORMAND
b7e232d230
Add the 'n' flag to the autoinfo popup window
2015-07-29 10:20:11 +03:00
Maxime Coste
12e0f46e25
Use forward declaration instead of include in commands.hh
2015-07-28 20:18:18 +01:00
Maxime Coste
6b06d77490
Small formatting fix
2015-07-27 20:43:18 +01:00
Maxime Coste
1170277e91
Always inline Allocator::construct/destroy
2015-06-26 21:32:37 +01:00
Maxime Coste
1af82e2e24
Tweak regex constructor calls
2015-07-25 11:15:03 +01:00
Maxime Coste
6bed464105
Avoid appending chars one by one in some parsing functions in CommandManager
2015-07-25 08:56:27 +01:00
TSUYUSATO Kitsune
4a20882a8d
CPPFLAGS should use to specify flags for C pre-processor
2015-07-25 10:20:33 +09:00
Maxime Coste
6f337b254d
Fix warning
2015-07-24 13:57:44 +01:00
Maxime Coste
ea02467564
Disable notifications when disabling an option temporarly
2015-07-23 23:42:48 +01:00
Maxime Coste
58101645ab
Rewrite select_lines and trim_partial_lines
...
Fixes #338 for real (I hope)
2015-07-23 21:03:38 +01:00
Maxime Coste
2946504a17
Improve column highlighter to cooperate better with other highlighters
...
Fixes #268
2015-07-23 13:58:23 +01:00
Maxime Coste
889bc98866
fix crash in trim_partial_lines
...
Fixes #338
2015-07-23 13:46:20 +01:00
Maxime Coste
36ffff96be
Avoid copying selection before the first line
2015-07-22 23:24:20 +01:00
Maxime Coste
733e004d44
Fix potential crash
2015-07-22 18:38:44 +01:00
Maxime Coste
82145168ec
Add /usr/include/ncursesw in the include dirs list
2015-07-22 18:38:01 +01:00
Maxime Coste
3019118b10
Style tweak in client.cc
2015-07-22 13:30:03 +01:00
Maxime Coste
d55297c12d
Remove -rdynamic from cygwin LDFLAGS
2015-07-20 13:17:03 +01:00
Maxime Coste
10f4bb5872
Add support for FocusIn/FocusOut events from UI
2015-07-15 13:56:31 +01:00
Maxime Coste
f8e4bb09f2
Merge remote-tracking branch 'ekie/makefile_fix'
2015-07-14 22:02:51 +01:00
Maxime Coste
17e3be48a5
Transform boost/std regex_error to Kakoune::regex_error at Regex construction
...
Fixes #318
2015-07-14 21:06:41 +01:00
Eike Plack
441ad1511d
Install color schemes
2015-07-14 19:44:03 +02:00
Maxime Coste
7d9ec52bf2
Only allow 'sane' register names
...
Fixes #316
2015-07-14 13:48:39 +01:00
Maxime Coste
f87dbe410f
Add missing support for Codepoint in format
2015-07-14 13:47:51 +01:00
Maxime Coste
c1b9ea4d1e
Formatting tweak
2015-07-13 13:57:43 +01:00
Maxime Coste
c44c8c3d1f
Use different variable for pipe command in/out text
2015-07-13 13:50:36 +01:00
Maxime Coste
905af05c61
Move Context scope access helpers as inline methods
2015-07-13 13:43:52 +01:00
Maxime Coste
24de3ed822
Move selection saving/restoring to z/Z
...
Fixes #284
2015-07-11 11:36:23 +01:00
Maxime Coste
a15d816ea8
Use a named struct Empty in optional
2015-07-10 19:05:21 +01:00
Maxime Coste
1d1927647a
Fix formatting
2015-07-09 13:53:21 +01:00
Maxime Coste
f1c286e592
Notify user when some hooks failed
2015-07-08 14:00:50 +01:00
Maxime Coste
883a14e853
Do not allow exiting insert mode while running InsertEnd hook.
...
Fixes #311
2015-07-08 13:53:19 +01:00
Maxime Coste
123541822b
Gracefully handle exception when opening files given on command line
...
Fixes #310
2015-07-08 13:43:40 +01:00
Maxime Coste
f65d41a30a
Fix scrolling down hiding the cursor with scrolloff == 0
2015-07-08 13:43:32 +01:00
Maxime Coste
3c4400c5fd
Change scrolloff behaviour, allow displaying pas the end of buffer
...
Fixes #306
2015-07-07 22:36:27 +01:00
Maxime Coste
1cbaac5323
Fix window position computation that could get negative with big scroll offsets
2015-07-06 13:10:36 +01:00
Maxime Coste
72b7a8910b
Print connection failed messages with a newline
...
Fixes #308
2015-07-05 13:39:30 +01:00
Maxime Coste
b7be43f9b9
Merge remote-tracking branch 'xificurC/master'
2015-07-03 20:59:41 +01:00
Maxime Coste
eedf7d6c68
Fix mouse coordinates in ncurses ui with status on top
2015-07-03 18:44:25 +01:00
Maxime Coste
12dd7b04ac
Try to simplify argument selector, abandon pair matching checks
...
Recognize both , and ; as argument separator
2015-07-02 13:41:50 +01:00
Maxime Coste
2660793a31
Small refactoring in selectors.cc
2015-07-01 23:54:17 +01:00
Maxime Coste
28ebe776c0
Refactor select_arguments and slightly change behaviour for non-inner
...
non inner argument contains the argument, preceeding whitespaces,
and eventual ending comma, except for first arguments (that
contains the whitespaces after the comma), and last argument (that
contains the comma before it).
2015-07-01 23:47:22 +01:00
Maxime Coste
33616f4192
Merge branch 'remap-objects' of http://github.com/elegios/kakoune
2015-07-01 22:08:17 +01:00
Viktor Palmkvist
ab2007bd4e
Add remapping of text object keys
2015-07-01 17:53:38 +02:00
Viktor Palmkvist
13d212f445
Added argument text object
2015-07-01 17:42:10 +02:00
Maxime Coste
ee6fc92ae2
Fix stupid bug in '*'
2015-07-01 13:33:20 +01:00
Maxime Coste
58d115ec88
Force redraw all clients after a face changed
2015-06-30 19:12:25 +01:00
xificurC
fbb216d2ed
commands starting with horizontal whitespace don't go into the history
2015-06-30 16:06:49 +02:00
Maxime Coste
670d8f7d1e
Use tparm instead of tiparm
2015-06-30 13:35:51 +01:00
Maxime Coste
eb4ac85fb1
Force setting of terminal hardware scroll region on resize
...
It seems there is a race condition with VTE based terminals when
created and resized almost immediatly (like when doing :new) where
we end up with the hardware scroll region set to the old terminal
size.
2015-06-30 09:08:44 +01:00
Maxime Coste
130b22ff74
Refactor resize handling in NCursesUI
2015-06-30 00:31:26 +01:00
Maxime Coste
3fe8446065
Use StatusLine face as default for the status line
2015-06-29 22:48:26 +01:00
Maxime Coste
05b4d95a56
Run BufReadFifo hook after reading from fifo
2015-06-28 11:06:19 +01:00
Maxime Coste
8795a56731
Merge overlapping selections before erasing
...
Overlapping selections on erase confuse the ForwardChangeTracker
and will confuse the user,
Fixes #298
2015-06-28 10:16:39 +01:00
Maxime Coste
bf09f464c2
Use a relative symlink for autoload
2015-06-27 16:12:04 +01:00
Maxime Coste
44d7910336
Merge branch 'master' of http://github.com/tduzan/kakoune
2015-06-27 11:02:16 +01:00
Maxime Coste
e1ba2991f5
Initial selection saving/restoring support bound to ^ and alt-^
2015-06-27 11:02:08 +01:00
tduzan
3bd8c36b74
Removed the '-r' flag from the ln command in the install step of the Makefile. It is not a POSIX compliant option, therefore does not work on BSD or OS X. Reference GH Issue#286.
...
Based on my understanding of this Makefile, the '-r' flag is unnecessary and didn't do anything additional. The pathspec for both the source and target are explicit using a variable for a portion.
Will test via Homebrew following pushing this to my fork.
2015-06-26 12:35:03 -06:00
Maxime Coste
5b554ff474
Add support for command completion on commands, use it for :new
...
That means commands can be completed using other commands and their
completers. Yes that does makes sense.
Closes #296
2015-06-26 13:57:23 +01:00
Maxime Coste
b579f90bae
Make sure we do not put a Value in a Value
2015-06-25 19:45:42 +01:00
Maxime Coste
cf33a062df
Force redraw window after adding/removing highlighters
2015-06-25 19:45:41 +01:00
Maxime Coste
d207d13b68
Avoid unneeded default constructor call in Optional
2015-06-25 13:36:45 +01:00
Maxime Coste
cc09c36fe0
Minor reorganisation in buffer.hh
2015-06-25 13:36:23 +01:00
Maxime Coste
26cfd6af9b
Style tweak
2015-06-24 13:44:47 +01:00
Maxime Coste
b97b907b2a
Fix include
2015-06-24 13:40:18 +01:00
Maxime Coste
fa4c486b69
Always redraw status when redrawing the main window
...
That is needed so that on resize the status line does not disappear
2015-06-24 13:35:46 +01:00
Maxime Coste
6870895374
Add support for hex formatting
2015-06-22 13:56:00 +01:00
Maxime Coste
7e6b02f26a
Refactor slightly window redrawing
2015-06-22 13:34:22 +01:00
Maxime Coste
3834440298
Rework window redraw handling, should redraw window less often
2015-06-21 19:56:23 +01:00
Maxime Coste
7c22ff217d
Improve ncurses redraw behaviour
2015-06-21 19:51:14 +01:00
Maxime Coste
2162157752
Display pid in fatal signal message
2015-06-21 19:44:43 +01:00
Maxime Coste
75dd74ff43
Use <a-R> as replace paste all yanked selections
...
Move rotate to ' and rotate contents to <a-'>
Fix segfault when pasting all and nothing was yanked yet
2015-06-21 19:36:13 +01:00
Maxime Coste
64cbdcd328
Merge remote-tracking branch 'ekie/fix_edit'
2015-06-20 15:04:39 +01:00
Maxime Coste
7fd7098265
Add a combine_hash helper function
2015-06-20 15:04:31 +01:00
Maxime Coste
6d23bb056a
Fix wrong exception type in str_to_int
2015-06-19 18:29:58 +01:00
Eike Plack
1bdc98abd3
Fix Self Documentation
2015-06-19 17:10:16 +02:00
Maxime Coste
fce2a21690
Fix segfault on g. when last modification position past buffer end
2015-06-18 19:51:04 +01:00
Maxime Coste
bf46870ff2
Move status/mode line drawing as a separate ui method
2015-06-17 21:28:02 +01:00
Maxime Coste
7417c5e9e2
Resolve symbol names in Cygwin Backtrace::desc implementation
2015-06-16 18:49:56 +01:00
Maxime Coste
d8e2e9e043
Small formatting fix
2015-06-15 23:00:37 +01:00
Maxime Coste
3fb783f7f9
Add <a-;> in insert mode to execute a single normal mode command
2015-06-12 13:56:11 +01:00
Maxime Coste
84d8447a58
Notify user on kakrc parsing errors
...
Fixes #281
2015-06-12 13:43:46 +01:00
Maxime Coste
2c15dbe6b2
Fix regions highlighter docstring
2015-06-11 19:04:30 +01:00
Maxime Coste
0555288e46
Show main selection search pattern on '*'
...
Fixes #278
2015-06-10 22:48:15 +01:00
Maxime Coste
46b167b851
Style tweak
2015-06-10 22:42:07 +01:00
Maxime Coste
e5852f6822
Fix race condition ShellManager::eval with SIGCHLD
2015-06-09 20:28:24 +01:00
Maxime Coste
b4329dd643
Fix comment
2015-06-09 13:27:51 +01:00
Maxime Coste
409d804ee8
Do not close stderr/stdout before program finish
...
Programs like grep called in '$' command will fail due to SIGPIPE
for example. So we need to keep the pipe open.
2015-06-08 22:42:51 +01:00
Maxime Coste
66866aafd3
Change gl/gh to only move cursor, not selecting (<a-h>/<a-l>) are unchanged
...
That is more consistant with other goto commands (that just move the cursor)
2015-06-08 13:51:06 +01:00
Maxime Coste
942fc224af
Specify if ShellManager should read output or not using a flag
...
Some program (xclip), will fork a daemon keeping stdout/stderr open,
so waiting for them to be closed make kakoune hang. Commands discarding
stdout can then just not wait on it.
2015-06-08 13:45:20 +01:00
Maxime Coste
7acf3da3ca
Change select_to_eol implementation
2015-06-07 23:17:23 +01:00
Maxime Coste
e6f0e8ef75
Move write_debug to buffer utils as write_to_debug_buffer
2015-06-06 11:54:48 +01:00
Maxime Coste
be03db9a24
Support sourcing files that use crlf end of lines
2015-06-05 13:52:56 +01:00
Maxime Coste
7bff1b782e
Merge branch 'mode-stack'
2015-06-05 13:16:31 +01:00
Maxime Coste
d6d81607ed
Gracefully handle reloading a file that was deleted
2015-06-05 13:11:04 +01:00
Maxime Coste
87fcfda508
Avoid buffer end in compute_modified_ranges
2015-06-05 13:10:30 +01:00
Maxime Coste
7cddaacc5d
Fix support for default face on remote clients
2015-06-04 18:51:00 +01:00
Maxime Coste
f39b450e94
on_enabled might change mode, so assert Normal mode before
2015-06-04 13:56:08 +01:00
Maxime Coste
b34d469b72
Merge branch 'master' into mode-stack
2015-06-04 13:54:03 +01:00
Maxime Coste
9668dccea9
Add support for Default face
...
The Default face is used to set default color values, if set
to default (the default), refers to terminal default colors.
2015-06-04 13:49:28 +01:00
Maxime Coste
f30cd317b0
Describe facedesc in :face docstring
2015-06-03 22:10:37 +01:00
Maxime Coste
64a3b0bd50
Fix memory leak in fifo buffer handling
2015-06-03 20:22:26 +01:00
Maxime Coste
f0886ad323
Get rid of the mode trash, delete mode directly when leaving on_key
2015-06-03 20:03:06 +01:00
Jiří Konečný
ff27b190eb
Fix Makefile for Fedora packaging system
...
There was a problem with absolute path for symlink.
I think most of the packaging systems will be affected by this problem.
2015-06-02 22:38:20 +02:00
Maxime Coste
964b0e9a6e
InputHandler now uses a stack for active modes
...
instead of having a single mode enabled, modes can be pushed/poped,
with the top of the stack being the active mode.
2015-06-02 20:56:57 +01:00
Maxime Coste
8f6fc6a0f3
Port even more code to use format function
2015-06-01 21:15:59 +01:00
Maxime Coste
f19bb4fe6d
Port more code to use the format function instead of adhoc string concat
2015-06-01 19:06:35 +01:00
Maxime Coste
57a03d8495
Remove redundant forward declaration
2015-06-01 18:33:08 +01:00
Maxime Coste
2426384360
Autoload site wide kak scripts if the user does not have his own autoload folder
2015-05-30 14:32:04 +01:00
Maxime Coste
c61c76061f
Improve CYGWIN bactrace description
2015-05-30 12:40:24 +01:00
Maxime Coste
5aba5d38f2
Add missing include
2015-05-29 13:46:49 +01:00
Maxime Coste
be9da616df
Return a String in Backtrace::desc
2015-05-29 13:35:54 +01:00
Maxime Coste
3c86484c4e
Extract xmessage/MessageBox support in a notify_fatal_error function
2015-05-29 13:35:09 +01:00
Maxime Coste
336df38237
Go back to ignoring SIGPIPE
...
We do not want to exit when a shell command closes stdin while we
are piping data to it.
2015-05-28 13:57:22 +01:00
Maxime Coste
98637c5219
Do not throw exceptions when handling a fatal signal
2015-05-28 13:44:59 +01:00
Maxime Coste
d9aee67c8b
Tweak Makefile, enable -rdynamic so that backtraces symbols are found
2015-05-27 18:45:52 +01:00
Maxime Coste
faf55c6540
Only try to run xmessage on Linux
2015-05-27 18:45:48 +01:00
Maxime Coste
2e43a4d696
Use common signal handler for SIGPIPE
2015-05-27 13:57:41 +01:00
Maxime Coste
e18c57cfd3
Include backtrace in debug info in on_assert_failed
2015-05-27 13:56:27 +01:00
Maxime Coste
7245d2abe9
Extract Backtrace out of SafePtr as a general utility
2015-05-27 13:48:45 +01:00
Maxime Coste
1e04343178
Workaround incomplete c++11 stdlib in gcc 4.8
2015-05-26 19:05:11 +01:00
Maxime Coste
993e842fdf
Retreat ! go back to C++11 only code
...
This reverts commit b42de85031
.
2015-05-26 18:42:09 +01:00
Maxime Coste
499bde10bd
Small style tweaks
2015-05-26 18:40:39 +01:00
Maxime Coste
3bdc30e381
Try matching functions one by one when completing
...
Instead of running them all then deciding which to use.
2015-05-26 18:38:48 +01:00
Maxime Coste
3ca69c3852
Try gnu++1y
2015-05-25 20:32:39 +01:00
Maxime Coste
d83836d026
Use gnu++14 only for Cygwin, as not recognized on OSX
2015-05-25 19:35:32 +01:00
Maxime Coste
9c57f5409a
Use gnu++14, as some posix functions disappear in c++14 mode
2015-05-25 14:01:59 +01:00
Maxime Coste
7b7427e1a6
Add missing 'override' specifiers
2015-05-25 13:54:18 +01:00
Maxime Coste
b42de85031
Migrate code to c++14
2015-05-25 13:51:17 +01:00
Maxime Coste
41319d2708
Small refactor in unit tests
2015-05-24 22:34:05 +01:00
Maxime Coste
dd25dcc361
Move unit test functions in next to the code they are testing
2015-05-22 13:58:56 +01:00
Maxime Coste
c38a7f3ca4
Merge branch 'diff'
2015-05-21 22:58:50 +01:00
Maxime Coste
325cc2d894
Ignore SIGPIPE
2015-05-20 22:53:14 +01:00
Maxime Coste
43f7657151
Remove clamping in compute_modified_range
...
It can result in a non ordered range list.
2015-05-20 13:34:16 +01:00
Maxime Coste
9f46d75b27
Add headers guard to diff.hh along with a comment about the algorithm
2015-05-19 19:46:24 +01:00
Maxime Coste
38bbecef62
Fix bug in diff implementations (missing snake after d=1 change) and refactor
2015-05-18 22:59:59 +01:00
Maxime Coste
bb7800b1a6
Preserve window position in regex_prompt
...
Fixes #271
2015-05-18 13:56:58 +01:00
Maxime Coste
0a6ad4dcf4
Only initialize element 1 in mirrored arrays.
2015-05-17 20:13:11 +01:00
Maxime Coste
cf7b64ba67
Preserve selections across reloads
2015-05-16 11:42:58 +01:00
Maxime Coste
73ddf18dc3
Another bug fix in diff implementation
2015-05-15 13:55:39 +01:00
Maxime Coste
802d6e106c
Keep hash stored in StringData
2015-05-14 19:13:52 +01:00
Maxime Coste
e9af3a4217
always_inline a few methods
2015-05-14 19:05:41 +01:00
Maxime Coste
8ba6804480
Do not use diff when reloading a no undo buffer
2015-05-14 14:05:02 +01:00
Maxime Coste
cc97d4ba41
Fix bugs in diff implementation
2015-05-14 13:57:03 +01:00
Maxime Coste
f224d11ccd
Small cleanup in selections.cc
2015-05-13 23:22:48 +01:00
Maxime Coste
11528e45e9
Use friend functions rather than methods for StronglyTypedNumber binary ops
2015-05-13 23:22:48 +01:00
Maxime Coste
15b26fd06c
Use diff when reloading buffer
2015-05-13 23:22:42 +01:00
Maxime Coste
7a8c2d7f56
Fix diff implementation and change the Diff struct format
2015-05-13 23:22:29 +01:00
Maxime Coste
49def73e4e
Add initial diff implementation based Eugene W. Myers' algorithm
2015-05-12 23:41:35 +01:00
Maxime Coste
30bec11010
Fix bug in ncurses mouse handling
2015-05-11 19:11:02 +01:00
Maxime Coste
e21d9feb05
Style tweak
2015-05-09 19:20:11 +01:00
Maxime Coste
c94b30903d
Fix dangling info window pointer in ncurses ui
2015-05-07 00:34:30 +01:00
Maxime Coste
559bcdde50
Formatting fix
2015-05-06 23:05:44 +01:00
Maxime Coste
9f1b129053
Fix bug in fifo creation where BufOpenFifo hook was using a dead string
2015-05-05 20:23:15 +01:00
Maxime Coste
0ee95d02c4
line highlighter highlights up to window's end
2015-05-05 20:21:17 +01:00
Maxime Coste
1a1db1cb3a
{line,column}_option highlighters use an expanded string instead of an option name
...
That allows access to non option values, such as cursor_column or cursor_line with
:addhl line '%val{cursor_line}' default,rgb:404040
Fixes #38
2015-05-04 17:12:51 +01:00
Maxime Coste
cfdf03ab31
Make expand function (that expand %...{} tokens) public
2015-05-04 17:08:57 +01:00
Maxime Coste
7f0588c02c
Dont use a regex to match face spec for regex highlighter
2015-05-03 18:22:49 +01:00
Maxime Coste
78eb437b90
Formatting fix
2015-05-02 18:48:20 +01:00
Maxime Coste
d7159a9af0
Add str_to_int_ifp that returns an Optional<int> instead of throwing
2015-05-01 18:47:22 +01:00
Maxime Coste
d3607bc773
Rename eval(_token)? to expand(_token)? and use a const Context
2015-04-30 19:18:20 +01:00
Maxime Coste
4e89cbfe83
Add a column_option highlighter that highlight a column given in an option
2015-04-30 19:18:20 +01:00
Maxime Coste
202d4766c2
Do not display info box when there is not enough room on screen for it
...
Fixes #159
2015-04-30 13:45:05 +01:00
Maxime Coste
6974cfbf64
Use char32_t for Codepoint
2015-04-29 13:51:15 +01:00
Maxime Coste
d169558e09
When file to open is a fifo, do not read from it (use -fifo for that)
...
Fixes #267
2015-04-29 13:46:04 +01:00
Maxime Coste
1337763cb5
Fix formatting
2015-04-29 13:45:53 +01:00
Maxime Coste
e4880ad91a
Use unicode elipsis to mark trimmed mode line
2015-04-28 21:03:37 +01:00
Maxime Coste
5bff742e0a
Replace some String temporaries with StringViews
2015-04-27 16:46:57 +01:00
Maxime Coste
720c54c759
Move option_not_found exception to the cpp file
2015-04-26 20:40:32 +01:00
Maxime Coste
bbefde9379
Move Colors enum class as NamedColor enum inside Color struct
2015-04-25 10:47:39 +01:00
Maxime Coste
dc46eda279
Set default MatchingChar face to bold instead of underline
2015-04-24 20:34:38 +01:00
Maxime Coste
075c5013a1
Move Register to register_manager.hh
2015-04-23 21:51:48 +01:00
Maxime Coste
4e1ed13f25
Use a struct for RangeAndMatches
2015-04-23 21:44:20 +01:00
Maxime Coste
045272ab8a
Use a struct for BufferRange rather than std::pair
2015-04-23 21:38:45 +01:00
Maxime Coste
840e58e0b1
NCurses: When mode line is too long, trim it rather hiding it
2015-04-23 21:11:50 +01:00
Maxime Coste
e0f7a6f0be
Remove simple_factory for highlighters
2015-04-23 20:27:52 +01:00
Maxime Coste
d6b69cb6f7
Fix :open bug that could set a deleted buffer as the last used one
2015-04-23 20:15:17 +01:00
Maxime Coste
80fb8aa60d
Use puts instead of printf in ncurses_ui
2015-04-22 22:03:01 +01:00
Maxime Coste
f6c7948c12
Add format_to allowing formating to an existing buffer
2015-04-22 13:19:46 +01:00
Maxime Coste
8ff63198bc
Comment out update_erase function (keeped for reference)
...
Fixes #254
2015-04-21 13:51:01 +01:00
Maxime Coste
7824a76e1a
Disable history in :exec and :eval
2015-04-21 13:45:10 +01:00
Maxime Coste
4bb1e0a878
Support -buffer * to iterate over all buffers in :eval or :exec
2015-04-21 13:40:14 +01:00
Maxime Coste
1d40827da3
Small style tweak
2015-04-21 13:33:35 +01:00
Maxime Coste
6e5e831ce6
Merge remote-tracking branch 'ekie/next_buffer'
2015-04-21 13:28:09 +01:00
Maxime Coste
d2e8bd2431
Fix select_number crashing on empty buffers
2015-04-20 13:55:42 +01:00
Maxime Coste
ddd70fd09a
Make empty context construction more explicit
2015-04-19 18:47:52 +01:00
Maxime Coste
f714766854
Fix search highlighter wrong code
2015-04-19 15:19:39 +01:00
Maxime Coste
1dfa2d7fe4
Avoid unneeded update of selections when we are going to overwrite them
2015-04-19 15:12:16 +01:00
Maxime Coste
9f65a4e6dd
Remove Context::set_selections, use Context::selections() = ...
2015-04-19 15:00:37 +01:00
Maxime Coste
b570c68c75
Run BufOpenFifo hook when opening a fifo in a (new or already existing) buffer
2015-04-19 14:48:39 +01:00
Maxime Coste
95a14c5049
UndoGroupOptimizer disappeared long time ago
2015-04-18 14:17:17 +01:00
Maxime Coste
d2b6d696a2
Small layout change
2015-04-17 16:47:31 +01:00
Maxime Coste
3982131753
Fix StronglyTypedNumbers::abs
2015-04-17 01:01:58 +01:00
Maxime Coste
b584fd3bfc
Fix UnorderedSet allocator
2015-04-16 23:46:26 +01:00
Maxime Coste
2902fce437
Use an UnorderedSet for string registry
2015-04-16 12:38:59 +01:00
Maxime Coste
491ffc4ffd
Improve ui_options docstring
2015-04-16 11:35:52 +01:00
Maxime Coste
ea67724ff5
Optional: put the bool m_valid after the content to improve packing
2015-04-15 11:43:39 +01:00
Eike Plack
2cf45ddb21
Refactor nextbuffer_cmd
2015-04-15 02:43:16 +02:00
Eike Plack
0f9b210e3f
Fix set_last_used_buffer
2015-04-15 02:36:47 +02:00
Maxime Coste
bf02838816
Remove is_blank, which is identical to is_horizontal_blank
2015-04-15 00:34:00 +01:00
Maxime Coste
eb9c95298e
Add support for string <-> selection list serialization
2015-04-13 15:21:26 +01:00
Maxime Coste
731c27c094
Add a 'abs' friend function to StronglyTypedNumber
2015-04-13 15:20:47 +01:00
Maxime Coste
f93081471a
Refactor nextbuffer command to be more idiomatic
2015-04-13 11:34:21 +01:00
Maxime Coste
43c03ea412
Merge remote-tracking branch 'jjthrash/next-prev-buffer'
2015-04-13 11:26:31 +01:00
Maxime Coste
be5ed0e036
Small alignement change
2015-04-12 23:48:11 +01:00
Maxime Coste
f644a51f24
Use char for KeyMapMode enum
2015-04-11 17:22:37 +01:00
Maxime Coste
cfd071b2ad
small code formatting fix
2015-04-09 16:28:13 +01:00
Jimmy Thrasher
ba59033935
Add nextbuffer command
...
Wraps around at the end. If only 1 buffer loaded, does nothing.
2015-04-09 10:14:32 -04:00
Maxime Coste
da09da29c4
Regex comparison operator are const
2015-04-08 23:16:27 +01:00
Maxime Coste
b5ab318a2d
Always optimize StringView::strlen (recursive due to constexpr)
2015-04-07 23:21:14 +01:00
Maxime Coste
87b385b956
Use default values for ncurses options when not specified
2015-04-06 20:05:49 +01:00
Maxime Coste
b7144fff6c
Make ncurses wheel scroll button configurable
2015-04-06 18:43:27 +01:00
Maxime Coste
dde16b00a9
Add onkey command for executing commands after reading a key
...
This completes the various user interaction primitives, on_next_key
was the last not to be available through a command.
2015-04-04 13:10:39 +01:00
Maxime Coste
04a922fe1a
Avoid zstr in write_debug when no *debug* buffer can be created
2015-04-03 13:14:59 +01:00
Maxime Coste
7176685690
Avoid zstr call in ncurses addutf8str
2015-04-03 13:10:46 +01:00
Maxime Coste
762f60f9fd
Rewrite rgb color parsing
2015-04-02 21:27:58 +01:00
Maxime Coste
64e0b6e3f8
Replace a snprintf with format in backup file name generation
2015-04-02 13:58:06 +01:00
Maxime Coste
9edeb08e3a
Avoid zero terminated string based console printing
2015-04-01 13:44:04 +01:00
Maxime Coste
4c49583fed
small code tweak in format
2015-03-31 13:55:57 +01:00
Maxime Coste
e875828aa9
Use format for {Win,Buf}SetOption hooks description
2015-03-31 13:55:40 +01:00
Maxime Coste
758bfe7284
number to string conversion avoids memory allocations
2015-03-31 13:53:40 +01:00
Maxime Coste
519254dfdc
More useage of the format function
2015-03-30 23:56:33 +01:00
Maxime Coste
335c73a09b
Use custom implementation rather the sscanf in str_to_int
2015-03-30 23:37:55 +01:00
Maxime Coste
6e1a388544
Replace various adhoc operator+ based formatting with format func
2015-03-30 23:06:02 +01:00
Maxime Coste
13a5af70ae
Add a format function for printf like formatting
2015-03-30 23:05:24 +01:00
Maxime Coste
8761fc34f4
Always go through StringView to compare strings
...
That avoids creating temporary String needlessly
2015-03-30 19:59:08 +01:00
Maxime Coste
8439059758
Fix wrong implicit conversions from int/Codepoint to StringView
2015-03-30 13:33:46 +01:00
Maxime Coste
adaf6ecc40
Move skip_while helpers to selectors.hh
2015-03-29 20:03:09 +01:00
Maxime Coste
56b5300b9d
Handle mouse events in key_to_str
2015-03-28 18:18:52 +00:00
Maxime Coste
d1b81c8f8a
minor cleanup
2015-03-27 13:47:02 +00:00
Maxime Coste
195b813b73
Add support for Home/End keys in normal and insert mode
...
Fixes #260
2015-03-27 13:33:14 +00:00
Maxime Coste
0fbbd64681
small formatting tweak
2015-03-27 13:20:37 +00:00
Maxime Coste
727580a238
Make utf8_iterator a proper stl useable iterator
2015-03-27 13:19:30 +00:00
Maxime Coste
c2150dd163
Rework show_matching highlighter implementation
2015-03-27 13:18:06 +00:00
Maxime Coste
94bd32572d
Move some only used once inline functions directly in their caller
...
No need to have that in a header, and not really selectors anyway
2015-03-26 13:34:21 +00:00
Maxime Coste
757366472b
Add <alt-:> for ensuring selections are forward (cursor >= anchor)
...
Not very useful interactively, but that feature can make macros much
more robust.
2015-03-26 13:34:21 +00:00
Maxime Coste
e0757e7ba9
Flip the cat assistant
2015-03-25 13:53:13 +00:00
Maxime Coste
16037744b7
Add exception type name when failing with an uncaught exception
2015-03-25 13:42:36 +00:00
Maxime Coste
bc67a6547d
Remove unneeded c_str() call
2015-03-25 13:42:36 +00:00
Maxime Coste
48007d5de2
Only do tty validation when using a NCursesUI
2015-03-24 19:38:03 +00:00
Maxime Coste
7eaa6976b9
Use a dummy UI when running tests, so that we do not need a tty
2015-03-24 13:14:02 +00:00
Maxime Coste
4188335b51
Fix segfault in highlighting
2015-03-23 19:21:35 +00:00
Maxime Coste
323b0359c7
Add support for mouse wheel
2015-03-22 12:17:01 +00:00
Maxime Coste
5eaf472fc0
Experimental support for mouse
2015-03-22 11:41:20 +00:00
Maxime Coste
def33de9bc
Check modifiers before inserting codepoints in the line editor
2015-03-22 11:41:19 +00:00
Maxime Coste
7a7f86a205
Impreove Window::buffer_coord behaviour with invalid coords
2015-03-22 11:41:19 +00:00
Maxime Coste
dbbbc3aa80
constexprify Face
2015-03-21 16:32:22 +00:00
Maxime Coste
74ecf4976e
Fix Color constructor not constexpr
2015-03-21 16:32:07 +00:00
Maxime Coste
bbfcfe4242
constexprify Color (in)equality operator
2015-03-20 19:03:41 +00:00
Maxime Coste
5cf7d650c8
Small code tweak
2015-03-19 23:33:44 +00:00
Maxime Coste
f5da1671fd
Refactor number_line higlighter, use a switch to higlhight the cursor line
2015-03-19 00:31:11 +00:00
Maxime Coste
006f8ca588
Merge remote-tracking branch 'ekie/relative_line_numbers'
2015-03-19 00:03:59 +00:00
Maxime Coste
3e28539b81
Add a display coord to buffer coord method to Window
2015-03-18 23:40:26 +00:00
Eike Plack
5627d33ac3
Add support for relative line numbers
2015-03-18 22:07:57 +01:00
Maxime Coste
d3738b858b
Remove unneeded include
2015-03-17 20:06:35 +00:00
Maxime Coste
4770d3d86c
Change flags operator& to return a value convertible both to flags and bool
2015-03-16 18:57:18 +00:00
Maxime Coste
3921b234e7
Store fake keystrokes when selecting an insert completion candidate
...
Instead of storing the real 'select next completion' keystroke,
generate fake backspace/delete/char keystrokes so that replay
of the insert will insert the exact same text.
Fixes #135
2015-03-15 18:44:11 +00:00
Maxime Coste
b5854ece43
Change ParameterParser switch interface, use an Optional<StringView>
...
Merge has_option and option_value into a single method get_switch.
2015-03-14 19:16:46 +00:00
Maxime Coste
65fd0df041
More code style cleanup
2015-03-14 17:30:44 +00:00
Maxime Coste
8a211fc87a
Tweak command docstrins
2015-03-14 12:17:43 +00:00
Maxime Coste
82833608c9
Allocate some data in advance in string algorithm
2015-03-14 11:46:53 +00:00
Maxime Coste
9657ef88b7
Small refactoring in client_manager.cc
2015-03-14 11:27:01 +00:00
Maxime Coste
adcb72e987
Minor code cleanup
2015-03-14 11:11:01 +00:00
Maxime Coste
2be6cc918b
Avoid stdout/stderr as variable names
2015-03-14 01:53:17 +00:00
Maxime Coste
09e2a0b6ac
Do not change the insert completion menu when a candidate is selected
2015-03-13 13:52:23 +00:00
Maxime Coste
6b3201f0f1
Change ShellManager to return both stdout and the return value in a pair
2015-03-13 13:39:18 +00:00
Maxime Coste
dbe27d3df2
Code style change in shell_manager.cc
2015-03-13 13:25:20 +00:00
Maxime Coste
2747c4dd3e
exception::what returns a StringView rather than a const char*
2015-03-13 13:15:51 +00:00
Maxime Coste
52cd08915d
Keep the dir trailing slash in split_path
2015-03-13 13:09:54 +00:00
Maxime Coste
762643d320
Use correct %zu format string rather than cast
2015-03-12 20:43:21 +00:00
Maxime Coste
1a7d50b347
Minor cleanup
2015-03-12 20:40:00 +00:00
Maxime Coste
b4f6b50dbb
Make split_path public
2015-03-12 20:39:34 +00:00
Maxime Coste
2f20399d03
Improve 'def' command completion behaviour and clean it up a little
2015-03-12 19:45:05 +00:00
Maxime Coste
d9cd5fef8f
Avoid calling real_path when not needed in BufferManager::get_buffer_ifp
2015-03-12 19:40:10 +00:00
Maxime Coste
c57e76ee41
Cleanup parameter parser code
2015-03-12 13:58:31 +00:00
Maxime Coste
f2b8b1ae2b
Fix compilation on clang
2015-03-12 13:04:53 +00:00
Maxime Coste
348e23dd8a
Remove unused StaticString
2015-03-12 09:52:33 +00:00
Maxime Coste
4843643514
Always inline OnScopeEnd constructor and destructor
2015-03-11 20:52:39 +00:00
Maxime Coste
ecabfc67b7
fix warning on 32 bit compilation
2015-03-11 20:52:17 +00:00
Maxime Coste
c81a5d03c5
String tweaks
2015-03-11 19:41:44 +00:00
Maxime Coste
a0e8e4265a
coords/units hashing refactoring
2015-03-11 13:59:25 +00:00
Maxime Coste
023c8afb73
Fix unneeded string copy
2015-03-11 13:58:42 +00:00
Maxime Coste
3c1a325b6f
Refactor String, use a common StringOps interface, hide std::string
2015-03-10 19:50:22 +00:00
Maxime Coste
a0cf75ec39
Tweak WordDB implementation
2015-03-10 13:50:25 +00:00
Maxime Coste
ea526c2137
Small refactoring
2015-03-10 13:34:46 +00:00
Maxime Coste
ea42d9dd4a
Remove is_in_range utility function
2015-03-09 22:37:42 +00:00
Maxime Coste
7af8937bac
Extract remaining lambdas commands so that the cmds array can be compile time initialized
2015-03-09 14:01:17 +00:00
Maxime Coste
d1f17228dd
Use a static array to store the keymap
2015-03-09 13:55:55 +00:00
Maxime Coste
1cec8df45e
ArrayView content is not const anymore
...
As in upcoming std c++ array_view, ArrayView<T> points to mutable
data, use ArrayView<const T> or alias ConstArrayView<T> for const
data.
2015-03-09 13:54:09 +00:00
Maxime Coste
44f81d0b8b
constexprify ArrayView
2015-03-09 13:21:43 +00:00
Maxime Coste
0bbaef6e48
Use a sorted array for keymap rather than an unordered map
...
with ~100 entry, a binary search finds in < 7 step, unordered map
is overkill.
2015-03-08 11:40:50 +00:00
Maxime Coste
3ece7bcf75
Orderable Keys
2015-03-07 15:29:21 +00:00
Maxime Coste
4be6090107
Fix additional eol inserted when replace piping at end of buffer
2015-03-06 13:57:21 +00:00
Maxime Coste
2d93933d81
Rework keymap to use function pointer rather than std::function
2015-03-05 19:57:46 +00:00
Maxime Coste
99996902de
Use a IdMap for storing hooks
...
The number of hook names is small (<20), using an UnorderedMap
is overkill, and prevents using StringView for key searching.
2015-03-05 14:59:27 +00:00
Maxime Coste
d1f3c1832c
Small code tweak
2015-03-05 13:52:54 +00:00
Maxime Coste
bc7c3987e1
Convert CodepointPair to struct MatchingPair
2015-03-04 20:47:14 +00:00
Maxime Coste
c0e4268e17
Reactivate direct file change check on entering normal mode
2015-03-04 20:46:26 +00:00
Maxime Coste
4e02e822fd
Merge remote-tracking branch 'ekie/fix_debug_cmd'
2015-03-04 09:37:06 +00:00
Maxime Coste
604e95f771
Tweak StringData::create implementation
2015-03-02 23:55:41 +00:00
Eike Plack
2354655df2
Fix documentation for debug_cmd
2015-03-02 16:38:05 +01:00
Maxime Coste
0eca3b5526
Use StringDataPtr alias for RefPtr<StringData>
2015-03-01 12:06:19 +00:00
Maxime Coste
98972c18b7
rename StringStorage to StringData
2015-03-01 12:03:08 +00:00
Maxime Coste
092dcd174f
Add StaticStringStorage for storing string literals
2015-02-28 17:09:29 +00:00
Maxime Coste
f88e873f55
Add IndexSequence and make_index_sequence utilities
2015-02-28 17:08:19 +00:00
Maxime Coste
31267675b9
Small cleanup in containers utils
2015-02-27 19:32:27 +00:00
Maxime Coste
b480d6b419
Tweak BufferIterator::{+=,-=} implementation
2015-02-26 21:58:56 +00:00
Maxime Coste
00bde4ef48
Respect columns when copying selection, not just bytes
2015-02-25 13:41:00 +00:00
Maxime Coste
46f37a6050
Always inline RefPtr::{acquire,release,moved}
2015-02-24 13:43:37 +00:00
Maxime Coste
0a6901899d
Use RefPtr as SafePtr backend
2015-02-23 20:39:56 +00:00
Maxime Coste
8df77121d7
Rename safe_ptr and ref_ptr to SafePtr and RefPtr
2015-02-19 13:58:25 +00:00
Maxime Coste
6c65c5e080
Add docstrings to highlighters, displayed by addhl help
2015-02-19 13:54:03 +00:00
Maxime Coste
fd3365deb1
Remove unused RegionMatch::timestamp
2015-02-17 13:56:26 +00:00
Maxime Coste
59177c12f9
Replace vector of vector in RegexHighlighter with a single vector.
2015-02-17 13:50:31 +00:00
Maxime Coste
2f890f12c6
Fix RegexHighlighter cache invalidation when changing the regex
2015-02-16 22:43:14 +00:00
Maxime Coste
e5121fe40a
Wrap debug loop in ifdef KAK_DEBUG
2015-02-16 22:27:40 +00:00
Maxime Coste
8f6dab08d6
Try to limit the quantity of buffer reparsed by RegexHighlighter
2015-02-16 19:13:55 +00:00
Maxime Coste
ce950ec9f7
Fix RegexHighlighter in a few corner cases
2015-02-16 13:25:17 +00:00
Maxime Coste
53f1c35013
Fix caching of regex highlighter matches
...
The previous method was constantly invalidating cache when used in
conjunction with region highlighters.
2015-02-15 19:42:48 +00:00
Maxime Coste
8e6cfd3f09
Indent fix
2015-02-14 23:28:09 +00:00
Maxime Coste
8c843f5bea
Add <a-h>, <a-l>, <a-x> and <a-d> bindings to line editor
...
<a-h> : move cursor left
<a-l> : move cursor right
<a-x> : delete char before cursor
<a-d> : delete char under cursor
2015-02-13 19:13:44 +00:00
Maxime Coste
224f73d72a
Cleanup and refactor externally modified buffer reloading
...
* Correctly hide the reload dialog in every client.
* Correctly handle buffer being deleted.
2015-02-12 19:18:03 +00:00
Maxime Coste
6658d15741
Allow <ret> and <esc> to reload/keep an externally modified file
...
Fixes #113
2015-02-11 13:56:45 +00:00
Maxime Coste
790e671f6c
Replace some <cstring> function usage with c++ algorithms
2015-02-10 23:09:30 +00:00
Maxime Coste
8714c41403
Do not hash rgb values for non rgb colors
2015-02-10 22:53:37 +00:00
Maxime Coste
56dd5f9540
Fix selecting of insert text in SelectionList::insert
2015-02-09 21:09:17 +00:00
Maxime Coste
ec1d5509bb
Refactor ncurses assistant option handling
...
The option is now ncurses_assistant, defaults to clippy, none
and off a recognized to disable assistant.
2015-02-09 13:33:54 +00:00
Maxime Coste
accc510d15
Merge remote-tracking branch 'robinmoussu/cat_assistant'
2015-02-09 13:26:33 +00:00
Maxime Coste
a94c554a7b
Add optional helper for commands, to get parameter dependent help
...
Use for the set command to document options.
2015-02-08 19:04:20 +00:00
robin moussu
0a5a37c1f2
add `assistant=cat|trombon' option
...
Move ascii art of assistant of top of file.
`assistant' has been renamed to `s_assistant' because it become a static
variable. It was because it `assistant()' was used in `set_ui_options' and
`make_info_box()'
2015-02-08 11:53:41 +01:00
robin moussu
239bb2dd33
Add a cat assistant!
2015-02-08 11:53:41 +01:00
Maxime Coste
0a2f2c2247
Use parameter pack to that the default hash_value is the worst match
2015-02-07 20:15:22 +00:00
Maxime Coste
5b6b04ef9c
Merge remote-tracking branch 'jjthrash/not-warnings'
2015-02-06 23:22:17 +00:00
Maxime Coste
f7b8215a68
Add a from C array constructor to ArrayView
2015-02-06 23:22:01 +00:00
Maxime Coste
bf088a864c
Avoid selecting buffer end when copying selection to next line
2015-02-06 22:04:42 +00:00
Jimmy Thrasher
240a004354
Fix compile warnings on OSX that could actually be errors
...
c++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MD -MP -MF .buffer.d -c -o .buffer.o buffer.cc
buffer.cc:35:20: warning: logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
kak_assert(not line->length == 0 and line->data()[line->length-1] == '\n');
^ ~~
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:35:20: note: add parentheses after the '!' to evaluate the comparison first
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:35:20: note: add parentheses around left hand side expression to silence this warning
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:177:20: warning: logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
kak_assert(not line->length == 0 and line->data()[line->length-1] == '\n');
^ ~~
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:177:20: note: add parentheses after the '!' to evaluate the comparison first
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
buffer.cc:177:20: note: add parentheses around left hand side expression to silence this warning
./assert.hh:17:18: note: expanded from macro 'kak_assert'
if (not (condition)) \
^
2 warnings generated.
2015-02-06 09:12:05 -05:00
Maxime Coste
eb5f458138
Extract directory/filename splitting in a function
2015-02-06 13:47:19 +00:00
Maxime Coste
622919bafd
Add C and alt-C for 'copy selection to next/previous line'
2015-02-05 21:25:04 +00:00
Maxime Coste
5339f94eb8
Fix missing modes in :map completion and docstring
2015-02-05 13:56:16 +00:00
Maxime Coste
d59b36b816
Fix incorrect Buffer::Change generated in Buffer::reload
2015-02-04 21:42:42 +00:00
Maxime Coste
87125e2707
Fix too strict assert and unneeded (lets hope) check
2015-02-03 23:39:04 +00:00
Maxime Coste
2a28260f87
Extend line numbering max width to 15 char
2015-02-03 13:44:42 +00:00
Maxime Coste
18eec7e511
Regex selectors more tolerant to matches not ending on char boundaries
2015-02-02 22:54:05 +00:00
Maxime Coste
340fc63f84
Improve code compatibility
2015-02-02 18:46:55 +00:00
Maxime Coste
b4442055e8
Fix recursive regions matching when a recursive matches just before an end
...
%sh{ $test {} $test } was incorrrectly closing the %sh block at the first {
because it was immediatly followed by a }.
2015-02-02 13:48:27 +00:00
Maxime Coste
c004187f32
Fix buffer reloading
2015-02-02 13:24:40 +00:00
Maxime Coste
09fc14be4b
Small refactor in highlighters.cc
2015-02-01 23:30:58 +00:00
Maxime Coste
4d6b8a70e1
Fix highlighter update with new LineModification behaviour
2015-02-01 23:19:07 +00:00
Maxime Coste
d3bccfeb94
Fixes in line_modification change, along with style tweak
2015-02-01 22:33:59 +00:00
Maxime Coste
0b4ecef2d2
Rewrite line modifications, hopefully with easier to comprehend code
2015-01-31 23:50:24 +00:00
Maxime Coste
804a050c39
Tweak Buffer::Change layout
2015-01-29 22:44:07 +00:00
Maxime Coste
ffff4711c5
Add history memory domain
2015-01-28 22:33:29 +00:00
Maxime Coste
bb74770a24
Add C-f and C-b binding for page up/page down
...
Fixes #173
2015-01-27 23:33:22 +00:00
Maxime Coste
cc699faa54
Store direct ref_ptr<StringStorage> for WordDB lines
...
Storing a SharedString is a waste, we want the whole line.
2015-01-27 13:12:52 +00:00
Maxime Coste
fb98ff652d
Keep all completion matches when selecting a candidate
2015-01-27 13:12:52 +00:00
Maxime Coste
2c425bb436
Always inline StringStorage methods
2015-01-26 19:41:26 +00:00
Maxime Coste
b697bf1795
Release display buffers when a window is added to free list
2015-01-26 19:41:10 +00:00
Maxime Coste
92cb3a035f
Try to improve ga behaviour
2015-01-26 19:40:48 +00:00
Maxime Coste
42966317b8
Tweak SharedString
2015-01-25 22:36:05 +00:00
Maxime Coste
79954e89ab
Fix GCC 4.8 compilation
2015-01-24 14:36:03 +00:00
Maxime Coste
f4e96e7f2e
Fix bug when deleting end of buffer text using multiple selections
2015-01-23 19:12:15 +00:00
Maxime Coste
cb197f57ba
Avoid temporary strings on buffer load/reload
...
Pass directly a Vector<ref_ptr<StringStorage>> to the buffer
2015-01-22 13:39:29 +00:00
Maxime Coste
2516c16bb9
Fix error message in tuple option parsing
2015-01-22 13:10:21 +00:00
Maxime Coste
0ff415597e
Add Display memory domain
2015-01-21 13:35:46 +00:00
Maxime Coste
b2d5b9ca5f
Try to fix travis compilation errors
2015-01-21 13:35:23 +00:00
Maxime Coste
5383cece3e
Fix write_debug with no debug buffer and multiple lines
2015-01-20 19:57:17 +00:00
Maxime Coste
b1281d225d
rename SharedString::Storage to StringStorage and use directly in Buffer
2015-01-19 19:31:56 +00:00
Maxime Coste
3697548e35
Use a single allocation for SharedString::Storage
2015-01-19 13:25:04 +00:00
Maxime Coste
39689f0a18
Add helper for overloading operator new/delete
2015-01-18 18:49:32 +00:00
Maxime Coste
9b057896d4
Replace std::shared_ptr with homemade, intrusive, ref_ptr
...
That saves a lot of memory as sizeof(SharedString) is now one
pointer less.
2015-01-18 18:23:58 +00:00
Maxime Coste
ef26b77aa7
buffer updates are in BufferMeta memory domain
2015-01-18 11:22:28 +00:00
Maxime Coste
7cdeb3d7f7
simplify echo code, avoid trailing spaces
2015-01-17 22:55:48 +00:00
Maxime Coste
32319aca45
Add support for per type default memory domain
2015-01-16 13:58:21 +00:00
Maxime Coste
4fd92127c3
Add a no copy shared string constructor, used for map lookup, and intern words
2015-01-15 19:58:08 +00:00
Maxime Coste
bb915f0bc5
Fix filename completion
2015-01-15 19:26:38 +00:00
Maxime Coste
8eef019cf8
Do not store lines to word in word db, just keep the old lines alive
2015-01-15 19:26:38 +00:00
Maxime Coste
76d806e98d
Replace InternedStrings with SharedString, shared_ptr based
2015-01-15 19:26:38 +00:00
Maxime Coste
2a878d51fd
Even more memory tracking
2015-01-14 19:16:32 +00:00
Maxime Coste
442304bc1c
Add missing cast to void* in placement new
2015-01-14 00:01:20 +00:00
Maxime Coste
2415d3f63c
Add missing <new> include
2015-01-13 23:54:58 +00:00
Maxime Coste
1e3e0b01af
Fix compatibility with gcc 4.8
2015-01-13 22:56:51 +00:00
Maxime Coste
118a6e1a7c
Use uint32_t for interned strings slots
2015-01-13 13:58:11 +00:00
Maxime Coste
61619a4d4d
Style tweak in WordDB
2015-01-13 13:57:44 +00:00
Maxime Coste
0412487b0c
-rdynamic does not work on gcc 4.9 under cygwin
2015-01-13 13:50:16 +00:00
Maxime Coste
beb3390334
Add interned string stats in debug command
2015-01-13 13:48:16 +00:00
Maxime Coste
b9c4fc2d8c
Add size_t and float to_string overload, and _sv UDL
2015-01-13 13:47:46 +00:00
Maxime Coste
f440c31370
Add missing cstddef include for ptrdiff_t
2015-01-12 20:03:52 +00:00
Maxime Coste
c8d651a517
Protect use of mallinfo in #ifdef __GLIBC__ blocks
2015-01-12 19:55:58 +00:00
Maxime Coste
e8b8070536
refactor slighly memory domain handling
2015-01-12 19:48:51 +00:00
Maxime Coste
19797ae8d6
Fix flag line highlighting
2015-01-12 19:35:31 +00:00
Maxime Coste
da562e03a0
replace all std::vector with Vector
2015-01-12 13:58:41 +00:00
Maxime Coste
83d0813b0f
Yet more tracking
2015-01-12 13:45:44 +00:00
Maxime Coste
f1f10639a5
Compute tracked memory total as well
2015-01-12 13:32:30 +00:00
Maxime Coste
0bdf1778cb
Some more memory tracking
2015-01-12 13:32:14 +00:00
Maxime Coste
dedb16bc73
Track some more memory
2015-01-11 19:28:03 +00:00
Maxime Coste
9adb97ea28
Track buffer lines memory
2015-01-10 12:56:09 +00:00
Maxime Coste
9f9156a752
Track String memory allocations
2015-01-09 13:57:21 +00:00
Maxime Coste
e5b36f548b
Add missing include
2015-01-08 19:31:28 +00:00
Maxime Coste
9b30e7469a
Add initial memory domain allocation tracking support
2015-01-07 19:29:31 +00:00
Maxime Coste
de12fe1cc6
Add completion for debug command
2015-01-06 19:06:53 +00:00
Maxime Coste
295a97f2a6
Rename memoryview to ArrayView
2015-01-06 13:43:37 +00:00
Maxime Coste
8e92e0eebc
Go back to previous buffer name completion implementation
2015-01-05 19:33:33 +00:00
Maxime Coste
c279da14e3
Refactor write_debug to avoid empty first line in *debug* buffer
2015-01-05 09:38:51 +00:00
Maxime Coste
ca9baecd4c
Another stule tweak
2015-01-04 22:34:36 +00:00
Maxime Coste
23f30f6709
Small style tweak
2015-01-03 17:35:53 +00:00
Maxime Coste
019a91505f
Remove unneeded static String
2015-01-02 11:55:15 +00:00
Maxime Coste
15542c3357
minor style tweak
2015-01-01 12:09:30 +00:00
Maxime Coste
c698032ace
Style tweak
2014-12-31 13:09:35 +00:00
Maxime Coste
0493cf6d62
Use a struct rather than a std::pair for InternedString DataAndRefCount
2014-12-30 11:56:01 +00:00
Maxime Coste
d4a929b42e
Use a struct KeyAndName rather than a std::pair
2014-12-29 17:18:42 +00:00
Maxime Coste
955d1dea66
Small formatting fixes
2014-12-29 12:19:16 +00:00
Maxime Coste
8cc96ec36b
Add a join function for joining strings using a specific char
2014-12-28 11:16:51 +00:00
Maxime Coste
71bfe5498d
Refactor color functions
2014-12-27 12:09:28 +00:00
Maxime Coste
248c1bda02
Style tweak
2014-12-26 10:53:30 +00:00
Maxime Coste
33bde3e067
Minor code tweak in optional.hh
2014-12-25 10:59:06 +00:00
Maxime Coste
2e1c6eaff7
sort includes
2014-12-24 13:03:17 +00:00
Maxime Coste
2852e0fbe5
Remove trailing blank lines
2014-12-23 23:00:20 +00:00
Maxime Coste
b0fef1a962
Rename id_map to IdMap
2014-12-23 22:51:00 +00:00
Maxime Coste
fb611e2f62
Use an id_map directly for HighlighterRegistry rather than the FunctionRegistry class
2014-12-23 22:15:53 +00:00
Maxime Coste
c17fa7be14
Tweak id_map implementation
2014-12-23 22:15:25 +00:00
Maxime Coste
79de7ee717
Code refactoring in WordDB
2014-12-23 19:32:42 +00:00
Maxime Coste
ed54e102ee
Extract complete_buffer_name as a free function in commands.cc
2014-12-23 17:42:17 +00:00
Maxime Coste
ae602106e0
Remove prefix_complete, superseeded by complete
2014-12-23 17:39:12 +00:00
Maxime Coste
b6ff15aa75
Unify completion from container content logic
2014-12-23 13:54:09 +00:00
Maxime Coste
064fb81b8d
Move containers utils to containers.hh and add filtered/transformed utils
2014-12-23 13:40:26 +00:00
Maxime Coste
bf980eba04
Merge branch 'list_buffers'
2014-12-23 13:20:29 +00:00
Eike Plack
9f81093411
Expose buffer list to shell over $kak_buflist
2014-12-23 02:49:53 +01:00
Maxime Coste
ff1f4dcb5c
Minor cleanup
2014-12-22 20:08:53 +00:00
Maxime Coste
e911c86306
Remove useless code
2014-12-22 20:08:30 +00:00
Maxime Coste
7a7ad57871
Support absolute paths when completing commands
2014-12-21 17:08:33 +00:00
Maxime Coste
5b94b73152
Small code tweak
2014-12-20 18:40:17 +00:00
Maxime Coste
116ea7364a
Restore some special behaviours, I missed them in interactive mode.
2014-12-19 13:58:33 +00:00
Maxime Coste
c454cf1379
Avoid eol after undo/redo
2014-12-18 23:17:38 +00:00
Maxime Coste
eee2cb3a6e
Revert "Add support for BufInsert/BufErase hooks"
...
This is potentially quite slow, and not used, reintroduce
later if we have a use case for it.
This reverts commit 5f3a477277
.
2014-12-18 23:13:45 +00:00
Maxime Coste
1c8ee78d1a
Do not register timers for transient input handlers
2014-12-18 23:12:58 +00:00
Maxime Coste
4827ae0a53
Do not wait for the first event before drawing clients
2014-12-18 19:01:18 +00:00
Maxime Coste
5f3a477277
Add support for BufInsert/BufErase hooks
2014-12-17 13:56:45 +00:00
Maxime Coste
3b9f40fd58
Fix split selecting the buffer end
...
Fixes #241
2014-12-17 13:21:20 +00:00
Maxime Coste
e0c452adb6
Tweak keymap_manager style, fix missing move
2014-12-17 13:20:48 +00:00
Maxime Coste
ebecd60eb8
Rework hashing, use a more extensible framework similar to n3876 proposal
...
std::hash specialization is a pain to work with, stop using that, and
just specialize a 'size_t hash_value(const T&)' free function.
2014-12-16 18:57:19 +00:00
Maxime Coste
72bdb8faa9
Always use plain ncurses.h
2014-12-14 23:42:00 +00:00
Maxime Coste
fc4d77964e
Remove special case when appending at eol
2014-12-13 13:10:40 +00:00
Maxime Coste
a0b35bf590
Add support for user mappings, bound to comma
...
:map have a 'user' mode that is accessible through the comma key.
the mapping will get executed in normal mode.
2014-12-12 13:57:02 +00:00
Maxime Coste
801bd5245d
Avoid very long timeouts in event manager
2014-12-12 13:55:32 +00:00
Maxime Coste
9c1ca303ff
Change a-| to ignore output, and add ! and a-! for insert/append cmd output
2014-12-11 23:21:11 +00:00
Maxime Coste
c68c9abcac
Display the register we yanked to
2014-12-11 19:36:41 +00:00
Maxime Coste
2c4ed3a78c
Do not avoid eol on escape
2014-12-11 19:36:20 +00:00
Maxime Coste
7a10029c4f
Use algorithms in id_map rather than raw loops
2014-12-11 13:55:04 +00:00
Maxime Coste
35e7a67c6a
Do not sort results of WordDB, simplify code
2014-12-11 13:14:57 +00:00
Maxime Coste
f32ab5793e
Remove unneeded includes
2014-12-11 13:10:41 +00:00
Maxime Coste
e0cc59914e
Fix OSX compilation
2014-12-10 20:54:47 +00:00
Maxime Coste
319cfcda34
Get rid of uses of unordered_set, vector is just simpler and faster...
2014-12-09 21:59:47 +00:00
Maxime Coste
0a57fa0766
Rename ncurses.{cc,hh} to ncurses_ui.{cc,hh}
2014-12-09 13:57:21 +00:00
Maxime Coste
2f2752cd1d
Force inline StringView::{begin,end}
2014-12-09 13:56:05 +00:00
Maxime Coste
87d312b6d4
More string cleanups
2014-12-08 13:59:29 +00:00
Maxime Coste
9f4af93780
cleanup in string.hh
2014-12-08 13:46:07 +00:00
Maxime Coste
1a17d9c73f
const String& to StringView
2014-12-07 21:01:42 +00:00
Maxime Coste
d57be83522
Disable history writing when running hooks
2014-12-05 14:01:07 +00:00
Maxime Coste
1c5975835e
Consolidate constext disablable feature in a 'Disableable' helper
2014-12-05 13:47:09 +00:00
Maxime Coste
423030c9bd
Refactor (again) event handling, use proper infinite timeout
2014-12-04 20:01:34 +00:00
Maxime Coste
176358f6b7
Fix logic error in shell manager
2014-12-04 13:58:02 +00:00
Maxime Coste
a51dd737ea
Limit event handler timeout to 2 seconds
2014-12-03 19:55:53 +00:00
Maxime Coste
d437ae0ecf
Microsecond is 10^(-6)s, not 10^(-9)s
2014-12-03 18:57:33 +00:00
Maxime Coste
995c7b4634
Fix timeval field types
2014-12-03 14:02:46 +00:00
Maxime Coste
24519e645e
Revert "Handle SIGCHLD signals when piping"
...
This reverts commit 8208e75294
.
2014-12-03 13:57:04 +00:00
Maxime Coste
0517a19e6d
Use a select based event handling and fix deadlock
2014-12-03 13:56:02 +00:00
Maxime Coste
def4221ac7
Pass a BufferRange to highlighters, fix subregions
...
Regions highlighter can now correctly be applied to only subrange
of the buffer, fixing some corner cases in recursive regions.
2014-12-02 19:56:17 +00:00
Maxime Coste
8208e75294
Handle SIGCHLD signals when piping
2014-12-02 18:59:39 +00:00
Maxime Coste
4fbaee61c5
Change default PrimarySelection face to be white on blue
2014-12-01 13:06:26 +00:00
Maxime Coste
a3b3001d8f
Rework client pending key handling, fix insert/normal timers
2014-11-29 20:14:52 +00:00
Maxime Coste
77e2e8a31e
Support selecting yank/paste register with "
2014-11-28 13:58:36 +00:00
Maxime Coste
75fe9a76db
Fix compilation
2014-11-28 13:47:42 +00:00
Maxime Coste
7c87abe856
Process ctrl-c when not in urgent event mode as well
2014-11-28 13:30:58 +00:00
Maxime Coste
da9f688f37
Fix indent/deindent when multiple selections are on same line
2014-11-28 13:22:54 +00:00
Maxime Coste
6902301674
Fix bug in :debug command
2014-11-28 13:18:08 +00:00
Maxime Coste
4c7f6985f1
Add an 'options' debug command
2014-11-26 13:27:26 +00:00
Maxime Coste
49931fbf05
Separate events between normal and urgent ones
...
Run urgent ones while executing %sh blocks.
Fixes #236
2014-11-25 13:52:06 +00:00
Maxime Coste
0272da65c0
Style tweak
2014-11-24 13:49:41 +00:00
Maxime Coste
35b89d5b87
Display selection count in insert mode line
2014-11-24 13:26:42 +00:00
Maxime Coste
dfed7ed211
const String& to StringView
2014-11-23 19:49:59 +00:00
Maxime Coste
88def85d77
Do not merge overlapping selections in InputMode::Replace
...
Fixes #237
2014-11-22 21:20:29 +00:00
Maxime Coste
f56b6ed75b
Do not record keys that were not user generated
2014-11-21 19:00:34 +00:00
Maxime Coste
e8c8833211
Do not reset edition level to 0 on buffer change
...
Keep it as is, commit undo in current buffer, and we will commit it in
the new buffer when edition level gets back to 0.
2014-11-21 18:56:39 +00:00
Maxime Coste
5497064f9c
Fix missing include in assert.cc
2014-11-20 19:32:58 +00:00
Maxime Coste
bfbee3c71e
Fix info box placement when too wide
2014-11-20 18:45:27 +00:00
Maxime Coste
b5ccc8bc73
Improve line wrapping behaviour
2014-11-20 18:45:10 +00:00
Maxime Coste
04ecb2cc5a
Wrap info boxes text in ncurses display even in Inline menu style
2014-11-20 13:56:37 +00:00
Maxime Coste
a444cd1d60
Improve wrap_lines behaviour, split on punctiation as well
2014-11-20 13:55:07 +00:00
Maxime Coste
314d662c5f
Change wrap_lines to return StringViews, move it to string.cc
2014-11-20 13:15:11 +00:00
Maxime Coste
eb57d0a1d9
Refresh stdscr at startup to avoid flickering
2014-11-18 00:01:29 +00:00
Maxime Coste
6663d50d95
Tweak option completion behaviour
2014-11-17 20:15:54 +00:00
Maxime Coste
0c3acb74c2
Remove unneeded string copies
2014-11-17 19:38:30 +00:00
Maxime Coste
7619fcb198
option completion are valid until a modification is made before it
2014-11-17 13:53:59 +00:00
Maxime Coste
1bd2260fa5
Import std::begin/std::end so that container utils work correctly with non std containers
2014-11-17 13:51:21 +00:00
Maxime Coste
b43f0fb853
Yet more StringView params, less const String&
2014-11-16 20:55:36 +00:00
Maxime Coste
ece03c3599
More const String& to StringView
2014-11-15 18:45:56 +00:00
Maxime Coste
27b1e8944f
const String& to StringView
2014-11-14 22:40:51 +00:00
Maxime Coste
7064679c2a
small fix
2014-11-13 22:17:10 +00:00
Maxime Coste
3a817e2f96
Cleanup includes
2014-11-12 21:27:07 +00:00
Maxime Coste
58c1721564
Use general flags utility for Face Attribute
2014-11-12 20:31:56 +00:00
Maxime Coste
3f733569ed
Fix case where a context ends up locked in no-hooks mode
2014-11-12 20:31:12 +00:00
Maxime Coste
fab9c92006
change filter mode to make backup of files to .kak-bak and edit in place
...
Add a -q option to filter mode to be quiet about errors while applying
keys.
2014-11-11 23:40:07 +00:00
Maxime Coste
f6e9018bf0
Reduce idle timeout to 50 milliseconds
2014-11-11 23:32:52 +00:00
Maxime Coste
7bb7c1b922
Hide info box when closing insert completion menu
2014-11-11 23:31:06 +00:00
Maxime Coste
e8b0a98a78
Remove %rec{...} strings, now "..." strings expand their content
2014-11-11 13:53:57 +00:00
Maxime Coste
414cfabb8c
fix clang compilation
2014-11-11 13:47:51 +00:00
Maxime Coste
b2407d9dfa
Add ui_options option for UserInterface configuration
...
ui_options is a std::unordered_map<String, String> that gets
forwarded to the user interface. Add support ncurses_status_on_top.
2014-11-10 23:29:16 +00:00
Maxime Coste
d803333e73
Add support for unordered_map options
2014-11-10 23:24:02 +00:00
Maxime Coste
4235ab5249
Display status line on top in ncurses
2014-11-10 13:46:08 +00:00
Maxime Coste
7d4c9c2ccf
Support hinting if an inline info should be above or below the anchor
...
Used by ctags function info, we always want it *above* the opening
parenthesis so that it does not hide multi line parameter lists.
2014-11-10 13:37:17 +00:00
Maxime Coste
40d649f836
refactor parse_keys
2014-11-09 13:02:01 +00:00
Maxime Coste
766df0490c
small code simplification
2014-11-09 11:42:06 +00:00
Maxime Coste
88aa707b9c
For {Menu,Info}Style::Prompt, choose the anchor directly in ncurses code
2014-11-08 19:08:23 +00:00
Maxime Coste
e1fc2677e3
Add a MenuDoc style for info box, that will place it next to the menu
2014-11-08 18:01:55 +00:00
Maxime Coste
484fffc288
Initial support for insert completion docstring
2014-11-07 13:54:43 +00:00
Maxime Coste
fc66c7f92f
small style fix
2014-11-07 13:51:07 +00:00
Maxime Coste
5ef4dd84b9
Small refactoring in remote.cc
2014-11-06 13:54:18 +00:00
Maxime Coste
80b50cd737
Simplify RemoteClient creation code
2014-11-05 13:57:12 +00:00
Maxime Coste
a3b29b1f11
Fix potential alignment bug
2014-11-05 13:50:06 +00:00
Maxime Coste
4c3056a05e
Fix bug in insert completer deregistering
...
The context options might change, as the context might have a different
window/buffer from the one at creation. So we need to store the correct
option manager rather than ask the context for it.
2014-11-04 23:51:41 +00:00
Maxime Coste
c8ea2e78f9
Reuse existing buffer when creating a fifo one
...
That way, client having this buffer already visible wont switch to
another one due to previous buffer getting deleted
2014-11-04 23:51:22 +00:00
Maxime Coste
71197c4641
Tweak flags implementation
2014-11-04 22:23:27 +00:00
Maxime Coste
4d89a297c5
Change Value to be non copyable
2014-11-04 22:23:27 +00:00
Maxime Coste
f5be7c7ba5
minor code cleanup
2014-11-04 13:40:35 +00:00
Maxime Coste
60c1bb1315
Use unescape rather than a regex in command manager parsing
2014-11-04 13:35:54 +00:00
Maxime Coste
97df59ddb7
Support single char StringView
...
remove single char escape function overload, add unescape function
2014-11-04 13:32:18 +00:00
Maxime Coste
b167c11671
Use StringViews for some helper functions in selectors.cc
2014-11-04 13:14:48 +00:00
Maxime Coste
4051534b83
Open fifo buffers in non block mode
2014-11-03 13:55:07 +00:00
Maxime Coste
abfc016321
Remove AutoRegister util template
2014-11-02 16:04:24 +00:00
Maxime Coste
b494b873b1
Fix buffer being considered modified after reloading
2014-11-01 19:35:27 +00:00
Maxime Coste
c04dfc7bb7
move more parameters from const String& to StringView
2014-11-01 19:31:13 +00:00
Maxime Coste
9a2822e329
Change :info -anchor option, take directly a buffer coordinate
...
Fix ctags funcinfo feature using that
2014-10-31 21:49:36 +00:00
Maxime Coste
e38ba6ce3d
Add scope class and encapsulate Options, Keymaps, Aliases and Hooks in it
2014-10-30 14:04:57 +00:00
Maxime Coste
8649371ff2
Add kak binary location to PATH env var automatically
...
That way the kak binary can be guaranteed to be available even
if not in user PATH.
2014-10-30 14:02:13 +00:00
Maxime Coste
185b980718
Add scoped aliases
...
aliases are now stored in window, buffer, or globally.
2014-10-30 14:02:13 +00:00
Maxime Coste
502de87697
Actually release interned string data when refcount drops to 0
2014-10-29 13:54:35 +00:00
Maxime Coste
d29419bcd6
Fix invalid memory access when applying modifications on an empty buffer
...
That can happen when undoing/redoing accross a buffer reload
boundary.
2014-10-28 21:55:08 +00:00
Maxime Coste
62f56378c9
Add some asserts in StringRegistry methods
2014-10-28 21:54:25 +00:00
Maxime Coste
2944dbc332
Style fixes
2014-10-28 20:01:55 +00:00
Maxime Coste
d3091cb553
Add noexcept spec to move constructor and move assign
2014-10-28 20:01:27 +00:00
Maxime Coste
00aede6e57
mark InternedString move constructor noexcept
2014-10-28 19:44:00 +00:00
Maxime Coste
fa886ffaac
Refactor word_db, use an unordered map
2014-10-28 19:23:02 +00:00
Maxime Coste
c2c980c484
Fix unneeded WordDB copy in complete_word
2014-10-28 19:18:33 +00:00
Maxime Coste
efa276b13b
Tweak Value constructor, no need for the const ref one
2014-10-28 19:17:54 +00:00
Maxime Coste
5078b9077d
Fix interned string hashing, we need to hash content
2014-10-28 19:16:35 +00:00
Maxime Coste
54fd0aab22
Fix filter mode
2014-10-27 17:54:20 +00:00
Maxime Coste
372ba2936f
Small formatting fix
2014-10-27 13:22:42 +00:00
Maxime Coste
992c74a06d
small formatting tweak
2014-10-26 20:21:01 +00:00
Maxime Coste
2213f98176
Add virtual destructor to Highlighter
2014-10-25 10:40:26 +01:00
Maxime Coste
54f4b8fc2d
Do not lose history when reloading a buffer
...
Fixes #157
2014-10-23 21:04:58 +01:00
Maxime Coste
3e797a3d15
centralize bit operation support for enum used as flags
2014-10-23 19:02:39 +01:00
Maxime Coste
5eb8989192
Fix slow InternedString copy constructor
2014-10-23 13:53:04 +01:00
Maxime Coste
67a5493fa2
minor code tweaks
2014-10-23 13:37:47 +01:00
Maxime Coste
38df876586
Reread file timestamp at the moment the user choose to keep
...
The previous behaviour ended up asking twice for reloading if the
buffer was modified again after Kakoune had detected the first
change.
2014-10-22 19:24:26 +01:00
Maxime Coste
7f23d4b756
Close fd before notifiying buffer of modification when writing to file
2014-10-22 19:23:54 +01:00
Maxime Coste
b2e90fe21e
Refactor highlighters, use an interface with virtual methods
2014-10-22 13:54:03 +01:00
Maxime Coste
fc4142178f
Port more code to StringView instead of const String&
2014-10-20 19:18:38 +01:00
Maxime Coste
69113e2711
Add a split function that does not take an escape and returns StringViews
...
When an escape character is not present, split can just return sub
strings of the parameter, so we can avoid duplicating the original
string data.
2014-10-19 16:27:36 +01:00
Maxime Coste
2e0b4d02b7
Small tweak
2014-10-16 19:43:09 +01:00
Maxime Coste
9c2f9d5547
Make it more explicit that Key modifiers is a bit field
2014-10-15 19:13:51 +01:00
Maxime Coste
1128d941ff
Do not write pid and session name in debug buffer on startup
2014-10-14 13:42:47 +01:00
Maxime Coste
e362eb4f3b
Add a disabled wrapper for using std regex instead of boost
2014-10-14 13:40:13 +01:00
Maxime Coste
eb0d03f437
Use Pass as default policy for invalid utf8 avoid asserting on that
2014-10-13 21:07:23 +01:00
Maxime Coste
894dd2e055
Add missing includes
2014-10-13 19:28:02 +01:00
Maxime Coste
2adaa7bdfa
Do not assert on SIGTERM and backup modified buffers on signal induced termination
2014-10-13 13:38:28 +01:00
Maxime Coste
fa85f0fc32
Refactor regex uses, do not reference boost except in regex.hh
2014-10-13 13:14:23 +01:00
Maxime Coste
b6f2b872b0
Preserve selection orientation when replacing
...
Fixes #31
2014-10-12 18:58:10 +01:00
Maxime Coste
cbf4d3db3f
Add a test make target
2014-10-11 19:50:30 +01:00
Maxime Coste
6a48b5eabc
Merge branch 'master' of github.com:mawww/kakoune
2014-10-11 15:54:06 +01:00
Maxime Coste
729e55573f
Support changing buffer when an edition is in progress
2014-10-10 14:00:24 +01:00
Maxime Coste
c94b343c65
Start regex search from selection min/max depending on search direction
2014-10-09 18:55:58 +01:00
Roberto Zanotto
daeb8a1c8d
empty DESTDIR
2014-10-08 21:23:20 +02:00
Maxime Coste
8a7e16cec3
Switch some const String& parameters to StringView
2014-10-07 21:11:55 +01:00
Maxime Coste
a627eab57c
Small refactor
2014-10-07 19:46:12 +01:00
Maxime Coste
b097bbbf52
WordDB: Use interned strings pointing directly into the buffer line data
2014-10-07 09:16:19 +01:00
Maxime Coste
008ba2cbab
Use ',' instead of '|' as tuple option fields separators
2014-10-06 19:32:25 +01:00
Maxime Coste
17d591b61c
scrolloff is now a line,column pair
...
Fixes #152
2014-10-06 19:21:32 +01:00
Maxime Coste
844c8f1ec4
InternedStrings know their slots
2014-10-05 10:20:50 +01:00
Maxime Coste
d4a84125ef
Use InternedStrings for buffer contents
2014-10-03 13:39:13 +01:00
Maxime Coste
fc53a80395
Small refactor
2014-10-01 23:41:06 +01:00
Maxime Coste
3ea690a92e
Fix finding next match when the cursor is in the middle of the only match
2014-10-01 13:54:33 +01:00
Maxime Coste
d55d041c6a
Add support for interned strings
...
Use interned strings for Modification contents and word database.
Interned strings are guaranteed not to move in memory and are
reference counted.
2014-10-01 00:20:12 +01:00
Maxime Coste
d9e462851c
Pass -rdynamic only to the linker
2014-09-28 23:59:04 +01:00
Maxime Coste
507cdd7272
Start with the whole buffer selected in filter mode
2014-09-28 23:58:34 +01:00
Maxime Coste
092ac8e9ab
Remove unused function
2014-09-26 00:41:50 +01:00
Maxime Coste
9beba90060
Finding next matches start from seleciton min/max instead of cursor
...
uses min for backward serching, max for forward searching.
2014-09-26 00:27:23 +01:00
Maxime Coste
a404886fe2
line joining will only join selected lines if selection span multiples ones
...
Fixes #133
2014-09-25 19:26:27 +01:00
Maxime Coste
ecf8047bcc
Fix reverse search when extending
2014-09-25 13:29:53 +01:00
Maxime Coste
4c4d3cdd38
Add support for mapping keys in goto/view commands
2014-09-23 13:45:18 +01:00
Maxime Coste
9625ea64ff
Add inner versions of to object begin/end selection
2014-09-23 13:37:56 +01:00
Maxime Coste
e440adbcf4
add a 'buffers' debug command to get info on alive buffers
2014-09-22 19:19:34 +01:00
Maxime Coste
0ac65e1610
Use std:move for selection parameters
2014-09-22 13:55:39 +01:00
Maxime Coste
6bcc038329
tweak helper functions in buffer_utils.hh
2014-09-22 13:45:07 +01:00
Maxime Coste
217ba625ad
Use raw terminal, and handle signals manually
...
C-c now sends SIGINT to the process group of Kakoune server
when used in normal mode.
Fixes #30
2014-09-20 19:35:37 +01:00
Maxime Coste
2aaae7473c
preserve selection direction in split lines
2014-09-19 13:45:24 +01:00
Maxime Coste
f738316689
small refactor in highlighters
2014-09-19 13:45:11 +01:00
Maxime Coste
af1134bd75
Fix confusion between -n and -d switches in main
2014-09-18 18:43:42 +01:00
Maxime Coste
ff25948a6f
Fix compilation on recent cygwin
2014-09-18 18:43:12 +01:00
Maxime Coste
90df4320b7
Add a small validation assert to catch a rare bug
2014-09-18 10:47:59 +01:00
Maxime Coste
dd2bdea8dd
Keep selection direction on split/select/search
2014-09-18 00:34:23 +01:00
Maxime Coste
be85eb5d0b
Makefile: Include system header in generated dependencies
2014-09-15 18:59:49 +01:00
Maxime Coste
827a77539a
Add some color to mode specific mode line info
2014-09-10 19:06:53 +01:00
Maxime Coste
c18e2ac90e
Target end of line on line selectors
2014-09-09 23:41:32 +01:00
Maxime Coste
5092494427
Add support for target column preservation
...
Fixes #64
2014-09-09 19:42:57 +01:00
Maxime Coste
6dc223ed6a
Fix spaces_to_tabs when tabs follow spaces
2014-08-28 23:19:18 +01:00
Maxime Coste
114d33c7f8
Limit the iteration count when reading from a fifo
2014-08-26 22:11:23 +01:00
Maxime Coste
c90bdb9862
Fix handling of -- in parameter parser
2014-08-26 22:10:54 +01:00
Maxime Coste
8fc230e40d
Add a 'disabled_hooks' regex option
...
Hooks whose group matches this regex wont get executed.
2014-08-21 14:37:59 +01:00
Maxime Coste
50e1e5fadd
Add support for 'c-o' in prompt and insert to hide the completion menu
...
Fixes #229
2014-08-19 23:32:19 +01:00
Maxime Coste
d78a586126
Do not allow using color names as face names
2014-08-19 23:16:21 +01:00
Maxime Coste
d78e331304
Allow faces to reference faces
...
Fixes #102
2014-08-19 23:10:56 +01:00
Maxime Coste
bea53d09b2
Remove option checkers, handle that through the type system
...
Use a specific type for InsertCompleterDesc with checks in
the option_{from,to}_string functions
2014-08-19 18:56:11 +01:00
Maxime Coste
a36aed94f1
Add support for operator== to Optional
2014-08-19 18:55:36 +01:00
Maxime Coste
2e2812b10f
Do not escape completions in completer functions let the client decide
...
Fixes #231
2014-08-18 23:31:02 +01:00
Maxime Coste
e6b9a1d982
Get forced file descriptors after calling poll
...
That way, we do not wait for the next poll to finish before servicing
forced fd triggered by a signal that interupted the poll call.
2014-08-17 15:58:42 +01:00
Maxime Coste
6ba3017a8e
Always inline a few more methods
2014-08-17 15:36:12 +01:00
Maxime Coste
5c3f01fea2
Add exception reporting in filter mode
2014-08-17 15:19:04 +01:00
Maxime Coste
8d4531d419
Add support for reading from stdin/writing to stdout in filter mode
...
Note that kakoune still needs to read the whole buffer first, only
once stdin is closed can it execute the keys.
2014-08-15 13:21:54 +01:00
Maxime Coste
eff32aa1a1
Refactor, remove kakoune function and move it inside main.
2014-08-14 23:57:13 +01:00
Maxime Coste
ceb10665d1
Add support for running kakoune as a filter, using -f 'keys'
...
It will cycle on every given files, apply the keys and write to
<filename>.kak-out. Only normal/insert mode is available, kakrc
are not read.
2014-08-14 23:51:24 +01:00
Maxime Coste
0588780866
Refactor main loops, use separate functions for each running mode
...
Server, Client, and Pipe are handle through separate functions,
with the kakoune function handling parameter parsing.
2014-08-14 20:37:36 +01:00
Maxime Coste
aaa6d3ab39
memoryview: add support for reverse iteration
2014-08-14 20:35:03 +01:00
Maxime Coste
fbbe741c07
Add support for <c-w> <c-b> and <c-e> for word moves in the line editor
...
This might go away later if we find a better way of handling line
edition, but seems like a good compromise for now.
Fixes #168
2014-08-14 00:31:39 +01:00
Maxime Coste
518b995720
NCurses: properly handle ctrl+alt
2014-08-14 00:30:32 +01:00
Maxime Coste
2204b7cf06
Defer deletion of buffers to after the event loop
...
We can have SelectionList in flights on the buffer, so mark
it for deletion by moving it in a buffer trash, and effectively
delete it later, at a point where there should not be any further
access to it.
2014-08-12 19:24:09 +01:00
Maxime Coste
e2b3dd0ca4
Tweak client redraw logic, avoid highlight if only status line changed
2014-08-12 19:19:46 +01:00
Maxime Coste
d356ae2419
Make safe_ptr able to track callstacks
...
The code stays disabled, as the performance penalty is quite
high, but can be enabled to help debugging safe pointers.
2014-08-12 19:18:10 +01:00
Maxime Coste
1b54b65bb5
Add an operator[](CharCount) to String and StringView
2014-08-11 19:40:35 +01:00
Maxime Coste
43f44bbab3
Fix buffer modification check
...
It used to grab the next key, because the normal mode reactivation
when executing the on_next_key would trigger a timestamp check again.
2014-08-07 21:51:36 +01:00
Maxime Coste
c4f0c4dee6
Change escaping method for command completion
2014-08-03 10:03:14 +01:00
Maxime Coste
8ee2aa9ba7
Use more StringView in string helper functions
2014-08-03 10:02:17 +01:00
Maxime Coste
de402c4703
Fix buffer name completion when basename only
2014-08-03 10:00:34 +01:00
Maxime Coste
aac02410b1
Buffer completion match directory names as well for subsequence match
2014-07-31 22:43:36 +01:00
Maxime Coste
beb6065a71
Add a -existing switch to edit command
...
with this switch, fail if the file is not found rather than creating
a new one. Use that in grep and make jump commands.
2014-07-31 22:10:01 +01:00
Maxime Coste
5fc063c520
Insert word completion: Use subsequence matching if prefix failed
2014-07-30 19:58:34 +01:00
Maxime Coste
4c31449a65
Add access to specific env vars in %val{...} evaluation
2014-07-30 19:17:04 +01:00
Maxime Coste
31f9d87798
Only change search register when prompt are validated
...
Fixes #160
2014-07-30 19:15:16 +01:00
Maxime Coste
9fe4724743
Stop macro recording on esc in normal mode
...
Fixes #221
2014-07-30 01:09:04 +01:00
Maxime Coste
06fc329739
Rewrite real_path, try to find an existing directory in the given path
...
Never throw, return the given filename in the worst case.
2014-07-30 00:03:01 +01:00
Maxime Coste
8ed16bb2e9
In non interactive interactive mode, disable user key mappings
...
exec and eval now accepts a -with-maps to use them. But by default
they are disabled, so that all the indent scripts work even if you
remap basic keys.
Fixes #217
2014-07-27 20:18:09 +01:00
Maxime Coste
7c10660f9a
Fix resize handling in ncurses UI
2014-07-26 22:38:10 +01:00
Maxime Coste
8d6e8bc06f
Display a [no-hooks] tag in the mode line when hooks are disabled
2014-07-25 23:47:47 +01:00
Maxime Coste
6813440212
Fix Selection::insert when replacing with empty string at the end of the buffer
2014-07-25 23:47:11 +01:00
Maxime Coste
731277a425
Disable hooks on a per context basis, and propagate that to Insert mode
...
using \ before entering insert mode will disable hooks during the whole
insert session rather than only the entering phase. That gives a nice
way of pasting text into kakoune.
2014-07-24 19:18:39 +01:00
Maxime Coste
826bf22eef
fix align with multiple columns
2014-07-22 00:41:10 +01:00
Maxime Coste
bc48d9260d
Fix Menu use of j/k keys when editing filter
2014-07-22 18:39:04 +01:00
Maxime Coste
3c021672d2
Add completion support for rmhooks
2014-07-21 21:14:32 +01:00
Maxime Coste
50abc18c8e
Add some more force inlines to some buffer methods
2014-07-19 00:18:16 +01:00
Maxime Coste
f4e3df817f
Clear status line on normal mode command
2014-07-17 19:37:30 +01:00
Maxime Coste
880a8becb6
Fix ncurses flickering of the menu and info box
2014-07-16 23:11:18 +01:00
Maxime Coste
032b621150
Use strongly typed enum for Face Attribute, add Dim
2014-07-15 20:11:47 +01:00
Maxime Coste
e6699c66ed
Fix comment parsing error in CommandManager
2014-07-15 13:15:21 +01:00
Maxime Coste
ac5cbba0ae
Remove region highlighter, rename multi_regions to regions, cleanup
2014-07-14 21:42:19 +01:00
Maxime Coste
ec37adc523
Fix bug in nested highlighting
2014-07-14 21:41:29 +01:00
Maxime Coste
d5d76721b0
Avoid infinite loop in MultiRegionHighlighter when regexes generate empty matches
2014-07-14 20:46:46 +01:00
Alex Leferry 2
12cdfb316a
underline (MatchingChar|Search) faces
2014-07-14 20:23:56 +01:00
Maxime Coste
b96f653b6c
Fix numbering with '#' register
2014-07-14 19:00:54 +01:00
Maxime Coste
cbfceba149
Do not resolve faces in highlighter factories, defer to actual highlighting
2014-07-13 16:52:51 +01:00
Maxime Coste
d78ece490f
Rename RegexColorizer to RegexHighlighter
2014-07-12 13:57:16 +01:00
Maxime Coste
72ccb9bce6
Refactor RegexColorizers face handling
2014-07-12 11:19:35 +01:00
Maxime Coste
d0d4108085
Rename :colalias to :face and update documentation
2014-07-12 10:55:50 +01:00
Maxime Coste
608e188960
Support attributes in face specifications
2014-07-11 00:44:59 +01:00
Maxime Coste
a32b49acd1
Rename ColorPair to Face and ColorRegistry to FaceRegistry
...
Face also stores the attributes
2014-07-11 00:27:43 +01:00
Maxime Coste
42611aef1e
Fix select_number
2014-07-10 19:22:14 +01:00
Maxime Coste
b6979e2d2c
Add docstring for normal mode commands and display them if autoinfo >= 2
2014-07-10 19:22:14 +01:00
Maxime Coste
4c3bd68876
Change autoinfo option to be an integer, allowing different levels
2014-07-10 19:22:14 +01:00
Maxime Coste
81d3eadd09
:edit! without argument reload current buffer
2014-07-10 19:22:14 +01:00
Maxime Coste
9952704eaf
Fix :map scope completion
2014-07-08 00:53:06 +01:00
Maxime Coste
c6df0c9174
Do not write '*** kak: fifo closed ***' in buffers
...
The status line '[fifo]' flag should replace that
2014-07-07 23:56:17 +01:00
Maxime Coste
55866b51d7
Fix redrawing of windows when only the status line changes
2014-07-07 23:56:17 +01:00
Maxime Coste
90c2647c0b
Use colors in status bar for certain flags
2014-07-07 23:56:17 +01:00
Maxime Coste
7726db0799
NCurses: change scroll bar characters
2014-07-05 19:18:59 +01:00
Maxime Coste
fc7f017372
Remove 'ReplaceMain' select mode
2014-07-05 12:37:49 +01:00
Maxime Coste
a61db7ef5e
Merge remote-tracking branch 'alexherbo2/previous-match'
2014-07-05 12:36:35 +01:00
Maxime Coste
9439d28028
More consistent <space> and <a-space> behaviour
...
<space> and <a-space> without count now remove all except/keep
main selection. Without reducing main selection to cursor.
Reduce to cursor is moved to ';' and flip selections to <a-;>
2014-07-05 12:10:06 +01:00
Maxime Coste
60bf540ee6
NCurses: better support for 256 color terminals that cannot change colors
2014-07-05 12:10:06 +01:00
Maxime Coste
d181a40a91
Add support for paste all (on <a-[pP]>)
...
Paste all pastes all yanked text at all selections, selecting each
pasted text.
Replace paste moves to R, and concat yank/concat delete (Y and D)
are removed.
Fixes #161
2014-07-05 12:10:06 +01:00
Maxime Coste
8795efdf19
Minor style cleanup
2014-07-05 12:10:06 +01:00
Maxime Coste
ed68d1ff28
utf8: use end of sequence iterators for more security
2014-07-05 12:10:06 +01:00
Maxime Coste
3f70d91f8c
Use unsigned char rather than char in utf8 decoding to avoid sign extension
2014-07-05 12:10:06 +01:00
Alex Leferry 2
581dc59fb8
add alt-n commands to (replace|append) previous match
...
Note: alt-n command were used to replace main selection with next match
(preserving the others)
2014-07-03 15:27:07 +02:00
Maxime Coste
d69664f401
Add :waq for write all an quit, with slight refactoring
...
Fixes #175
2014-07-01 20:38:55 +01:00
Maxime Coste
ffe8143cc7
Accept upper case macro names, convert them to lower case
2014-07-01 08:48:52 +01:00
Maxime Coste
b18db68c8a
Fix spurious eol appearing in non scrolling fifo buffers
2014-06-30 18:56:18 +01:00
Maxime Coste
d6bb5b5a4b
Canonicalize filenames when checking if a buffer was written to its file
2014-06-29 22:03:59 +01:00
Maxime Coste
df3bf7445d
Replace boost::optional with our own implementation
2014-06-27 21:10:09 +01:00
Maxime Coste
7aa78d726a
fix potential infinite loop in show_matching highlighter
2014-06-27 21:10:09 +01:00
Maxime Coste
63878b03c5
Style fixes
2014-06-26 19:01:39 +01:00
Maxime Coste
047488a8da
Fix recursive string parsing, correct handling of escapes
2014-06-26 18:59:41 +01:00
Maxime Coste
5b27b956ad
Rename utf8::utf8_iterator to utf8::iterator
2014-06-24 19:10:57 +01:00
Maxime Coste
b934c8ede5
Fix crash in Context::main_sel_register_value
2014-06-23 13:16:51 +01:00
Maxime Coste
df4983b6d4
Do not try to reload buffer if the buffer was deleted
...
Fixes #121
2014-06-22 11:09:44 +01:00
Maxime Coste
b89b7c754f
Add \ in normal mode to disable user hooks on next normal command
...
Fixes #112
2014-06-21 22:06:02 +01:00
Maxime Coste
edd883ad18
Only user hooks can be disabled
2014-06-21 12:08:19 +01:00
Maxime Coste
7235180614
Use main selection index as default when accessing only one register value
...
Fixes #117
2014-06-21 11:31:08 +01:00
Maxime Coste
e202b7af50
Add a line_option highlighter that highlight the line stored in an int option
...
Use it to highlight the current error in the *make* buffer
2014-06-18 20:50:39 +01:00
Maxime Coste
6f2569ff30
Color Default now means 'keep as is' for most highlighters
2014-06-18 20:33:23 +01:00
Maxime Coste
54590f5d79
Minor code cleanup in highlighters
2014-06-18 20:31:49 +01:00
Maxime Coste
1c69764774
Merge branch 'master' into hierarchical-highlighters
2014-06-18 20:20:58 +01:00
Maxime Coste
9aa8c8a60a
Add a %val{...} expand type
...
%val{name} gives access to values given in shell through $kak_<name>
2014-06-18 19:32:13 +01:00
Maxime Coste
b8a205b858
Use -group rather than -id in hooks to mirror highlighters closer
2014-06-16 20:42:12 +01:00
Maxime Coste
3ef5bf53d5
Add BufCloseFifo hook and use that to remove fifo directories
2014-06-16 19:50:20 +01:00
Maxime Coste
fc6a16a571
Fix corner cases in region highlighting
2014-06-16 19:41:07 +01:00
Maxime Coste
51da452dc4
Merge branch 'master' into hierarchical-highlighters
2014-06-16 01:06:09 +01:00
Maxime Coste
e78fd2d235
Do not merge overlapping selection when entering append mode
...
Fixes #163
2014-06-16 01:05:38 +01:00
Maxime Coste
2acfe85281
Highlight selection cursors in a second pass
...
This allows cursors to overlap on next selection and still be
visible.
2014-06-16 00:59:05 +01:00
Maxime Coste
c87e81e8de
Use zstr instead of c_str in ncurses addutf8str
2014-06-16 00:53:25 +01:00
Maxime Coste
b5f5610cbe
Share implementation in complete_id/complete_group_id
2014-06-16 00:49:39 +01:00
Maxime Coste
205e8b2889
Refactor highlighter command completions
2014-06-15 16:04:38 +01:00
Maxime Coste
89d30cbb21
Fix selection update
2014-06-14 14:07:42 +01:00
Maxime Coste
fa5b6b716d
Fix crash in paragraph selection
2014-06-14 14:07:21 +01:00
Maxime Coste
e0cd8ad93c
Fix crash in paragraph selection
2014-06-14 14:07:03 +01:00
Maxime Coste
9130f0334b
Remove defhl, use addhl -group
2014-06-12 22:35:40 +01:00
Maxime Coste
af750ce186
Fix selection update
2014-06-12 21:23:49 +01:00
Maxime Coste
346de52633
add postfix increment to ParameterParser iterator
2014-06-12 20:03:17 +01:00