Cole Helbling
266e388c6b
commands: add "registers" subcommand to :debug
...
This prints all non-empty registers and their value(s) to the `*debug*`
buffer.
2020-12-23 14:22:44 -08:00
Maxime Coste
c2516f02f6
Do not trigger RegisterModified hooks on register about to be restored
...
This greatly reduces the amount of hooks triggered.
2020-07-21 20:27:42 +10:00
Maxime Coste
47ba36c66e
Add a RegisterModified hook
...
This one has been a long time coming, I am still concerned this could
impact performance a lot. This hook does *not* trigger for capture
registers (0-9) or any other dynamic registers (that are not writable).
Fixes #859
2020-07-19 12:56:55 +10:00
Maxime Coste
940b1b6175
Fix invalid memory access when getting the main entry of empty registers
...
Fixes #3370
2020-02-15 15:42:08 +11:00
Frank LENORMAND
2cdf86d674
src: Complete register names in %reg{}
expansions
...
Builtin registers have name aliases that can be completed upon when
using a `%reg{}` expansion from the prompt.
2019-11-23 08:47:14 +01:00
Frank LENORMAND
78129150c9
src: Cap the maximum size of history registers
...
History registers (for prompt commands, pipe primitive commands etc) are
populated interactively by the users, and currently have no size limit.
This commits silently drops the oldest entries in the storage space to
allow at most 100 entries, to prevent long-running editing sessions from
hogging memory for data most likely never used.
2019-07-02 16:36:12 +03:00
Maxime Coste
034e726068
Unify register saving/restoring to a Vector
...
The previous "optimized" history register logic was unfortunately
not restoring correctly as the order of entries in the history
register could have been mutated.
2019-06-24 19:08:48 +10:00
Maxime Coste
e613292568
Use register to store prompt history
2019-06-23 12:05:09 +10:00
Maxime Coste
9bd3231d9b
Avoid needless constant allocation in StaticRegister::set
2018-05-17 07:41:32 +10:00
Maxime Coste
7a79cbbc81
Migrate code to c++14
2017-07-19 08:47:14 +02:00
Maxime Coste
6373338c50
Replace uses of UnorderedMap with HashMap
2017-03-07 01:03:26 +00:00
Maxime Coste
467f5547d5
Try to please clang-3.5
2017-02-22 09:44:19 +00:00
Maxime Coste
d470bd2cc9
Make numeric registers setable
...
Fixes #1214
2017-02-14 00:02:01 +00:00
Maxime Coste
dcd8f6ef01
Apply clang-tidy modernize to the codebase
2017-01-08 22:39:01 +00:00
Maxime Coste
8badcdc0d5
Make DynamicRegister statically dispatch to its function
2016-03-31 09:17:02 +01:00
Maxime Coste
3644f2a056
Refactor registers to initialize all of them at startup and add null register
...
Fixes #497
2015-11-25 21:48:17 +00:00
Maxime Coste
075c5013a1
Move Register to register_manager.hh
2015-04-23 21:51:48 +01:00
Maxime Coste
2a878d51fd
Even more memory tracking
2015-01-14 19:16:32 +00:00
Maxime Coste
da562e03a0
replace all std::vector with Vector
2015-01-12 13:58:41 +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
d33554a1cc
Add support for long names for registers
...
We can now access register / with the name slash, * with star,
and | with pipe
Fixes #23
2014-06-06 00:49:36 +01:00
Maxime Coste
e6884f989c
Style changes, replace typedefs with usings
2014-01-09 19:59:26 +00:00
Maxime Coste
270e950cf1
sort includes directives
2013-04-09 20:05:40 +02:00
Maxime Coste
4dc9973288
Registers need a context to return their values
2012-08-05 20:13:41 +02:00
Maxime Coste
dfbda951d3
support static and dynamic registers, add '%' (filename) and '.' (selection) registers
2012-06-29 18:37:17 +02:00
Maxime Coste
d84d085cc2
Merge captures into registers, implements register insertion
2012-02-09 23:47:55 +00:00
Maxime Coste
333e87dedd
add a Register class, registers can now contain a list of string
...
That way, registers can be used to store per selection data
2012-02-07 23:01:02 +00:00
Maxime Coste
9b865cea39
Basic support for yanking and pasting
2011-09-23 14:31:57 +00:00