Commit Graph

121 Commits

Author SHA1 Message Date
Maxime Coste
baf219ee2f Fix duplicate buffer problem, fix real_path beahviour 2016-05-15 10:37:01 +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
cf142872dc Add missing include in file.cc 2016-04-27 09:46:53 +01: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
d3ef2d36ea Add a SplitView container view 2016-03-25 20:38:26 +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
6d5900af16 Use RankedMatch for filename based completion (file and command completion) 2016-03-02 13:51:16 +00:00
Frank LENORMAND
df31b88187 Fix "unused result" warnings for several system calls. 2015-12-10 11:00:10 +03: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
a81dbd90a1 Consolidate writing to fd 2015-11-27 13:50:40 +00:00
Maxime Coste
2ce0a5a8a8 Merge https://github.com/alpha123/kakoune 2015-11-04 19:49:21 +00:00
alpha123
97c92368bc Build on FreeBSD 2015-11-03 11:51:27 -07:00
sinetek
4b8c03afe6 Adding support for DragonFlyBSD. 2015-11-03 01:14:34 +07:00
Maxime Coste
17eef4a7dc Use explicit lambda captures 2015-11-02 13:44:03 +00:00
Maxime Coste
76fadd8108 More cleanups in the buffer open/reload code 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
6913d5427c Try to fix OSX compilation 2015-09-27 18:48:01 +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
Filip Szczepański
47e6eed7c9 Add Haiku support. 2015-09-24 22:36:29 +00:00
Maxime Coste
c859e8ab5f Create directory with 0777 mode in make_directory
Fixes #408
2015-09-16 20:17:31 +01:00
Maxime Coste
5173dad470 Add some missing memory domains 2015-09-12 10:51:16 +01:00
Maxime Coste
2334a57970 Reduce allocation count in file.cc 2015-09-11 13:49:08 +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
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
f19bb4fe6d Port more code to use the format function instead of adhoc string concat 2015-06-01 19:06:35 +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
5bff742e0a Replace some String temporaries with StringViews 2015-04-27 16:46:57 +01:00
Maxime Coste
f6c7948c12 Add format_to allowing formating to an existing buffer 2015-04-22 13:19:46 +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
6e1a388544 Replace various adhoc operator+ based formatting with format func 2015-03-30 23:06:02 +01:00
Maxime Coste
52cd08915d Keep the dir trailing slash in split_path 2015-03-13 13:09:54 +00:00
Maxime Coste
b4f6b50dbb Make split_path public 2015-03-12 20:39:34 +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
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
eb5f458138 Extract directory/filename splitting in a function 2015-02-06 13:47:19 +00:00
Maxime Coste
9f9156a752 Track String memory allocations 2015-01-09 13:57:21 +00:00
Maxime Coste
295a97f2a6 Rename memoryview to ArrayView 2015-01-06 13:43:37 +00:00
Maxime Coste
7a7ad57871 Support absolute paths when completing commands 2014-12-21 17:08:33 +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
87d312b6d4 More string cleanups 2014-12-08 13:59:29 +00:00
Maxime Coste
0c3acb74c2 Remove unneeded string copies 2014-11-17 19:38:30 +00:00
Maxime Coste
3a817e2f96 Cleanup includes 2014-11-12 21:27:07 +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
7f23d4b756 Close fd before notifiying buffer of modification when writing to file 2014-10-22 19:23:54 +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
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
2e2812b10f Do not escape completions in completer functions let the client decide
Fixes #231
2014-08-18 23:31:02 +01:00