Commit Graph

5963 Commits

Author SHA1 Message Date
Maxime Coste
b81500c0e4 Use microseconds instead of milliseconds for built-in profiling 2017-06-07 20:06:47 +01:00
Maxime Coste
1c0bdd8c85 Run BufCreate hook *before* Buf{Open,New}File 2017-06-07 19:46:43 +01:00
Maxime Coste
4495aefea6 Use range based find_if wrapper for finding shell env vars 2017-06-07 19:46:16 +01:00
Maxime Coste
d9b1ee13d9 Change merge_overlapping to guarantee we dont break the sorting
In certain cases, we could end up with a unsorted selection list,
leading to broken invariant.
2017-06-07 19:30:44 +01:00
Maxime Coste
1d4093bcdc Fix memory errors due to sharing the MatchResults in the Hooks struct
A hook execution triggered by another hook execution would change the
shared MatchResults object, which is a wrong behaviour and makes it
point to dead string data.
2017-06-07 19:18:15 +01:00
Maxime Coste
575e6fe325 Remove unneeded unknown_expand exception type 2017-06-07 19:01:26 +01:00
Maxime Coste
b7982c6ee3 Use range based accumulate wrapper instead of std::accumulate 2017-06-07 13:36:47 +01:00
Maxime Coste
a0d848da8d Do not allow whitespaces as % string delimiters 2017-06-07 13:09:45 +01:00
Maxime Coste
81118552c8 Fix missing hook removal command in c-family.kak 2017-06-07 12:44:00 +01:00
Maxime Coste
f0285a8e60 Move hook executing logic into HookManager
The existing HookManager was able to run arbitrary hook functions,
but in practice was only used for user provided textual hooks.

That separation was causing some suboptimal performances, by moving
that logic directly in the hook manager we can improve hook filtering
performance which is a big part of startup time when opening lots
of files.
2017-06-07 12:33:39 +01:00
Maxime Coste
4606453fed Avoid expensive copies of Hooks in HookManager::run_hooks
Use a deferred deletion mechanism to ensure hooks are kept alive
for the duration of run_hooks.
2017-06-07 12:15:16 +01:00
Maxime Coste
87477cf2bb Move NestedBool to utils.hh 2017-06-07 11:55:42 +01:00
Maxime Coste
21da24235a Small style tweak 2017-06-07 11:40:13 +01:00
Maxime Coste
5a5d2ad7cb noexcept-ify utf8::iterator methods 2017-06-07 10:58:49 +01:00
Maxime Coste
cb6ef4afb6 noexept-ify BufferIterator methods 2017-06-07 10:58:01 +01:00
Maxime Coste
502c5da0e9 Fix useles copy of hook_func in HookManager::add_hook parameter 2017-06-07 09:54:58 +01:00
Maxime Coste
295fa5b27d Use String default ctor instead of empty string 2017-06-07 09:54:11 +01:00
Maxime Coste
a5e7b6a22f Use a vector instead of a hash map to store hooks 2017-06-07 09:46:05 +01:00
Delapouite
86cc66577b Clarify rotation direction between <'> and <a-'> in info help 2017-06-07 08:53:33 +02:00
Maxime Coste
fd00e1f9ae Merge remote-tracking branch 'Delapouite/underscore' 2017-06-07 07:48:57 +01:00
Maxime Coste
d214969d5b Merge remote-tracking branch 'Delapouite/buf_line_count' 2017-06-07 07:48:32 +01:00
Maxime Coste
9cb9e77dc2 Merge remote-tracking branch 'Delapouite/view-count' 2017-06-07 07:45:53 +01:00
Delapouite
09daaa8b3a Expose kak_buf_line_count 2017-06-06 14:29:06 +02:00
Delapouite
2f84051efb Add underscore char as a valid punctuation for text-object pairs 2017-06-06 12:04:53 +02:00
Delapouite
b4af4994fb Remember previous NormalParams::count in view-lock mode 2017-06-06 09:52:02 +02:00
Maxime Coste
36364d5f6b Fix spurious copies being made when using the format function
We were not correctly forwarding the arguments, leading to copies of
'const String&' parameters.
2017-06-06 08:50:51 +01:00
Frank LENORMAND
8794687f36 Revert "doc: Fix the documentation of the alt_dirs option"
This reverts commit ef88b28392.
2017-06-04 11:24:10 +03:00
Maxime Coste
73ecbdbc97 Log errors written to the status line inside the debug buffer as well
Fixes #1410
2017-06-04 08:48:23 +01:00
Maxime Coste
261e0fabcc Improve readability of command docstrings by changing formatting
Fixes #1378
2017-06-04 08:37:51 +01:00
Maxime Coste
6101138606 Change RankedMatch ordering to favor / characters
This will improve matching of filenames, as 'foo/' will be sorted
before 'foo-bar' due to `/` coming before `-` in the new ordering
(it comes after in ascii/unicode order).

Fixes #1395
2017-06-04 08:27:53 +01:00
Maxime Coste
a1bfe4404a Merge remote-tracking branch 'lenormf/doc-public-options' 2017-06-03 20:59:24 +01:00
Frank LENORMAND
ef88b28392 doc: Fix the documentation of the alt_dirs option 2017-06-03 21:49:10 +03:00
Maxime Coste
96813ee824 Document the * behaviour change in the startup message 2017-06-03 18:17:44 +01:00
Maxime Coste
c1e4b4ff79 Strip surrounding whitespaces in *
Fixes #1406
2017-06-03 18:16:40 +01:00
Maxime Coste
8dc9f8cc22 Support option_add for HashMap options
Fixes #1407
2017-06-03 18:01:38 +01:00
Maxime Coste
6906e6924b Merge remote-tracking branch 'occivink/ignore-debug' 2017-06-03 15:26:51 +01:00
Maxime Coste
d8a90ad5d3 Merge remote-tracking branch 'danr/Remove-ad-hoc-rules-in-kakrc-highlighter' 2017-06-03 15:16:49 +01:00
Maxime Coste
f3f6ac9e8a Merge remote-tracking branch 'danr/Improve-kakrc-highlighter-with-more-static-words' 2017-06-03 15:16:14 +01:00
Maxime Coste
a313dab90f Merge remote-tracking branch 'Delapouite/include' 2017-06-03 14:46:03 +01:00
Maxime Coste
c440bbde81 Merge remote-tracking branch 'Delapouite/shift-modes' 2017-06-03 14:45:48 +01:00
Maxime Coste
514c4100cb Merge remote-tracking branch 'Delapouite/docs' 2017-06-03 14:45:19 +01:00
Maxime Coste
5b66be26f6 Merge remote-tracking branch 'Delapouite/svg' 2017-06-03 14:44:55 +01:00
Maxime Coste
9d71be769b Rename _grep_current_line option to grep_current_line 2017-06-03 14:04:06 +01:00
Maxime Coste
58dfd76dca Small formatting fix 2017-06-03 14:02:43 +01:00
Maxime Coste
0e88a9695a Add support for more selection combining operations
Change append to 'a', add select longest/shortest, union and
intersection.
2017-06-03 13:45:59 +01:00
Delapouite
2acdafa325 Add SVG detection as xml in file.kak 2017-06-02 15:43:51 +02:00
Delapouite
e8707298c1 Refine info titles to distinguish G and V modes 2017-05-31 19:57:56 +02:00
Delapouite
eb8ab7a081 docs: add missing angle brackets around keys in README and manpages 2017-05-31 19:22:01 +02:00
Delapouite
ccecc2b7cf fix: remove duplicate include to containers.hh in face_registry.cc 2017-05-30 20:01:31 +02:00
Maxime Coste
1d74e1edaf Merge remote-tracking branch 'lenormf/doc-faq-update' 2017-05-29 10:26:57 +01:00