Commit Graph

4347 Commits

Author SHA1 Message Date
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
Maxime Coste
81f605709c Remove parse_filename overload and use a default parameter 2018-03-25 07:55:39 +11:00
Maxime Coste
a732037b53 Support % in path option to mean current buffer directory
In the end, % is not that painful to work with as its only set seldomly,
and we usually dont need to use expansion at the same time. Moreover, it
just requires a single \ to be escaped.

Fixes #1562
2018-03-23 08:22:34 +11:00
Maxime Coste
db7b43acd5 Restore client name after converting to client
When Kakoune forked the sever to background, the newly converted
to client process (the original client/server process) was not
preserving its previous client name.
2018-03-23 07:36:18 +11:00
Maxime Coste
1cdeace128 Merge remote-tracking branch 'Delapouite/doc-commands' 2018-03-21 06:42:31 +11:00
Maxime Coste
5c1a5c6d15 Revert "Throw when trying to remove a child highlighter that does not exists"
This reverts commit 56237aa8f8.

Throwing seems more correct, but it breaks lots of existing scripts.
reverting for now until we have a nice solution.
2018-03-20 20:11:15 +11:00
Delapouite
00cb49438a Docs: add missing [<switches>] in commands signatures 2018-03-20 09:13:09 +01:00
Maxime Coste
bec849ae14 Tolerate empty filenames in real_path 2018-03-20 05:56:20 +11:00
Maxime Coste
f7f84b7402 NCursesUI: Rework menu_show to shrink menu height when needed
Closes #1886
2018-03-20 05:54:19 +11:00
Maxime Coste
826977eb1b Fix remove of highlighters with trailing / in their name
Fixes #1914
2018-03-20 05:35:37 +11:00
Maxime Coste
56237aa8f8 Throw when trying to remove a child highlighter that does not exists 2018-03-20 05:35:15 +11:00
Maxime Coste
b27d4afa8d Regex: Only allow SyntaxCharacter and - to be escaped in a character class
Letting any character to be escaped is error prone as it looks like
\l could mean [:lower:] (as it used to with boost) when it only means
literal l.

Fix the haskell.kak file as well.

Fixes #1945
2018-03-20 04:57:47 +11:00