Stephen Hassard
eca53db2bf
remove dragonflybsd specific logic since pkg-config works perfectly fine now
2018-04-22 09:12:45 -07:00
Maxime Coste
0b773ac26c
Complete word from the current buffer in regex_prompt
...
This allows to use Kakoune fuzzy matching to get the words we
are looking for.
2018-04-19 07:58:42 +10:00
Maxime Coste
f545ff7727
Move get_word_db to word_db.cc
2018-04-19 07:58:42 +10:00
Maxime Coste
e207bd30d4
Extract a for_n_best algorithm from completion function
...
Provide the heap based n-best algorithm through a nice interface.
2018-04-19 07:58:42 +10:00
Maxime Coste
c2759ac526
Fix handling of local client quitting during its creation
...
If the local client was quitted during its creation (using -e quit
for example), we could have been accessing a null pointer afterwards.
Make the rest of the code aware that local_client might be null.
2018-04-19 07:56:37 +10:00
Maxime Coste
0f38be544c
Makefile: use git-describe to get the version string
...
That means we can just tag releases and the version will be taken
from the tag to generate the tarball.
2018-04-14 13:05:59 +10:00
Maxime Coste
7f6a6ab1d3
Update startup message and include released version in it
...
Having released version information in that message will be useful
to allow user to know which breaking changes apply to them.
2018-04-14 13:04:45 +10:00
Maxime Coste
5fa19f4d7f
NCursesUI: Add support for shifted function keys
...
Shifted function keys are not well standardized around terminals,
Shift F(N) usually returns F(X) + N, with X=12 on xterm, X=10 on
rxvt-unicode... Default to X=12 and make it configuable through
the ncurses_shift_function_key ui_option.
This fixes what #1898 tried to.
2018-04-11 20:39:57 +10:00
Tim Allen
50e422659b
Add support for the shift modifier.
...
Because keyboard layouts vary, the shift-modifier `<s-…>` is only supported
for special keys (like `<up>` and `<home>`) and for ASCII lowercase where
we assume the shift-modifier just produces the matching uppercase character.
Even that's not universally true, since in Turkish `i` and `I` are not an
uppercase/lowercase pair, but Kakoune's default keyboard mappings already
assume en-US mappings for mnemonic purposes.
Mappings of the form `<s-x>` are normalized to `<X>` when `x` is an ASCII
character. `<backtab>` is removed, since we can now say `<s-tab>`.
2018-04-11 15:15:45 +10:00
Maxime Coste
d846400279
Redraw window when the face definition changed
...
Hash the current face state and store that hash to check for changes.
2018-04-10 20:35:23 +10:00
Maxime Coste
9c82f6586c
FaceRegistry: Support referencing a named face from a parent scope
2018-04-10 19:57:16 +10:00
Maxime Coste
a2978bff25
Makefile: formatting fix
2018-04-10 19:02:32 +10:00
Maxime Coste
d571c207e6
Make version available through $kak_version and debug info
2018-04-09 17:06:02 +10:00
Maxime Coste
fc86acd9f0
Makefile: add a dist target to generate a tarball
2018-04-09 16:57:15 +10:00
Maxime Coste
57baad4afd
Make FaceRegistry scoped
...
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.
colorscheme apply on global scope, which should be good enough for
now.
Fixes #1411
2018-04-07 16:27:50 +10:00
Maxime Coste
6adb28ec12
Ignore current buffer when completing the :buffer command
...
Closes #1901
Fixes #1782
2018-04-07 16:27:44 +10:00
Maxime Coste
6f58c278bf
Merge remote-tracking branch 'Delapouite/no-such'
2018-04-07 12:33:15 +10:00
Maxime Coste
23853f499e
Add some safety static_asserts to remote read/write functions
2018-04-07 12:32:31 +10:00
Delapouite
cb02186c77
Make error messages more consistent
2018-04-06 16:56:53 +02:00
Maxime Coste
3c03129c46
Make compute_display_setup methods const
2018-04-06 09:16:59 +10:00
Maxime Coste
21603983c5
Add new buffers at the back of the buffer list
...
This will be reverted if we discover why we were doing things the
over way around.
Fixes #1881
2018-04-05 10:31:41 +10:00
Maxime Coste
f018a29b58
Merge remote-tracking branch 'Delapouite/declare-option'
2018-04-05 09:23:33 +10:00
Maxime Coste
71a1893a5e
Fix some trailing spaces and a tab that sneaked into the code base
2018-04-05 08:52:33 +10:00
Maxime Coste
2f799b1acf
NCurses: Tolerate failure to open /dev/tty and to ioctl for resize
...
Not sure what to do when that happens, but asserting and quitting
is not necessarily the best option, try to tolerate it.
Fixes #1972
2018-04-04 14:01:24 +10:00
Maxime Coste
6ee60ff9d7
Prompt: add <a-!> to expand the typed expansions in current line
...
Fixes #1952
2018-04-04 11:00:25 +10:00
Maxime Coste
ff073bcce1
Merge remote-tracking branch 'lenormf/fix-ncurses'
2018-04-01 14:42:44 +11:00
Maxime Coste
ea66465144
Restore previous status line after notifying wait for shell
...
Fixes prompt getting erased by the wait for shell message, and
having to manually trigger a redraw to see it again.
2018-04-01 10:08:54 +11:00
Frank LENORMAND
e06d048d2f
src: Make code more readable, assert function calls that shouldn't fail
...
Should help clarify what the issue is in #1972 .
2018-03-31 15:00:19 +03:00
Maxime Coste
0baf562c93
Support full redraws during shell execution and handle resize there
...
Fixes #1973
2018-03-30 09:58:18 +11:00
Maxime Coste
f6f2dafaf7
Make set -add replace existing value when applied to a map option
2018-03-30 09:26:39 +11:00
Delapouite
7f3a308b60
Add status message when commiting an undo group in insert mode
2018-03-29 22:54:03 +02:00
Maxime Coste
fab3dc642a
Merge remote-tracking branch 'Delapouite/on-key'
2018-03-28 21:41:17 +11:00
Maxime Coste
ebc700ee17
Fix uninitialized m_empty_text StringView in LineEditor
2018-03-28 20:48:50 +11:00
Delapouite
1b7b3fea09
Fix typo in on-key command description
2018-03-28 07:33:43 +02:00
Delapouite
fc3f0f40b7
Give more hints in "option not found" error.
2018-03-27 19:14:41 +02:00
Maxime Coste
1f6c2b87ff
Support count in <a-s> to split on groups of n lines
...
Fixes #1966
2018-03-27 22:33:58 +11:00
Maxime Coste
e8093a12a0
Simplify command debug code
2018-03-27 08:25:47 +11:00
Maxime Coste
0a833371ab
Prompt: Do not call callback in on_enabled
...
Schedule it for later, when we get "idle". It currently can lead to
crashed because after the callback, the current mode might be different,
leading to a crash when doing the ModeChange hook call.
2018-03-27 07:40:44 +11:00
Maxime Coste
3d3a37a80c
Fix 'O' not putting the cursor on the correct line
2018-03-27 07:28:25 +11:00
Maxime Coste
253790be51
Formatting fix
2018-03-26 19:50:51 +11:00
Maxime Coste
5ba27c18a4
Fix operator priority order error
2018-03-26 19:19:47 +11:00
Maxime Coste
59c883d02f
Avoid visiting the same directory multiple times in insert filename completion
2018-03-25 20:28:26 +11:00
Maxime Coste
6d3fe30bf6
Allow explicit filename completion with empty prefix
2018-03-25 19:03:54 +11:00
Maxime Coste
a6b1d142fa
Cleanup client name validation code
2018-03-25 16:53:27 +11:00
Maxime Coste
49c52b025f
Remove contains_that and use any_of to be closer to the c++ stdlib
2018-03-25 16:47:19 +11:00
Maxime Coste
435b5b7ff9
Unify code that validates identifiers in Kakoune
...
Session/Client/User modes names are now requiered to be "identifiers"
they must be in [a-zA-Z0-9_-]. Option names are the same except they
do not allow '-' as they need to be made available through the env vars
and '-' is not supported there.
Fixes #1946
2018-03-25 16:35:33 +11:00
Maxime Coste
beb2cef7f9
Document rotate selection breaking change in startup message
2018-03-25 11:39:26 +11:00
Maxime Coste
ec7f3738ee
Move rotate selection and rotate selection contents to ) and <a-)>
...
Backward rotation are supported with (.
Fixes #1210
2018-03-25 11:39:26 +11:00
Maxime Coste
683ce8e83b
Use 1 and -1 for Forward/Backward Direction to simplify code
2018-03-25 11:25:55 +11:00
Maxime Coste
59e9108812
indent selector: When line is empty, find indent from surrounding lines
...
Look for the first non empty line preceeding the current line, or
if not found, the first non empty line following it.
Fixes #1904
2018-03-25 10:25:56 +11:00