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