Jason Felice
6c4593b18a
Document that -f
starts with whole file selected
2018-09-21 10:01:20 -04:00
Maxime Coste
d73ec20285
Kakoune v2018.09.04
2018-09-04 08:22:28 +10:00
Maxime Coste
68aba9e353
Use shell specific quoting for env vars
...
Add a test case to validate roundtrips between Kakoune and the
shell.
2018-08-29 07:53:59 +10:00
Matt Peterson
d0a8426272
Use $USER if getpwuid fails
2018-08-24 10:50:59 -04:00
Maxime Coste
f706b8c9be
Add a -version switch to Kakoune
...
Closes #1035
2018-08-09 11:24:11 +02:00
Maxime Coste
075d1048ab
Avoid invalid access to Optional
...
If the UI is not ok, the exit status of the client might not be
available. Return -1 in that case.
2018-07-30 10:32:38 +01:00
Maxime Coste
737807dde2
Replace a few loops with ranges
2018-07-26 21:23:06 +10:00
Maxime Coste
3c51da4488
Merge remote-tracking branch 'lenormf/fix-development-version'
2018-07-22 15:58:41 +10:00
Frank LENORMAND
a2f9c68a7c
src: Change the bullet point symbols in the version notes
2018-07-20 13:55:16 +03:00
Frank LENORMAND
60bd8df3c2
src: Don't print a number for the development version
2018-07-20 13:49:36 +03:00
Frank LENORMAND
0b8899d1d4
src: Rename auto_complete
to autocomplete
...
Removing the underscore seems to make the option name more
in line with the others (even though some do use a separator,
e.g. `disabled_hooks`).
2018-07-19 18:57:33 +03:00
Maxime Coste
7195100609
Re-introduce kill_session::exit_status, @lenormf was right
...
As discussed in #2186 , in the end we need the exit status for the
case where the local client exited first (the server forked to
background) then another client trigger the kill command.
2018-07-19 19:27:56 +10:00
Maxime Coste
40a91b1120
Add a -debug '...' switch to Kakoune startup that sets the debug option
...
This gives an easy way to profile startup by running with -debug profile.
2018-07-19 18:36:49 +10:00
Maxime Coste
bde726d034
Change autoshowcompl to auto_complete with insert|prompt possible values
2018-07-15 11:10:32 +10:00
Maxim Baz
3ca424d10f
Fix description of ui_options
2018-07-13 22:46:24 +02:00
Maxime Coste
eab98c88bd
Refactor handling of startup info to make it configurable
...
A new `status_info_version` option allows user to disable info
message regarding changes that happened at that version or
earlier.
2018-07-05 07:54:28 +10:00
Maxime Coste
ed123a2cc9
Reference the big breaking refactoring in the startup message
2018-07-05 07:54:28 +10:00
Maxime Coste
27163106c7
Make register expansions expand to the full register content
...
Now that we have a nice standard way to express lists of strings,
registers can be fully exposed. An new $kak_main_reg_... env var
was added to provide the previous behaviour which is relied on by
doc.kak.
2018-07-05 07:54:28 +10:00
Maxime Coste
76093f252c
Change env vars that are lists to use the general list syntax
2018-07-05 07:54:28 +10:00
Maxime Coste
ec16969609
Do not reparse %sh{...} strings
...
Automatic reparsing of %sh{...}, while convenient in many cases,
can be surprising as well, and can lead to security problems:
'echo %sh{ printf "foo\necho bar" }' runs 'echo foo', then 'echo bar'.
we make this danger explicit, and we fix the 'nop %sh{...}' pattern.
To reparse %sh{...} strings, they can be passed to evaluate-commands,
which has been fixed to work in every cases where %sh{...} reparsing
was used..
2018-07-05 07:54:28 +10:00
Maxime Coste
4ef5c80724
Fix Kakoune client busy looping on SIGHUP
...
Pure clients never quitted when they got SIGHUP after recent changes
to add is_ok to UserInterface. run_client now tracks the UI state as
well and quits if the UI gets killed.
2018-05-23 08:16:35 +10:00
Maxime Coste
14d12fac04
Rename -allow-override switch to -override
...
Closes #2057
2018-05-19 14:15:16 +10:00
Maxime Coste
b22c8ad8c7
Fix potential missed redraws
2018-05-17 22:50:11 +10:00
Maxime Coste
fcce76ba57
Handle all pending events before redrawing
...
If new events happen while handling events, take care of those
new events as well before redrawing.
2018-05-17 07:41:32 +10:00
Maxime Coste
75eb293f98
Rename Context::Flags::Transient to Context::Flags::Draft
...
Draft is well establish and all draft context are transient.
2018-05-14 08:23:00 +10:00
Maxime Coste
288cf6de73
Fix performance problem when generating many values for # register
...
Fixes #2008
2018-05-09 23:02:53 +10:00
Maxime Coste
74f90c1fc5
Refactor buffer undo tree
...
Store the undo tree as an array of undo nodes, instead of as a
pointer based tree.
2018-05-02 22:34:55 +10:00
Maxime Coste
bcecb2f877
Fix crash on quitting
2018-04-29 22:59:20 +10:00
Maxime Coste
178d2d3cd3
Rework the way UI can trigger a client quitting
...
Add a UserInterface::is_ok method and return false on
SIGHUP/stdin closing/socket dropping
This should be cleaner and more robust than the previous SIGHUP
handling code.
Fixes #1594
2018-04-29 22:31:57 +10:00
Maxime Coste
2d96fbed7c
Reserve data for # register
2018-04-25 21:19:04 +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
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
d571c207e6
Make version available through $kak_version and debug info
2018-04-09 17:06:02 +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
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
beb2cef7f9
Document rotate selection breaking change in startup message
2018-03-25 11:39:26 +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
a480e566dc
ranges: Add transform overload taking directly a pointer to member
...
This overload will forward to the general transform implementation
using std::mem_fn to generate a callable.
2018-03-13 14:24:03 +11:00
Maxime Coste
4584ecac77
Move WORD text object to <a-w>
...
It improves consistency and it looked like there was support for that
change on github.
Fixes #1861
2018-03-10 00:25:19 +11:00
Delapouite
c4eb4438d2
Remove <scope> from user-modes commands
2018-03-02 09:28:27 +01:00
Maxime Coste
7a54c0edfe
Update status message with new breaking changes
2018-03-01 15:36:25 +11:00
Maxime Coste
171e787063
Update startup message to notify about h/l change
2018-02-24 23:16:39 +11:00
aver-d
da009b0ef5
Fix typos in C++ string literals
...
informations, dont, incrementaly, alignement
2018-02-22 20:28:01 +00:00
Maxime Coste
dc30b0e6d6
Do not support general commands in filter mode
2018-02-18 14:54:21 +11:00
Maxime Coste
5924694bda
ShellManager: init from a static list of env vars
...
No need to go through a static list and then copy them one by
one in a vector.
2018-02-18 14:52:29 +11:00
Maxime Coste
10c6c59a26
Buffer: avoid expensive option flattening in on_registred with NoHooks
2018-02-18 14:48:24 +11:00
Maxime Coste
81eb2ee428
Do not strip whitespaces with '*'
...
Stripping whitespaces there is a failed experiment as it breaks the
ability to use multi-selections consistently: Using '*' followed by some
`N` to add following matches, we end up with mismatched selections
due to whitespace stripping the original selection still contains
whitespaces where all the new ones do not. Once we get to this state,
most selection commands will give different results for the initial
selection and the other ones, breaking predictible multiselection use,
one of the cornerstones of Kakoune editing model.
2018-01-31 09:31:18 +11:00
Maxime Coste
299e22ca7c
Do not block when waiting for next event if we have pending input
...
Handle next event should never block if we have already accumulated
input that we want to process. As we can accumulate new input in
lots of places (everytime we run a shell process for example, we
might end up reading input keys. That can be triggered during the
mode line generation which takes place during display of the window)
Fixes #1804
2018-01-21 12:00:40 +11:00
Maxime Coste
d22c989984
Rename InputModeChange hook to ModeChange
...
InputModeChange is a bit long to type and its pretty clear in Kakoune
that "Mode" means "Input mode", so use a shorter and as clear name.
2018-01-21 10:34:09 +11:00
Maxime Coste
07dfcd336d
Fallback to getpwuid in the unlikely case $HOME is underfined
...
Add a homedir() helper function, and document the $kak_config
env var.
2018-01-20 11:19:23 +11:00
Maxime Coste
e7cbf38af7
Introduce a $kak_config env var containing the Kakoune user config dir
...
Makes it easier for users who want to locate their kakrc file, and
does not require to go through shell expansion to get it as
"${XDG_CONFIG_DIR:-${HOME}/.config}/kak"
Fixes #1740
2018-01-19 10:05:08 +11:00
Maxime Coste
eeacb8b5a8
Use the _str and _sv string literals more often
2018-01-18 09:00:54 +11:00
Maxime Coste
49e028b847
Add information on InputModeChange hook in the startup message
2017-12-29 10:00:45 +11:00
Delapouite
74898120ed
Add session name filtering for KakBegin hook
2017-12-21 22:22:33 +01:00
Maxime Coste
274367116a
Replace uses of getpwuid which is incompatible with static linking
...
Introduce a get_user_name function which parses '/etc/passwd' to find
the username associated with a user id.
2017-12-04 15:19:57 +08:00
Maxime Coste
208f9641ef
Remote: when converting to client, suspend *after* connecting
...
Also, do not quit server while there is a connection being accepted
Fixes #1690
2017-11-12 22:28:13 +08:00
Maxime Coste
7f51e51fcb
Introduce matching_pairs option that controls the pairs used by m
2017-11-04 15:53:53 +08:00
Maxime Coste
25dac6b24e
Document the regex impl switch in the startup message
2017-11-01 14:18:13 +08:00
Maxime Coste
7064e890f5
Update breaking changes message
2017-10-28 13:43:04 +08:00
Maxime Coste
d1b9c24afc
Make Server outlive buffer manager
...
Fixes crashes when trying to access the server to get the session
on hooks run during destruction of other managers.
Fixes #1622
2017-10-10 10:49:30 +08:00
Delapouite
d03858280a
Add client_list var
2017-10-05 16:41:36 +02:00
Maxime Coste
76f072a786
Removing the local client due to SIGHUP is not graceful
...
That means we will now backup modified buffers if that client was
the last.
Should improve things for #1590
2017-09-27 11:08:55 +08:00
Maxime Coste
3aaf646eda
Fix compilation
2017-09-18 10:30:21 +09:00
Maxime Coste
3d79395e63
Document custom text object move in breaking changes
2017-09-18 10:06:41 +09:00
Maxime Coste
772f85b883
Expose the character under the cursor as $kak_cursor_char_value
...
Fixes #142
2017-09-12 12:45:39 +08:00
Maxime Coste
ba71f209af
Fork server to background when the client/server process receives SIGHUP
...
Avoid losing the whole session when closing the terminal emulator of
the client/server process, only the client will be removed and the
server will be forked.
2017-09-11 14:21:14 +08:00
Maxime Coste
8e3e5b10c1
Merge remote-tracking branch 'Franciman/exposed_history_id'
2017-09-06 11:55:00 +08:00
Francesco Magliocca
d4fa94c356
Rename env variable kak_curr_history_id to kak_history_id
2017-09-04 16:41:27 +02:00
Francesco Magliocca
b3ac4d86b6
Add current history id to env variables
2017-09-02 12:14:19 +02:00
Maxime Coste
ab6a999431
Rename containers.hh to ranges.hh (and Container to Range)
2017-08-29 15:23:03 +07:00
Maxime Coste
e80b36b495
Expose client pid as $kak_client_pid
...
As requested in #1414
2017-08-28 13:12:45 +07:00
Maxime Coste
f7bed9eb18
Support specifying an exit status on quit
commands
...
The current client exit status can be specified as an optional
parameter, is nothing is given the exit status will be 0.
Fixes #1230
2017-08-23 13:33:13 +07:00
Maxime Coste
6176a19520
Update startup info
...
Remove old breaking changes, add selection extending behaviour change.
2017-08-23 07:00:37 +07:00
Maxime Coste
7a79cbbc81
Migrate code to c++14
2017-07-19 08:47:14 +02:00
Maxime Coste
7389e37b4b
Small startup message formatting tweak
2017-07-13 00:31:17 +09:00
Maxime Coste
620e718087
Formatting tweak
2017-06-29 09:31:02 +01:00
Maxime Coste
9bbab690ba
Merge remote-tracking branch 'danr/Expose-last-entered-command-in-register'
2017-06-29 07:29:32 +01:00
Maxime Coste
f41d78083a
Use the extra_word_chars option in word based normal commands
...
the completion_extra_word_chars is now gone, superseeded by
extra_word_chars that gets used both for completion and for normal mode.
Fixes #1304
2017-06-26 15:28:41 +01:00
Maxime Coste
268c214f56
Change completion_extra_word_char to be a list of codepoints instead of a string
2017-06-26 14:39:17 +01:00
Maxime Coste
dc1b039282
Add ctags command renaming info in the startup message
2017-06-23 10:23:26 +01:00
Maxime Coste
5fbaa2c955
Update startup info message
...
Remove some old breaking changes, add the lint/make/grep command
changes.
2017-06-17 08:47:14 +01:00
Maxime Coste
ab56be090a
minor style tweak
2017-06-12 06:12:10 +01:00
Maxime Coste
250886a9e1
Use read_fd to get pipe command from stdin instead of ad-hoc code
...
read_fd will also now throw on read error instead of just returning
the data read so far as if nothing failed.
2017-06-12 05:21:34 +01:00
Maxime Coste
2b5fafa909
Do not show startup info when piping into kak
...
Fixes #1340
2017-06-08 10:03:07 +01:00
Delapouite
09daaa8b3a
Expose kak_buf_line_count
2017-06-06 14:29:06 +02:00
Maxime Coste
96813ee824
Document the *
behaviour change in the startup message
2017-06-03 18:17:44 +01:00
Maxime Coste
58dfd76dca
Small formatting fix
2017-06-03 14:02:43 +01:00
Maxime Coste
b9080d8b2c
Document line-flags -> line-specs and update-option in breaking changes
2017-05-27 06:18:02 +01:00
Dan Rosén
b1735ae76e
Expose last entered command in register :
2017-05-25 21:48:41 +02:00
Maxime Coste
df4eadd2f5
Merge remote-tracking branch 'danr/Add-modified-value-if-buffer-has-modifications-not-saved'
2017-05-21 06:43:19 +01:00
Maxime Coste
b440d9f537
Change <a-z>/<a-Z> to combine selections instead of appending
2017-05-20 10:31:49 +01:00
Dan Rosén
625e7f8249
Add modified value if buffer has modifications not saved
...
Closes #1386
2017-05-18 17:39:30 +02:00
Maxime Coste
0229baf6ba
Add range-faces -> range-specs rename to the breaking changes message
2017-05-17 19:42:23 +01:00
Maxime Coste
3a0d9481ac
Add the -E switch for server initialization commands
...
Fixes #1361
2017-05-13 11:05:09 +01:00
Maxime Coste
30e6387071
Assume filename passed to write_buffer_to_file is already parsed
2017-04-20 09:55:56 +01:00
Maxime Coste
91bfd714e4
Place hardware terminal cursor at the current main cursor/prompt cursor position
...
Fixes #1318
Also fixes https://gitlab.com/gnachman/iterm2/issues/5408
2017-04-12 10:39:17 +01:00
Maxime Coste
112bd156e4
Merge remote-tracking branch 'lenormf/fix-filter-backup-suffix'
2017-04-10 21:39:24 +01:00